Skip to content

Commit b691662

Browse files
authored
Remove NoReturnArrayVariableListRule as very niche and depends on context (#154)
1 parent 3cb4dda commit b691662

14 files changed

+0
-373
lines changed

README.md

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -538,43 +538,6 @@ class SomeClass
538538

539539
<br>
540540

541-
### NoReturnArrayVariableListRule
542-
543-
Use value object over return of values
544-
545-
```yaml
546-
rules:
547-
- Symplify\PHPStanRules\Rules\NoReturnArrayVariableListRule
548-
```
549-
550-
```php
551-
class ReturnVariables
552-
{
553-
public function run($value, $value2): array
554-
{
555-
return [$value, $value2];
556-
}
557-
}
558-
```
559-
560-
:x:
561-
562-
<br>
563-
564-
```php
565-
final class ReturnVariables
566-
{
567-
public function run($value, $value2): ValueObject
568-
{
569-
return new ValueObject($value, $value2);
570-
}
571-
}
572-
```
573-
574-
:+1:
575-
576-
<br>
577-
578541
### NoReturnSetterMethodRule
579542

580543
Setter method cannot return anything, only set value

config/code-complexity-rules.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
rules:
22
- Symplify\PHPStanRules\Rules\NoDynamicNameRule
3-
- Symplify\PHPStanRules\Rules\NoReturnArrayVariableListRule
43
- Symplify\PHPStanRules\Rules\NoSingleInterfaceImplementerRule
54

65
services:

src/Enum/RuleIdentifier.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ final class RuleIdentifier
4141
*/
4242
public const NO_SINGLE_INTERFACE_IMPLEMENTER = 'symplify.noSingleInterfaceImplementer';
4343

44-
/**
45-
* @var string
46-
*/
47-
public const NO_RETURN_ARRAY_VARIABLE_LIST = 'symplify.noReturnArrayVariableList';
48-
4944
/**
5045
* @var string
5146
*/

src/Rules/NoReturnArrayVariableListRule.php

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

src/Testing/StaticPHPUnitEnvironment.php

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

tests/Rules/NoReturnArrayVariableListRule/Fixture/Enum/SkipEnum.php

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

tests/Rules/NoReturnArrayVariableListRule/Fixture/ReturnVariables.php

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

tests/Rules/NoReturnArrayVariableListRule/Fixture/SkipArraySpreads.php

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

tests/Rules/NoReturnArrayVariableListRule/Fixture/SkipNews.php

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

tests/Rules/NoReturnArrayVariableListRule/Fixture/SkipParentMethod.php

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

0 commit comments

Comments
 (0)