@@ -17,7 +17,7 @@ class Reflection
1717 private ?array $ args = null ;
1818 private bool $ allowInterfaces = true ;
1919 private ?string $ dependMethod = null ;
20- private static array $ class = array () ;
20+ private static array $ class = [] ;
2121 private static ?array $ interfaceFactory = null ;
2222 //private static array $attr = [];
2323 //private static $interfaceProtocol;
@@ -72,7 +72,7 @@ public function allowInterfaces(bool $bool): void
7272 */
7373 public function dependencyInjector (?object $ class = null , ?string $ method = null ): mixed
7474 {
75- $ args = array () ;
75+ $ args = [] ;
7676 $ constructor = $ this ->setDependMethod ($ method , $ this ->reflect );
7777 if (!is_null ($ constructor )) {
7878 $ params = $ constructor ->getParameters ();
@@ -100,7 +100,7 @@ public function dependencyInjector(?object $class = null, ?string $method = null
100100 * @return ReflectionMethod|null
101101 * @throws ReflectionException
102102 */
103- function setDependMethod (?string $ method , ReflectionClass $ inst ): ?ReflectionMethod
103+ public function setDependMethod (?string $ method , ReflectionClass $ inst ): ?ReflectionMethod
104104 {
105105 $ method = ($ method === "constructor " ) ? null : $ method ;
106106 $ this ->dependMethod = $ method ;
@@ -138,14 +138,14 @@ private function initReclusiveReflect(string $className, string $fromClass): Ref
138138 * @return array
139139 * @throws Exception
140140 */
141- private function injectRecursion (array $ params , string $ fromClass , array $ _args = array () ): array
141+ private function injectRecursion (array $ params , string $ fromClass , array $ _args = [] ): array
142142 {
143- $ _args = array () ;
143+ $ _args = [] ;
144144 foreach ($ params as $ param ) {
145145 if ($ param ->getType () && !$ param ->getType ()->isBuiltin ()) {
146146 $ classNameA = $ param ->getType ()->getName ();
147147 $ inst = $ this ->initReclusiveReflect ($ classNameA , $ fromClass );
148- $ reflectParam = array () ;
148+ $ reflectParam = [] ;
149149 $ constructor = $ inst ->getConstructor ();
150150
151151 if (!$ inst ->isInterface ()) {
@@ -206,7 +206,7 @@ private function insertMultipleNestedClasses(
206206 string $ classNameA ,
207207 array $ reflectParam
208208 ): array {
209- $ args = array () ;
209+ $ args = [] ;
210210 foreach ($ reflectParam as $ reflectInstance ) {
211211 if ($ reflectInstance ->getType () && !$ reflectInstance ->getType ()->isBuiltin ()) {
212212 $ classNameB = $ reflectInstance ->getType ()->getName ();
0 commit comments