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