| @@ 83-98 (lines=16) @@ | ||
| 80 | * |
|
| 81 | * @return bool |
|
| 82 | */ |
|
| 83 | private function validateProperty(ReflectionProperty $property): bool |
|
| 84 | { |
|
| 85 | if (!$property->isPublic()) { |
|
| 86 | debug(self::DEBUG_LABEL)->output('[Error] Property %s is not public', $property->getName()); |
|
| 87 | ||
| 88 | return false; |
|
| 89 | } |
|
| 90 | ||
| 91 | if ($property->isStatic()) { |
|
| 92 | debug(self::DEBUG_LABEL)->output('[Error] Property %s is static', $property->getName()); |
|
| 93 | ||
| 94 | return false; |
|
| 95 | } |
|
| 96 | ||
| 97 | return true; |
|
| 98 | } |
|
| 99 | ||
| 100 | /** |
|
| 101 | * @param string $name |
|
| @@ 123-138 (lines=16) @@ | ||
| 120 | * |
|
| 121 | * @return bool |
|
| 122 | */ |
|
| 123 | private function validateMethod(ReflectionMethod $method): bool |
|
| 124 | { |
|
| 125 | if (!$method->isPublic()) { |
|
| 126 | debug(self::DEBUG_LABEL)->output('[Error] Method %s is not public', $method->getName()); |
|
| 127 | ||
| 128 | return false; |
|
| 129 | } |
|
| 130 | ||
| 131 | if ($method->isStatic()) { |
|
| 132 | debug(self::DEBUG_LABEL)->output('[Error] Method %s is static', $method->getName()); |
|
| 133 | ||
| 134 | return false; |
|
| 135 | } |
|
| 136 | ||
| 137 | return true; |
|
| 138 | } |
|
| 139 | ||
| 140 | /** |
|
| 141 | * @param ReflectionMethod $method |
|