Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public function __construct($className, $method, array $properties) |
||
15 | { |
||
16 | array_walk($properties, function(&$property) { |
||
17 | $property = '$this->' . $property; |
||
18 | }); |
||
19 | $formatedProperties = implode(', ', $properties); |
||
20 | |||
21 | $message = 'Private method ' . $className . '::' . $method . '() '; |
||
22 | $message .= 'should not directly access ' . $formatedProperties . ', '; |
||
23 | $message .= 'it should use accessor or be protected. '; |
||
24 | $message .= 'As method is private, ' . ReadOnlyHydrator::class . ' could not handle method call, '; |
||
25 | $message .= 'so it can\'t ensure when property is not loaded, '; |
||
26 | $message .= 'no calls to ' . $formatedProperties . ' are made.'; |
||
27 | |||
28 | parent::__construct($message); |
||
29 | } |
||
30 | } |
||
31 |