Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | public static function fromObject($object): RowData |
||
22 | { |
||
23 | if (!is_object($object)) { |
||
24 | throw new \InvalidArgumentException(sprintf( |
||
25 | 'Object must be an object, got: "%s"', |
||
26 | gettype($object) |
||
27 | )); |
||
28 | } |
||
29 | |||
30 | $instance = new self(); |
||
31 | $instance->object = $object; |
||
32 | |||
33 | return $instance; |
||
34 | } |
||
35 | |||
73 |