Skip to content

Commit 3754685

Browse files
committedJul 24, 2024
:octocat: PHPCS: add Slevomat standard
1 parent 927d5d8 commit 3754685

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+342
-351
lines changed
 

‎composer.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
"phan/phan": "^5.4",
4949
"phpmd/phpmd": "^2.15",
5050
"phpunit/phpunit": "^10.5",
51-
"squizlabs/php_codesniffer": "^3.9"
51+
"slevomat/coding-standard": "^8.15",
52+
"squizlabs/php_codesniffer": "^3.10"
5253
},
5354
"suggest": {
5455
"chillerlan/php-httpinterface": "^6.0 - an alternative PSR-18 HTTP Client"
@@ -71,6 +72,9 @@
7172
"config": {
7273
"lock": false,
7374
"sort-packages": true,
74-
"platform-check": true
75+
"platform-check": true,
76+
"allow-plugins": {
77+
"dealerdirect/phpcodesniffer-composer-installer": true
78+
}
7579
}
7680
}

‎examples/OAuthExampleProviderFactory.php

+12-8
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,31 @@
3030
use Psr\Log\LoggerInterface;
3131

3232
/**
33-
*
33+
* An extended provider factory to simplify using the examples
3434
*/
3535
class OAuthExampleProviderFactory{
3636

3737
public const STORAGE_MEMORY = 0b001;
3838
public const STORAGE_SESSION = 0b010;
3939
public const STORAGE_FILE = 0b100;
4040

41-
protected DotEnv $dotEnv;
42-
protected LoggerInterface $logger;
41+
protected OAuthProviderFactory $factory;
42+
protected string $cfgDir;
43+
protected DotEnv $dotEnv;
44+
protected LoggerInterface $logger;
4345
protected OAuthOptions|SettingsContainerInterface $options;
44-
protected OAuthStorageInterface $fileStorage;
46+
protected OAuthStorageInterface $fileStorage;
4547

4648
public function __construct(
47-
protected OAuthProviderFactory $factory,
48-
protected string $cfgDir,
49-
string $envFile,
50-
string $logLevel,
49+
OAuthProviderFactory $factory,
50+
string $cfgDir,
51+
string $envFile,
52+
string $logLevel,
5153
){
5254
ini_set('date.timezone', 'UTC');
5355

56+
$this->factory = $factory;
57+
$this->cfgDir = $cfgDir;
5458
$this->dotEnv = (new DotEnv($this->cfgDir, $envFile, false))->load();
5559
$this->logger = $this->initLogger($logLevel);
5660
$this->fileStorage = $this->initFileStorage();

0 commit comments

Comments
 (0)
Please sign in to comment.