@@ -19,19 +19,19 @@ |
||
19 | 19 | |
20 | 20 | class ToArrayConverter implements ConverterContract |
21 | 21 | { |
22 | - /** |
|
23 | - * Returns array representation of the object. |
|
24 | - * |
|
25 | - * @param object $obj Object to be converted |
|
26 | - * @param array $config Converter config array to be used for this object (based on exact class |
|
27 | - * name match or inheritance). |
|
28 | - * |
|
29 | - * @return array |
|
30 | - */ |
|
31 | - public function convert($obj, /** @scrutinizer ignore-unused */ array $config): array |
|
32 | - { |
|
33 | - Validator::assertIsObject('obj', $obj); |
|
22 | + /** |
|
23 | + * Returns array representation of the object. |
|
24 | + * |
|
25 | + * @param object $obj Object to be converted |
|
26 | + * @param array $config Converter config array to be used for this object (based on exact class |
|
27 | + * name match or inheritance). |
|
28 | + * |
|
29 | + * @return array |
|
30 | + */ |
|
31 | + public function convert($obj, /** @scrutinizer ignore-unused */ array $config): array |
|
32 | + { |
|
33 | + Validator::assertIsObject('obj', $obj); |
|
34 | 34 | |
35 | - return $obj->toArray(); |
|
36 | - } |
|
35 | + return $obj->toArray(); |
|
36 | + } |
|
37 | 37 | } |
@@ -19,19 +19,19 @@ |
||
19 | 19 | |
20 | 20 | class ArrayableConverter implements ConverterContract |
21 | 21 | { |
22 | - /** |
|
23 | - * Returns array representation of the object implementing Arrayable interface |
|
24 | - * |
|
25 | - * @param Arrayable $obj Object to be converted |
|
26 | - * @param array $config Converter config array to be used for this object (based on exact class |
|
27 | - * name match or inheritance). |
|
28 | - * |
|
29 | - * @return array |
|
30 | - */ |
|
31 | - public function convert($obj, /** @scrutinizer ignore-unused */ array $config): array |
|
32 | - { |
|
33 | - Validator::assertInstanceOf('obj', $obj, Arrayable::class); |
|
22 | + /** |
|
23 | + * Returns array representation of the object implementing Arrayable interface |
|
24 | + * |
|
25 | + * @param Arrayable $obj Object to be converted |
|
26 | + * @param array $config Converter config array to be used for this object (based on exact class |
|
27 | + * name match or inheritance). |
|
28 | + * |
|
29 | + * @return array |
|
30 | + */ |
|
31 | + public function convert($obj, /** @scrutinizer ignore-unused */ array $config): array |
|
32 | + { |
|
33 | + Validator::assertInstanceOf('obj', $obj, Arrayable::class); |
|
34 | 34 | |
35 | - return $obj->toArray(); |
|
36 | - } |
|
35 | + return $obj->toArray(); |
|
36 | + } |
|
37 | 37 | } |