Skip to content

Commit

Permalink
add one example with option on
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Oct 5, 2021
1 parent af5b239 commit 0f9bad2
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function getRuleDefinition(): RuleDefinition
<<<'CODE_SAMPLE'
class SomeClass
{
public function run(string $name)
public function run(string|null $name)
{
if (! $name) {
return 'no name';
Expand All @@ -54,7 +54,7 @@ class SomeClass
{
public function run(string $name)
{
if ($name === '') {
if ($name === null) {
return 'no name';
}
Expand All @@ -64,7 +64,7 @@ public function run(string $name)
CODE_SAMPLE
,
[
self::TREAT_AS_NON_EMPTY => false,
self::TREAT_AS_NON_EMPTY => true,
]
),
]);
Expand Down

0 comments on commit 0f9bad2

Please sign in to comment.