@@ -71,7 +71,7 @@ function instantiate(@parameters) {
7171function connect ($ source , callable $ target , ?Handle $ handle = null , $ partOfWildcard = false )
7272{
7373 $ source = translateIfLanguageConstruct ($ source );
74- $ handle = $ handle ?: new Handle ;
74+ $ handle = $ handle ?: new Handle () ;
7575 list ($ class , $ method ) = Utils \interpretCallable ($ source );
7676 if (constitutesWildcard ($ source )) {
7777 return applyWildcard ($ source , $ target , $ handle );
@@ -112,7 +112,7 @@ function constitutesWildcard($source)
112112
113113function applyWildcard ($ wildcard , callable $ target , ?Handle $ handle = null )
114114{
115- $ handle = $ handle ?: new Handle ;
115+ $ handle = $ handle ?: new Handle () ;
116116 list ($ class , $ method , $ instance ) = Utils \interpretCallable ($ wildcard );
117117 if (!empty ($ instance )) {
118118 foreach (Utils \matchWildcard ($ method , get_class_methods ($ instance )) as $ item ) {
@@ -181,7 +181,7 @@ function inPreprocessedFile($callable)
181181
182182function connectFunction ($ function , callable $ target , ?Handle $ handle = null )
183183{
184- $ handle = $ handle ?: new Handle ;
184+ $ handle = $ handle ?: new Handle () ;
185185 $ routes = &State::$ routes ['' ][$ function ];
186186 $ offset = Utils \append ($ routes , [$ target , $ handle ]);
187187 $ handle ->addReference ($ routes [$ offset ]);
@@ -190,7 +190,7 @@ function connectFunction($function, callable $target, ?Handle $handle = null)
190190
191191function queueConnection ($ source , callable $ target , ?Handle $ handle = null )
192192{
193- $ handle = $ handle ?: new Handle ;
193+ $ handle = $ handle ?: new Handle () ;
194194 $ offset = Utils \append (State::$ queue , [$ source , $ target , $ handle ]);
195195 $ handle ->addReference (State::$ queue [$ offset ]);
196196 return $ handle ;
@@ -213,7 +213,7 @@ function deployQueue()
213213
214214function connectMethod ($ function , callable $ target , ?Handle $ handle = null )
215215{
216- $ handle = $ handle ?: new Handle ;
216+ $ handle = $ handle ?: new Handle () ;
217217 list ($ class , $ method , $ instance ) = Utils \interpretCallable ($ function );
218218 $ target = new Decorator ($ target );
219219 $ target ->superclass = $ class ;
@@ -235,9 +235,9 @@ function connectMethod($function, callable $target, ?Handle $handle = null)
235235function connectInstantiation ($ class , callable $ target , ?Handle $ handle = null )
236236{
237237 if (!Config \isNewKeywordRedefinable ()) {
238- throw new Exceptions \NewKeywordNotRedefinable ;
238+ throw new Exceptions \NewKeywordNotRedefinable () ;
239239 }
240- $ handle = $ handle ?: new Handle ;
240+ $ handle = $ handle ?: new Handle () ;
241241 $ class = strtr ($ class , ['\\' => '__ ' ]);
242242 $ routes = &State::$ routes ["Patchwork \\Instantiators \\$ class " ]['instantiate ' ];
243243 $ offset = Utils \append ($ routes , [$ target , $ handle ]);
@@ -318,7 +318,7 @@ function relay(?array $args = null)
318318
319319 $ route = &State::$ routes [$ class ][$ method ][$ offset ];
320320 $ backup = $ route ;
321- $ route = ['Patchwork\fallBack ' , new Handle ];
321+ $ route = ['Patchwork\fallBack ' , new Handle () ];
322322 $ top = Stack \top ();
323323 if ($ args === null ) {
324324 $ args = $ top ['args ' ];
@@ -600,7 +600,7 @@ function getInstantiator($class, $calledClass)
600600 });
601601 }
602602 $ instantiator = "$ namespace \\$ adaptedName " ;
603- return new $ instantiator ;
603+ return new $ instantiator() ;
604604}
605605
606606class State
0 commit comments