Ban non-void return from __construct, __destruct, __clone?
Aberta
feature request
hack
low-pri
- Linguagem predominante
- C++
- Estrelas
- 18.7k
- Forks
- 3.1k
- Merge médio
- 1h 47min
- PRs com merge (30d)
- 2
Descrição
I've found one case of this in Facebook:
```
class Foo {
public function __clone(): Foo {
return new Foo( ... );
}
}
```
This looks like a misunderstanding about how __clone works, as it's called after a copy, instead of to actually do the copy. See http://php.net/manual/en/language.oop5.cloning.php
t5158846 for fixing the issue in Facebook.
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.