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