@@ -450,7 +450,7 @@ public function setLayout($layout)
450450 */
451451 public function sendTemplate (Template $ template = null ): void
452452 {
453- $ template = $ template ?? $ this ->getTemplate ();
453+ $ template ??= $ this ->getTemplate ();
454454 if (!$ template ->getFile ()) {
455455 $ files = $ this ->formatTemplateFiles ();
456456 foreach ($ files as $ file ) {
@@ -722,7 +722,7 @@ public function canonicalize(string $destination = null, ...$args): void
722722 $ this ,
723723 $ destination ?: $ this ->action ,
724724 $ args + $ this ->getGlobalState () + $ request ->getParameters (),
725- 'redirectX '
725+ 'redirectX ' ,
726726 );
727727 } catch (InvalidLinkException $ e ) {
728728 }
@@ -768,7 +768,7 @@ protected function createRequest(
768768 Component $ component ,
769769 string $ destination ,
770770 array $ args ,
771- string $ mode
771+ string $ mode,
772772 ): ?string {
773773 // note: createRequest supposes that saveState(), run() & tryCall() behaviour is final
774774
@@ -818,7 +818,7 @@ protected function createRequest(
818818
819819 // PROCESS SIGNAL ARGUMENTS
820820 if (isset ($ signal )) { // $component must be StatePersistent
821- $ reflection = new ComponentReflection (get_class ( $ component) );
821+ $ reflection = new ComponentReflection ($ component::class );
822822 if ($ signal === 'this ' ) { // means "no signal"
823823 $ signal = '' ;
824824 if (array_key_exists (0 , $ args )) {
@@ -835,10 +835,10 @@ protected function createRequest(
835835 $ this ->invalidLinkMode
836836 && ComponentReflection::parseAnnotation (new \ReflectionMethod ($ component , $ method ), 'deprecated ' )
837837 ) {
838- trigger_error ("Link to deprecated signal ' $ signal' " . ($ component === $ this ? '' : ' in ' . get_class ( $ component) ) . " from ' {$ this ->getName ()}: {$ this ->getAction ()}'. " , E_USER_DEPRECATED );
838+ trigger_error ("Link to deprecated signal ' $ signal' " . ($ component === $ this ? '' : ' in ' . $ component::class ) . " from ' {$ this ->getName ()}: {$ this ->getAction ()}'. " , E_USER_DEPRECATED );
839839 }
840840 // convert indexed parameters to named
841- static ::argsToParams (get_class ( $ component) , $ method , $ args , [], $ missing );
841+ static ::argsToParams ($ component::class , $ method , $ args , [], $ missing );
842842 }
843843
844844 // counterpart of StatePersistent
@@ -1010,7 +1010,7 @@ public static function argsToParams(
10101010 string $ method ,
10111011 array &$ args ,
10121012 array $ supplemental = [],
1013- array &$ missing = null
1013+ array &$ missing = null ,
10141014 ): void {
10151015 $ i = 0 ;
10161016 $ rm = new \ReflectionMethod ($ class , $ method );
@@ -1050,7 +1050,7 @@ public static function argsToParams(
10501050 $ name ,
10511051 $ rm ->getDeclaringClass ()->getName () . ':: ' . $ rm ->getName (),
10521052 $ type ,
1053- is_object ($ args [$ name ]) ? get_class ($ args [$ name ]) : gettype ($ args [$ name ])
1053+ is_object ($ args [$ name ]) ? get_class ($ args [$ name ]) : gettype ($ args [$ name ]),
10541054 ));
10551055 }
10561056
@@ -1357,7 +1357,7 @@ final public function injectPrimary(
13571357 Http \IResponse $ httpResponse ,
13581358 ?Http \Session $ session = null ,
13591359 ?Nette \Security \User $ user = null ,
1360- ?TemplateFactory $ templateFactory = null
1360+ ?TemplateFactory $ templateFactory = null ,
13611361 ) {
13621362 if ($ this ->presenterFactory !== null ) {
13631363 throw new Nette \InvalidStateException ('Method ' . __METHOD__ . ' is intended for initialization and should not be called more than once. ' );
0 commit comments