mirror of
https://github.com/danog/psalm.git
synced 2024-12-02 17:52:45 +01:00
14 lines
184 B
Markdown
14 lines
184 B
Markdown
# RedundantCondition
|
|
|
|
Emitted when conditional is redundant given previous assertions
|
|
|
|
```php
|
|
<?php
|
|
|
|
class A {}
|
|
function foo(A $a) : ?A {
|
|
if ($a) return $a;
|
|
return null;
|
|
}
|
|
```
|