| 1 | <?php |
||
| 16 | class CreateFromInstance implements ObjectConstructor |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * The already instantiated object |
||
| 20 | * |
||
| 21 | * @var object |
||
| 22 | */ |
||
| 23 | private $object; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Constructor |
||
| 27 | * |
||
| 28 | * @param object $object |
||
| 29 | */ |
||
| 30 | 1 | public function __construct($object) |
|
| 34 | |||
| 35 | /** |
||
| 36 | * Returns the instantiated object |
||
| 37 | * |
||
| 38 | * @return mixed |
||
|
|
|||
| 39 | */ |
||
| 40 | 1 | public function construct() |
|
| 44 | } |
||
| 45 |
This check looks for the generic type
arrayas a return type and suggests a more specific type. This type is inferred from the actual code.