@@ -112,7 +112,7 @@ public function init()
112
112
*
113
113
* @return UserAction
114
114
*/
115
- public function setAction (Generic $ action ) : View
115
+ public function setAction (Generic $ action ): View
116
116
{
117
117
$ this ->action = $ action ;
118
118
@@ -317,9 +317,9 @@ protected function doPreview(View $modal)
317
317
318
318
if ($ prev = $ this ->getPreviousStep ($ this ->step )) {
319
319
$ chain = $ this ->loader ->jsload ([
320
- 'step ' => $ prev ,
321
- $ this ->name => $ this ->action ->owner ->get ('id ' ),
322
- ], ['method ' => 'post ' ], $ this ->loader ->name );
320
+ 'step ' => $ prev ,
321
+ $ this ->name => $ this ->action ->owner ->get ('id ' ),
322
+ ], ['method ' => 'post ' ], $ this ->loader ->name );
323
323
324
324
$ modal ->js (true , $ this ->prevStepBtn ->js ()->on ('click ' , new jsFunction ([$ chain ])));
325
325
}
@@ -409,7 +409,7 @@ protected function jsGetExecute($obj, $id)
409
409
*
410
410
* @return array|null
411
411
*/
412
- protected function getSteps (Generic $ action ) : ?array
412
+ protected function getSteps (Generic $ action ): ?array
413
413
{
414
414
$ steps = null ;
415
415
if ($ action ->args ) {
@@ -432,7 +432,7 @@ protected function getSteps(Generic $action) :?array
432
432
*
433
433
* @return string|null
434
434
*/
435
- protected function getNextStep (string $ step ) : ?string
435
+ protected function getNextStep (string $ step ): ?string
436
436
{
437
437
$ next = null ;
438
438
if (!$ this ->isLastStep ($ step )) {
@@ -454,7 +454,7 @@ protected function getNextStep(string $step) :?string
454
454
*
455
455
* @return string|null
456
456
*/
457
- protected function getPreviousStep (string $ step ) : ?string
457
+ protected function getPreviousStep (string $ step ): ?string
458
458
{
459
459
$ prev = null ;
460
460
@@ -477,7 +477,7 @@ protected function getPreviousStep(string $step) :?string
477
477
*
478
478
* @return bool
479
479
*/
480
- protected function isLastStep (string $ step ) : bool
480
+ protected function isLastStep (string $ step ): bool
481
481
{
482
482
$ isLast = false ;
483
483
$ step_count = count ($ this ->steps );
@@ -498,7 +498,7 @@ protected function isLastStep(string $step) :bool
498
498
*
499
499
* @return bool
500
500
*/
501
- protected function isFirstStep (string $ step ) : bool
501
+ protected function isFirstStep (string $ step ): bool
502
502
{
503
503
return $ step === $ this ->steps [0 ];
504
504
}
@@ -514,7 +514,7 @@ protected function isFirstStep(string $step) :bool
514
514
*
515
515
* @return Form
516
516
*/
517
- protected function setFormField (Form $ form , array $ fields , string $ step ) : Form
517
+ protected function setFormField (Form $ form , array $ fields , string $ step ): Form
518
518
{
519
519
foreach ($ fields as $ k => $ val ) {
520
520
$ form ->getField ($ k )->set ($ val );
@@ -545,9 +545,9 @@ protected function jsStepSubmit(string $step)
545
545
$ js = [
546
546
$ this ->loader ->jsAddStoreData ($ this ->actionData , true ),
547
547
$ this ->loader ->jsload ([
548
- 'step ' => $ this ->getNextStep ($ step ),
549
- $ this ->name => $ this ->action ->owner ->get ('id ' ),
550
- ], ['method ' => 'post ' ], $ this ->loader ->name ),
548
+ 'step ' => $ this ->getNextStep ($ step ),
549
+ $ this ->name => $ this ->action ->owner ->get ('id ' ),
550
+ ], ['method ' => 'post ' ], $ this ->loader ->name ),
551
551
];
552
552
}
553
553
@@ -595,7 +595,7 @@ protected function jsSetBtnState(View $view, string $step)
595
595
*
596
596
* @return jsExpressionable
597
597
*/
598
- protected function jsSetNextState (string $ step ) : jsExpressionable
598
+ protected function jsSetNextState (string $ step ): jsExpressionable
599
599
{
600
600
if ($ this ->isLastStep ($ step )) {
601
601
return $ this ->nextStepBtn ->js (true )->hide ();
@@ -611,7 +611,7 @@ protected function jsSetNextState(string $step) :jsExpressionable
611
611
*
612
612
* @return jsExpressionable
613
613
*/
614
- protected function jsSetPrevState (string $ step ) : jsExpressionable
614
+ protected function jsSetPrevState (string $ step ): jsExpressionable
615
615
{
616
616
if ($ this ->isFirstStep ($ step )) {
617
617
return $ this ->prevStepBtn ->js (true )->hide ();
@@ -627,7 +627,7 @@ protected function jsSetPrevState(string $step) :jsExpressionable
627
627
*
628
628
* @return jsExpressionable
629
629
*/
630
- protected function jsSetExecState (string $ step ) : jsExpressionable
630
+ protected function jsSetExecState (string $ step ): jsExpressionable
631
631
{
632
632
if ($ this ->isLastStep ($ step )) {
633
633
return $ this ->execActionBtn ->js (true )->show ();
@@ -669,9 +669,9 @@ protected function jsSetPrevHandler(View $view, string $step)
669
669
{
670
670
if ($ prev = $ this ->getPreviousStep ($ step )) {
671
671
$ chain = $ this ->loader ->jsload ([
672
- 'step ' => $ prev ,
673
- $ this ->name => $ this ->action ->owner ->get ('id ' ),
674
- ], ['method ' => 'post ' ], $ this ->loader ->name );
672
+ 'step ' => $ prev ,
673
+ $ this ->name => $ this ->action ->owner ->get ('id ' ),
674
+ ], ['method ' => 'post ' ], $ this ->loader ->name );
675
675
676
676
$ view ->js (true , $ this ->prevStepBtn ->js ()->on ('click ' , new jsFunction ([$ chain ])));
677
677
}
@@ -686,7 +686,7 @@ protected function jsSetPrevHandler(View $view, string $step)
686
686
*
687
687
* @return Form |null
688
688
*/
689
- protected function addFormTo (View $ view ) : Form
689
+ protected function addFormTo (View $ view ): Form
690
690
{
691
691
$ f = $ view ->add ($ this ->form );
692
692
$ f ->buttonSave ->destroy ();
@@ -732,7 +732,7 @@ protected function getActionPreview()
732
732
*
733
733
* @return array
734
734
*/
735
- private function _getActionArgs (array $ data ) : array
735
+ private function _getActionArgs (array $ data ): array
736
736
{
737
737
$ args = [];
738
738
0 commit comments