Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Jun 2, 2024
1 parent 9e73e19 commit 6bcf7e2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ parameters:
narrow_param: true
```

In case of private, but also public method calsl, we often known exact types that are passed in it:
In case of `private`, but also `public` method calls, our project often knows exact types that are passed in it:

```php
// in one file
Expand All @@ -188,7 +188,7 @@ $product->addPrice(100.52);
$product->addPrice(52.05);
```

From fear and "just to be safe", we keep the `addPrice()` param type empty, `mixed` or in a docblock.
But from fear and "just to be safe", we keep the `addPrice()` param type empty, `mixed` or in a docblock.

:no_good:

Expand All @@ -208,6 +208,8 @@ If in 100 % cases the `float` types is passed, PHPStan knows it can be added and
}
```

That's where this group comes in. It checks all the passed types, and let us know how to narrow the param type declaration.

:heavy_check_mark:

<br>
Expand Down

0 comments on commit 6bcf7e2

Please sign in to comment.