File tree Expand file tree Collapse file tree 3 files changed +9
-17
lines changed
Expand file tree Collapse file tree 3 files changed +9
-17
lines changed Original file line number Diff line number Diff line change @@ -63,18 +63,14 @@ public function __construct($attributes = [])
6363
6464 /**
6565 * Handle dynamic calls to the fluent instance to set attributes.
66- *
67- * @param TKey $method
68- * @param array $parameters
69- * @return $this
7066 */
71- public function __call ($ method , $ parameters )
67+ public function __call (string $ name , array $ arguments ): mixed
7268 {
73- if (static ::hasMacro ($ method )) {
74- return $ this ->macroCall ($ method , $ parameters );
69+ if (static ::hasMacro ($ name )) {
70+ return $ this ->macroCall ($ name , $ arguments );
7571 }
7672
77- $ this ->attributes [$ method ] = count ($ parameters ) > 0 ? $ parameters [0 ] : true ;
73+ $ this ->attributes [$ name ] = count ($ arguments ) > 0 ? $ arguments [0 ] : true ;
7874
7975 return $ this ;
8076 }
Original file line number Diff line number Diff line change @@ -66,19 +66,15 @@ public function __isset($name)
6666
6767 /**
6868 * Dynamically pass a method to the underlying object.
69- *
70- * @param string $method
71- * @param array $parameters
72- * @return mixed
7369 */
74- public function __call ($ method , $ parameters )
70+ public function __call (string $ name , array $ arguments ): mixed
7571 {
76- if (static ::hasMacro ($ method )) {
77- return $ this ->macroCall ($ method , $ parameters );
72+ if (static ::hasMacro ($ name )) {
73+ return $ this ->macroCall ($ name , $ arguments );
7874 }
7975
8076 if (is_object ($ this ->value )) {
81- return $ this ->value ->{$ method }(...$ parameters );
77+ return $ this ->value ->{$ name }(...$ arguments );
8278 }
8379
8480 return null ;
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public function __get($name)
3030 return $ property ->getValue ($ this ->instance );
3131 }
3232
33- public function __call ($ name , $ arguments )
33+ public function __call (string $ name , array $ arguments ): mixed
3434 {
3535 $ method = $ this ->reflection ->getMethod ($ name );
3636
You can’t perform that action at this time.
0 commit comments