Conditions | 4 |
Paths | 3 |
Total Lines | 22 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
31 | 17 | public function slumber($subject) |
|
32 | { |
||
33 | 17 | if (\is_object($subject) && |
|
34 | 17 | $config = $this->entityConfigLookUp->getEntityConfig(new \ReflectionClass($subject)) |
|
35 | ) { |
||
36 | |||
37 | 13 | $result = []; |
|
38 | 13 | $entries = $config->getMarkedProperties(); |
|
39 | |||
40 | 13 | foreach ($entries as $entry) { |
|
41 | |||
42 | // put the value to sleep using the alias name |
||
43 | 12 | $result[$entry->alias] = $entry->mapper->slumber( |
|
44 | 12 | $this, |
|
45 | 12 | $entry->propertyAccess->get($subject) |
|
46 | ); |
||
47 | } |
||
48 | |||
49 | 13 | return $result; |
|
50 | } |
||
51 | |||
52 | 4 | return null; |
|
53 | } |
||
55 |