File tree 7 files changed +20
-23
lines changed
ReplacePregSplitNullLimit
7 files changed +20
-23
lines changed Original file line number Diff line number Diff line change @@ -54,10 +54,10 @@ jobs:
54
54
run : vendor/bin/phpunit
55
55
56
56
- name : Run code style suite
57
- run : vendor/bin/phpcs --standard=Magento2 Magento2/Helpers Magento2/Sniffs Magento2Framework/Sniffs
57
+ run : vendor/bin/phpcs --standard=Magento2 Magento2/Helpers Magento2/Sniffs Magento2/Rector Magento2Framework/Sniffs
58
58
59
59
- name : Run framework suite
60
- run : vendor/bin/phpcs --standard=Magento2Framework Magento2/Helpers Magento2/Sniffs Magento2Framework/Sniffs
60
+ run : vendor/bin/phpcs --standard=Magento2Framework Magento2/Helpers Magento2/Sniffs Magento2/Rector Magento2Framework/Sniffs
61
61
js :
62
62
runs-on : ubuntu-latest
63
63
name : Javascript tests
Original file line number Diff line number Diff line change 11
11
use PhpParser \Node \Expr \FuncCall ;
12
12
use PhpParser \Node \Scalar \LNumber ;
13
13
use Rector \Core \Rector \AbstractRector ;
14
- use Symplify \RuleDocGenerator \Exception \PoorDocumentationException ;
15
14
use Symplify \RuleDocGenerator \ValueObject \CodeSample \CodeSample ;
16
15
use Symplify \RuleDocGenerator \ValueObject \RuleDefinition ;
17
16
18
- final class ReplaceMbStrposNullLimit extends AbstractRector
17
+ class ReplaceMbStrposNullLimit extends AbstractRector
19
18
{
20
19
/**
21
- * @return array<class-string<Node>>
20
+ * @inheritDoc
22
21
*/
23
22
public function getNodeTypes (): array
24
23
{
25
24
return [FuncCall::class];
26
25
}
27
26
28
27
/**
29
- * @param FuncCall $node
28
+ * @inheritDoc
30
29
*/
31
30
public function refactor (Node $ node ): ?Node
32
31
{
@@ -43,8 +42,7 @@ public function refactor(Node $node): ?Node
43
42
}
44
43
45
44
/**
46
- * @return RuleDefinition
47
- * @throws PoorDocumentationException
45
+ * @inheritDoc
48
46
*/
49
47
public function getRuleDefinition (): RuleDefinition
50
48
{
Original file line number Diff line number Diff line change 11
11
use PhpParser \Node \Expr \New_ ;
12
12
use PhpParser \Node \Scalar \String_ ;
13
13
use Rector \Core \Rector \AbstractRector ;
14
- use Symplify \RuleDocGenerator \Exception \PoorDocumentationException ;
15
14
use Symplify \RuleDocGenerator \ValueObject \CodeSample \CodeSample ;
16
15
use Symplify \RuleDocGenerator \ValueObject \RuleDefinition ;
17
16
18
- final class ReplaceNewDateTimeNull extends AbstractRector
17
+ class ReplaceNewDateTimeNull extends AbstractRector
19
18
{
20
19
/**
21
- * @return array<class-string<Node>>
20
+ * @inheritDoc
22
21
*/
23
22
public function getNodeTypes (): array
24
23
{
25
24
return [New_::class];
26
25
}
27
26
28
27
/**
29
- * @param New_ $node
28
+ * @inheritDoc
30
29
*/
31
30
public function refactor (Node $ node ): ?Node
32
31
{
@@ -43,8 +42,7 @@ public function refactor(Node $node): ?Node
43
42
}
44
43
45
44
/**
46
- * @return RuleDefinition
47
- * @throws PoorDocumentationException
45
+ * @inheritDoc
48
46
*/
49
47
public function getRuleDefinition (): RuleDefinition
50
48
{
Original file line number Diff line number Diff line change 11
11
use PhpParser \Node \Expr \FuncCall ;
12
12
use PhpParser \Node \Scalar \LNumber ;
13
13
use Rector \Core \Rector \AbstractRector ;
14
- use Symplify \RuleDocGenerator \Exception \PoorDocumentationException ;
15
14
use Symplify \RuleDocGenerator \ValueObject \CodeSample \CodeSample ;
16
15
use Symplify \RuleDocGenerator \ValueObject \RuleDefinition ;
17
16
18
- final class ReplacePregSplitNullLimit extends AbstractRector
17
+ class ReplacePregSplitNullLimit extends AbstractRector
19
18
{
20
19
/**
21
- * @return array<class-string<Node>>
20
+ * @inheritDoc
22
21
*/
23
22
public function getNodeTypes (): array
24
23
{
25
24
return [FuncCall::class];
26
25
}
27
26
28
27
/**
29
- * @param FuncCall $node
28
+ * @inheritDoc
30
29
*/
31
30
public function refactor (Node $ node ): ?Node
32
31
{
@@ -43,8 +42,7 @@ public function refactor(Node $node): ?Node
43
42
}
44
43
45
44
/**
46
- * @return RuleDefinition
47
- * @throws PoorDocumentationException
45
+ * @inheritDoc
48
46
*/
49
47
public function getRuleDefinition (): RuleDefinition
50
48
{
Original file line number Diff line number Diff line change 11
11
use Rector \Testing \PHPUnit \AbstractRectorTestCase ;
12
12
use Symplify \SmartFileSystem \SmartFileInfo ;
13
13
14
- final class ReplaceMbStrposNullLimitTest extends AbstractRectorTestCase
14
+ class ReplaceMbStrposNullLimitTest extends AbstractRectorTestCase
15
15
{
16
16
/**
17
17
* @dataProvider provideData()
@@ -29,6 +29,9 @@ public function provideData(): Iterator
29
29
return $ this ->yieldFilesFromDirectory (__DIR__ . '/Fixture ' );
30
30
}
31
31
32
+ /**
33
+ * @return string
34
+ */
32
35
public function provideConfigFilePath (): string
33
36
{
34
37
return __DIR__ . '/config/configured_rule.php ' ;
Original file line number Diff line number Diff line change 11
11
use Rector \Testing \PHPUnit \AbstractRectorTestCase ;
12
12
use Symplify \SmartFileSystem \SmartFileInfo ;
13
13
14
- final class ReplaceNewDateTimeNullTest extends AbstractRectorTestCase
14
+ class ReplaceNewDateTimeNullTest extends AbstractRectorTestCase
15
15
{
16
16
/**
17
17
* @dataProvider provideData()
Original file line number Diff line number Diff line change 11
11
use Rector \Testing \PHPUnit \AbstractRectorTestCase ;
12
12
use Symplify \SmartFileSystem \SmartFileInfo ;
13
13
14
- final class ReplacePregSplitNullLimitTest extends AbstractRectorTestCase
14
+ class ReplacePregSplitNullLimitTest extends AbstractRectorTestCase
15
15
{
16
16
/**
17
17
* @dataProvider provideData()
You can’t perform that action at this time.
0 commit comments