1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-03 18:17:55 +01:00
psalm/docs/running_psalm/issues/NoInterfaceProperties.md
2020-03-20 19:13:56 -04:00

17 lines
301 B
Markdown

# NoInterfaceProperties
Emitted when trying to fetch a property on an interface as interfaces, by definition, do not have definitions for properties.
```php
<?php
interface I {}
class A implements I {
/** @var ?string */
public $foo;
}
function bar(I $i) : void {
if ($i->foo) {}
}
```