Skip to content

Commit c3b6c2b

Browse files
committed
code improved
1 parent 2cff848 commit c3b6c2b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/Loader/DescriptorLoader.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function __construct(
111111

112112
// the "doctrine/annotations" package must be installed manually
113113
if (class_exists(SimpleAnnotationReader::class)) {
114-
$this->annotationReader = new SimpleAnnotationReader();
114+
$this->annotationReader = /** @scrutinizer ignore-deprecated */ new SimpleAnnotationReader();
115115
$this->annotationReader->addNamespace('Sunrise\Http\Router\Annotation');
116116
}
117117
}
@@ -323,13 +323,10 @@ private function getDescriptorsFromClass(ReflectionClass $class) : array
323323
}
324324

325325
foreach ($class->getMethods() as $method) {
326-
// ignore non-callable methods...
327-
if ($method->isAbstract() ||
328-
$method->isConstructor() ||
329-
$method->isDestructor() ||
326+
// ignore non-available methods...
327+
if ($method->isStatic() ||
330328
$method->isPrivate() ||
331-
$method->isProtected() ||
332-
$method->isStatic()) {
329+
$method->isProtected()) {
333330
continue;
334331
}
335332

0 commit comments

Comments
 (0)