@@ -77,7 +77,7 @@ public function dependencyInjector(?object $class = null, ?string $method = null
7777 {
7878 $ args = [];
7979 $ constructor = $ this ->setDependMethod ($ method , $ this ->reflect );
80- if (! is_null ( $ constructor) ) {
80+ if ($ constructor !== null ) {
8181 $ params = $ constructor ->getParameters ();
8282 $ this ->injectRecursion ($ params , $ this ->reflect ->getName ());
8383 foreach ($ params as $ param ) {
@@ -93,7 +93,7 @@ public function dependencyInjector(?object $class = null, ?string $method = null
9393 }
9494 }
9595 }
96- if (! is_null ( $ this ->dependMethod ) ) {
96+ if ($ this ->dependMethod !== null ) {
9797 $ this ->dependMethod = null ;
9898 return $ constructor ->invokeArgs ($ class , $ args );
9999 }
@@ -111,7 +111,7 @@ public function setDependMethod(?string $method, ReflectionClass $inst): ?Reflec
111111 {
112112 $ method = ($ method === "constructor " ) ? null : $ method ;
113113 $ this ->dependMethod = $ method ;
114- if (is_null ( $ this ->dependMethod ) ) {
114+ if ($ this ->dependMethod === null ) {
115115 return $ inst ->getConstructor ();
116116 }
117117 return $ inst ->getMethod ($ this ->dependMethod );
@@ -239,7 +239,7 @@ private function getClassNameFromParam(ReflectionParameter $param): ?string
239239 private function insertInterfaceClasses (ReflectionClass $ inst , string $ classNameA ): void
240240 {
241241 if ($ this ->allowInterfaces ) {
242- if (! is_null ( self ::$ interfaceFactory) ) {
242+ if (self ::$ interfaceFactory !== null ) {
243243 foreach (self ::$ interfaceFactory as $ call ) {
244244 self ::$ class [$ classNameA ] = $ call ($ inst ->getShortName (), $ classNameA , $ inst );
245245 }
@@ -323,7 +323,7 @@ public function getReflect(): ReflectionClass
323323 */
324324 public function get (): mixed
325325 {
326- if (! is_null ( $ this ->method ) ) {
326+ if ($ this ->method !== null ) {
327327 $ method = $ this ->reflect ->getMethod ($ this ->method );
328328 if ($ method ->isConstructor ()) {
329329 return $ this ->getClass ();
@@ -333,7 +333,7 @@ public function get(): mixed
333333 }
334334 $ inst = $ this ->reflect ->newInstanceWithoutConstructor ();
335335
336- if (! is_null ( $ this ->args ) ) {
336+ if ($ this ->args !== null ) {
337337 return $ method ->invokeArgs ($ inst , $ this ->args );
338338 } else {
339339 return $ method ->invoke ($ inst );
@@ -354,7 +354,7 @@ public static function getClassList(): array
354354 */
355355 private function getClass (): object
356356 {
357- if (! is_null ( $ this ->args ) ) {
357+ if ($ this ->args !== null ) {
358358 $ inst = $ this ->reflect ->newInstanceArgs ($ this ->args );
359359 } else {
360360 $ inst = $ this ->dependencyInjector ();
0 commit comments