Skip to content

Commit

Permalink
DX: little code grooming
Browse files Browse the repository at this point in the history
  • Loading branch information
keradus committed Dec 6, 2020
1 parent 6f4e62f commit 6d89350
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/sca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
./dev-tools/check_file_permissions.sh
./dev-tools/check_trailing_spaces.sh
./dev-tools/vendor/bin/phpstan analyse
./dev-tools/vendor/bin/composer-require-checker check composer.json --config-file $(realpath .composer-require-checker.json)
./dev-tools/vendor/bin/composer-require-checker check composer.json --config-file .composer-require-checker.json
composer normalize --dry-run --working-dir=./dev-tools ../composer.json
./dev-tools/check_shell_scripts.sh
Expand Down
6 changes: 3 additions & 3 deletions dev-tools/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"php": "^7.1"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.5.1",
"ergebnis/composer-normalize": "^2.11",
"humbug/box": "^3.8",
"jangregor/phpstan-prophecy": "^0.6",
"maglnet/composer-require-checker": "2.0.0",
"mi-schi/phpmd-extension": "^4.3",
"phpmd/phpmd": "^2.6",
"phpmd/phpmd": "^2.9",
"phpstan/phpstan": "0.12.18",
"phpstan/phpstan-phpunit": "^0.12"
"phpstan/phpstan-phpunit": "^0.12.8"
},
"config": {
"optimize-autoloader": true,
Expand Down
2 changes: 1 addition & 1 deletion src/Tokenizer/AbstractTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function getPriority()
*/
public function getCustomTokens()
{
@trigger_error('PhpCsFixer\Tokenizer\TransformerInterface::getCustomTokens is deprecated and will be removed in 3.0.', E_USER_DEPRECATED);
@trigger_error(sprintf('%s is deprecated and will be removed in 3.0.', __METHOD__), E_USER_DEPRECATED);

return $this->getDeprecatedCustomTokens();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Tokenizer/Transformers.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private function __construct()
$this->registerBuiltInTransformers();

usort($this->items, static function (TransformerInterface $a, TransformerInterface $b) {
return Utils::cmpInt($b->getPriority(), $a->getPriority()); // TODO spaceship
return Utils::cmpInt($b->getPriority(), $a->getPriority()); // TODO: update to use spaceship operator (PHP 7.0 required)
});
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Test/AbstractTransformerTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function testGetName()

/**
* @group legacy
* @expectedDeprecation PhpCsFixer\Tokenizer\TransformerInterface::getCustomTokens is deprecated and will be removed in 3.0.
* @expectedDeprecation PhpCsFixer\Tokenizer\AbstractTransformer::getCustomTokens is deprecated and will be removed in 3.0.
*/
public function testGetCustomTokens()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Tokenizer/AbstractTransformerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function testNameAndPriorityDefault()

/**
* @group legacy
* @expectedDeprecation PhpCsFixer\Tokenizer\TransformerInterface::getCustomTokens is deprecated and will be removed in 3.0.
* @expectedDeprecation PhpCsFixer\Tokenizer\AbstractTransformer::getCustomTokens is deprecated and will be removed in 3.0.
*/
public function testCustomTokens()
{
Expand Down

0 comments on commit 6d89350

Please sign in to comment.