Skip to content

Commit bf8f561

Browse files
authored
Bump symplify/rule-doc-generator to 12.0 (#31)
1 parent e000966 commit bf8f561

File tree

9 files changed

+18
-38
lines changed

9 files changed

+18
-38
lines changed

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
"symplify/easy-coding-standard": "^12.0.1",
1313
"squizlabs/php_codesniffer": "^3.7.2",
1414
"phpunit/phpunit": "^10.2",
15-
"symplify/rule-doc-generator": "^11.2",
15+
"symplify/rule-doc-generator": "^12.0",
1616
"php-parallel-lint/php-parallel-lint": "^1.3",
1717
"phpstan/extension-installer": "^1.3",
1818
"phpstan/phpstan": "^1.10.26",
1919
"rector/rector": "^0.17.7",
2020
"symplify/easy-ci": "^11.3",
2121
"symplify/phpstan-extensions": "^11.2",
22-
"tomasvotruba/unused-public": "^0.1.14",
22+
"tomasvotruba/unused-public": "^0.2",
2323
"tomasvotruba/type-coverage": "^0.2",
24-
"tomasvotruba/class-leak": "0.0.22.72"
24+
"tomasvotruba/class-leak": "^0.1"
2525
},
2626
"autoload": {
2727
"psr-4": {

docs/rules_overview.md

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,6 @@ Array items, method parameters, method call arguments, new arguments should be o
5151

5252
- class: [`Symplify\CodingStandard\Fixer\LineLength\LineLengthFixer`](../src/Fixer/LineLength/LineLengthFixer.php)
5353

54-
```php
55-
<?php
56-
57-
declare(strict_types=1);
58-
59-
use Symplify\CodingStandard\Fixer\LineLength\LineLengthFixer;
60-
use Symplify\EasyCodingStandard\Config\ECSConfig;
61-
62-
return static function (ECSConfig $ecsConfig): void {
63-
$ecsConfig->ruleWithConfiguration(LineLengthFixer::class, [
64-
LineLengthFixer::LINE_LENGTH => 40,
65-
]);
66-
};
67-
```
68-
69-
70-
7154
```diff
7255
-function some($veryLong, $superLong, $oneMoreTime)
7356
-{

easy-ci.php

Lines changed: 0 additions & 13 deletions
This file was deleted.

ecs.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
$ecsConfig->paths([
1010
__DIR__ . '/ecs.php',
1111
__DIR__ . '/rector.php',
12-
__DIR__ . '/easy-ci.php',
1312
__DIR__ . '/config',
1413
__DIR__ . '/src',
1514
__DIR__ . '/tests',
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Symplify\CodingStandard\Exception;
6+
7+
use Exception;
8+
9+
final class ShouldNotHappenException extends Exception
10+
{
11+
}

src/Fixer/LineLength/LineLengthFixer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use PhpCsFixer\Tokenizer\Token;
1313
use PhpCsFixer\Tokenizer\Tokens;
1414
use SplFileInfo;
15+
use Symplify\CodingStandard\Exception\ShouldNotHappenException;
1516
use Symplify\CodingStandard\Fixer\AbstractSymplifyFixer;
1617
use Symplify\CodingStandard\Fixer\Spacing\StandaloneLineConstructorParamFixer;
1718
use Symplify\CodingStandard\TokenAnalyzer\FunctionCallNameMatcher;
@@ -24,7 +25,6 @@
2425
use Symplify\RuleDocGenerator\Contract\DocumentedRuleInterface;
2526
use Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample;
2627
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
27-
use Symplify\SymplifyKernel\Exception\ShouldNotHappenException;
2828

2929
/**
3030
* @see \Symplify\CodingStandard\Tests\Fixer\LineLength\LineLengthFixer\LineLengthFixerTest

src/TokenRunner/Analyzer/FixerAnalyzer/TokenSkipper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
use PhpCsFixer\Tokenizer\CT;
88
use PhpCsFixer\Tokenizer\Token;
99
use PhpCsFixer\Tokenizer\Tokens;
10+
use Symplify\CodingStandard\Exception\ShouldNotHappenException;
1011
use Symplify\CodingStandard\TokenRunner\Exception\TokenNotFoundException;
1112
use Symplify\CodingStandard\TokenRunner\ValueObject\BlockInfo;
12-
use Symplify\SymplifyKernel\Exception\ShouldNotHappenException;
1313

1414
final class TokenSkipper
1515
{

src/TokenRunner/DocBlock/MalformWorker/ParamNameTypoMalformWorker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ private function fixTypos(array $argumentNames, array $missArgumentNames, array
112112
$typoName = $paramNames[$key];
113113
$replacePattern = '#@param(.*?)(' . preg_quote($typoName, '#') . '\b)#';
114114

115-
$docContent = Strings::replace($docContent, $replacePattern, static function ($matched) use ($argumentName, &$replacedParams) {
115+
$docContent = Strings::replace($docContent, $replacePattern, static function (array $matched) use ($argumentName, &$replacedParams) {
116116
$paramName = $matched[2];
117117

118118
// 2. If the PHPDoc $paramName is one of the existing $argumentNames and has not already been replaced, it will be deferred

src/TokenRunner/TokenFinder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
use PhpCsFixer\Tokenizer\Token;
88
use PhpCsFixer\Tokenizer\Tokens;
9-
use Symplify\SymplifyKernel\Exception\ShouldNotHappenException;
9+
use Symplify\CodingStandard\Exception\ShouldNotHappenException;
1010

1111
final class TokenFinder
1212
{

0 commit comments

Comments
 (0)