src/Mapper/Definition/AnnotationProcessor/AbstractProcessor.php 1 location
|
@@ 101-108 (lines=8) @@
|
98 |
|
$name = $property->getName(); |
99 |
|
$class = $property->getDeclaringClass(); |
100 |
|
|
101 |
|
foreach (['get', 'is'] as $prefix) |
102 |
|
{ |
103 |
|
$getter = $prefix . ucfirst($name); |
104 |
|
|
105 |
|
if ($class->hasMethod($getter) && $class->getMethod($getter)->isPublic()) { |
106 |
|
return $getter; |
107 |
|
} |
108 |
|
} |
109 |
|
|
110 |
|
throw new \LogicException(sprintf( |
111 |
|
'Getter-method for the property "%s" cannot be resolved automatically. ' . |
src/Mapper/Definition/ConfigurationProcessor/AbstractProcessor.php 1 location
|
@@ 55-62 (lines=8) @@
|
52 |
|
*/ |
53 |
|
protected function resolveGetter(\ReflectionClass $reflection, string $name) |
54 |
|
{ |
55 |
|
foreach (['get', 'is'] as $prefix) |
56 |
|
{ |
57 |
|
$getter = $prefix . ucfirst($name); |
58 |
|
|
59 |
|
if ($reflection->hasMethod($getter) && $reflection->getMethod($getter)->isPublic()) { |
60 |
|
return $getter; |
61 |
|
} |
62 |
|
} |
63 |
|
|
64 |
|
throw new \LogicException(sprintf( |
65 |
|
'Getter-method for "%s" cannot be resolved automatically. ' . |