mirror of
https://github.com/danog/psalm.git
synced 2024-12-02 17:52:45 +01:00
ea52b9d23a
While I was searching for some code, ran across these.
18 lines
307 B
Markdown
18 lines
307 B
Markdown
# UndefinedMagicPropertyAssignment
|
|
|
|
Emitted when assigning a property on an object that does not have that magic property defined
|
|
|
|
```php
|
|
<?php
|
|
|
|
/**
|
|
* @property string $bar
|
|
*/
|
|
class A {
|
|
/** @param mixed $value */
|
|
public function __set(string $name, $value) {}
|
|
}
|
|
$a = new A();
|
|
$a->foo = "bar";
|
|
```
|