File tree Expand file tree Collapse file tree 6 files changed +15
-13
lines changed
Expand file tree Collapse file tree 6 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -231,8 +231,10 @@ private static function getDeclaredAnnotations()
231231 self ::$ _annotations = array ();
232232 foreach (get_declared_classes () as $ class )
233233 {
234- if (is_subclass_of ($ class , 'EAnnotation ' ) || $ class == 'EAnnotation ' )
234+ if (is_subclass_of ($ class , Annotation::class) || $ class == Annotation::class)
235+ {
235236 self ::$ _annotations [] = $ class ;
237+ }
236238 }
237239 }
238240 return self ::$ _annotations ;
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ abstract class Annotation extends CComponent
4545 public function __construct ($ data = [], $ target = false )
4646 {
4747 $ reflection = new ReflectionClass ($ this );
48- $ class = $ reflection ->getName () ;
48+ $ class = $ reflection ->name ;
4949 if (isset (self ::$ _creationStack [$ class ]))
5050 {
5151 trigger_error ("Circular annotation reference on ' $ class' " , E_USER_ERROR );
@@ -128,15 +128,15 @@ private function createName($target)
128128 {
129129 if ($ target instanceof ReflectionMethod)
130130 {
131- return $ target ->getDeclaringClass ()->getName () . ':: ' . $ target ->getName () ;
131+ return $ target ->getDeclaringClass ()->name . ':: ' . $ target ->name ;
132132 }
133133 elseif ($ target instanceof ReflectionProperty)
134134 {
135- return $ target ->getDeclaringClass ()->getName () . '::$ ' . $ target ->getName () ;
135+ return $ target ->getDeclaringClass ()->name . '::$ ' . $ target ->name ;
136136 }
137137 else
138138 {
139- return $ target ->getName () ;
139+ return $ target ->name ;
140140 }
141141 }
142142
Original file line number Diff line number Diff line change @@ -85,15 +85,15 @@ private function createName($target)
8585 {
8686 if ($ target instanceof ReflectionMethod)
8787 {
88- return $ target ->getDeclaringClass ()->getName () . ':: ' . $ target ->getName () ;
88+ return $ target ->getDeclaringClass ()->name . ':: ' . $ target ->name ;
8989 }
9090 elseif ($ target instanceof ReflectionProperty)
9191 {
92- return $ target ->getDeclaringClass ()->getName () . '::$ ' . $ target ->getName () ;
92+ return $ target ->getDeclaringClass ()->name . '::$ ' . $ target ->name ;
9393 }
9494 else
9595 {
96- return $ target ->getName () ;
96+ return $ target ->name ;
9797 }
9898 }
9999
Original file line number Diff line number Diff line change @@ -92,16 +92,16 @@ protected function createAnnotationBuilder()
9292
9393 private function createReflectionAnnotatedClass ($ class )
9494 {
95- return ($ class !== false ) ? new ReflectionAnnotatedClass ($ class ->getName () ) : false ;
95+ return ($ class !== false ) ? new ReflectionAnnotatedClass ($ class ->name ) : false ;
9696 }
9797
9898 private function createReflectionAnnotatedMethod ($ method )
9999 {
100- return ($ method !== null ) ? new ReflectionAnnotatedMethod ($ this ->getName () , $ method ->getName () ) : null ;
100+ return ($ method !== null ) ? new ReflectionAnnotatedMethod ($ this ->name , $ method ->name ) : null ;
101101 }
102102
103103 private function createReflectionAnnotatedProperty ($ property )
104104 {
105- return ($ property !== null ) ? new ReflectionAnnotatedProperty ($ this ->getName () , $ property ->getName () ) : null ;
105+ return ($ property !== null ) ? new ReflectionAnnotatedProperty ($ this ->name , $ property ->name ) : null ;
106106 }
107107}
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public function getAllAnnotations($restriction = false)
3636 public function getDeclaringClass ()
3737 {
3838 $ class = parent ::getDeclaringClass ();
39- return new ReflectionAnnotatedClass ($ class ->getName () );
39+ return new ReflectionAnnotatedClass ($ class ->name );
4040 }
4141
4242 protected function createAnnotationBuilder ()
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public function getAllAnnotations($restriction = false)
4242 public function getDeclaringClass ()
4343 {
4444 $ class = parent ::getDeclaringClass ();
45- return new ReflectionAnnotatedClass ($ class ->getName () );
45+ return new ReflectionAnnotatedClass ($ class ->name );
4646 }
4747
4848 /**
You can’t perform that action at this time.
0 commit comments