mirror of
https://github.com/danog/psalm.git
synced 2024-12-03 10:07:52 +01:00
17 lines
194 B
Markdown
17 lines
194 B
Markdown
|
# PossiblyInvalidClone
|
||
|
|
||
|
Emitted when trying to clone a value that's possibly not cloneable
|
||
|
|
||
|
```php
|
||
|
<?php
|
||
|
|
||
|
class A {}
|
||
|
|
||
|
/**
|
||
|
* @param A|string $a
|
||
|
*/
|
||
|
function foo($a) {
|
||
|
return clone $a;
|
||
|
}
|
||
|
```
|