-
-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TypeDeclaration] Skip public method on AddMethodCallBasedStrictParam…
…TypeRector (#4659) * [TypeDeclaration] Skip public method on AddMethodCallBasedStrictParamTypeRector * rename * [ci-review] Rector Rectify * [ci-review] Rector Rectify --------- Co-authored-by: GitHub Action <actions@github.com>
- Loading branch information
1 parent
ae89643
commit 8c04f65
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
...or/ClassMethod/AddMethodCallBasedStrictParamTypeRector/Fixture/skip_public_method.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector\Fixture; | ||
|
||
abstract class SkipPublicMethod | ||
{ | ||
public function toJson() | ||
{ | ||
return $this->toArray(true); | ||
} | ||
|
||
public function __toString() | ||
{ | ||
return implode(', ', $this->toArray()); | ||
} | ||
|
||
final public function toArray($cols = false) | ||
{ | ||
if ((! is_bool($cols)) && (! is_array($cols))) { | ||
throw new Exception('Invalid value cols'); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters