@@ -48,7 +48,7 @@ abstract public function getName(): string;
4848 /**
4949 * Remove the given task from all stages and applications
5050 */
51- public function removeTask (string $ removeTask , Application $ application = null ): self
51+ public function removeTask (string $ removeTask , ? Application $ application = null ): self
5252 {
5353 $ removeApplicationName = $ application instanceof Application ? $ application ->getName () : null ;
5454
@@ -108,7 +108,7 @@ public function forStage(string $stage, $tasks): self
108108 * @param string $stage The name of the stage when this task shall be executed
109109 * @param string $step A stage has three steps "before", "tasks" and "after"
110110 */
111- protected function addTaskToStage ($ tasks , string $ stage , Application $ application = null , string $ step = 'tasks ' ): void
111+ protected function addTaskToStage ($ tasks , string $ stage , ? Application $ application = null , string $ step = 'tasks ' ): void
112112 {
113113 if (!is_array ($ tasks )) {
114114 $ tasks = [$ tasks ];
@@ -134,7 +134,7 @@ protected function addTaskToStage($tasks, string $stage, Application $applicatio
134134 *
135135 * @return Workflow
136136 */
137- public function addTask ($ tasks , string $ stage , Application $ application = null )
137+ public function addTask ($ tasks , string $ stage , ? Application $ application = null )
138138 {
139139 $ this ->addTaskToStage ($ tasks , $ stage , $ application );
140140
@@ -148,7 +148,7 @@ public function addTask($tasks, string $stage, Application $application = null)
148148 *
149149 * @param array|string $tasks
150150 */
151- public function afterTask (string $ task , $ tasks , Application $ application = null ): self
151+ public function afterTask (string $ task , $ tasks , ? Application $ application = null ): self
152152 {
153153 if (!is_array ($ tasks )) {
154154 $ tasks = [$ tasks ];
@@ -171,7 +171,7 @@ public function afterTask(string $task, $tasks, Application $application = null)
171171 *
172172 * @param array|string $tasks
173173 */
174- public function beforeTask (string $ task , $ tasks , Application $ application = null ): self
174+ public function beforeTask (string $ task , $ tasks , ? Application $ application = null ): self
175175 {
176176 if (!is_array ($ tasks )) {
177177 $ tasks = [$ tasks ];
@@ -204,7 +204,7 @@ public function defineTask(string $taskName, string $baseTask, array $options):
204204 *
205205 * @param array|string $tasks
206206 */
207- public function beforeStage (string $ stage , $ tasks , Application $ application = null ): self
207+ public function beforeStage (string $ stage , $ tasks , ? Application $ application = null ): self
208208 {
209209 $ this ->addTaskToStage ($ tasks , $ stage , $ application , 'before ' );
210210
@@ -216,7 +216,7 @@ public function beforeStage(string $stage, $tasks, Application $application = nu
216216 *
217217 * @param array|string $tasks
218218 */
219- public function afterStage (string $ stage , $ tasks , Application $ application = null ): self
219+ public function afterStage (string $ stage , $ tasks , ? Application $ application = null ): self
220220 {
221221 $ this ->addTaskToStage ($ tasks , $ stage , $ application , 'after ' );
222222
0 commit comments