@@ -51,7 +51,7 @@ abstract public function getName(): string;
5151 /**
5252 * Remove the given task from all stages and applications
5353 */
54- public function removeTask (string $ removeTask , Application $ application = null ): self
54+ public function removeTask (string $ removeTask , ? Application $ application = null ): self
5555 {
5656 $ removeApplicationName = $ application instanceof Application ? $ application ->getName () : null ;
5757
@@ -111,7 +111,7 @@ public function forStage(string $stage, $tasks): self
111111 * @param string $stage The name of the stage when this task shall be executed
112112 * @param string $step A stage has three steps "before", "tasks" and "after"
113113 */
114- protected function addTaskToStage ($ tasks , string $ stage , Application $ application = null , string $ step = 'tasks ' ): void
114+ protected function addTaskToStage ($ tasks , string $ stage , ? Application $ application = null , string $ step = 'tasks ' ): void
115115 {
116116 if (!is_array ($ tasks )) {
117117 $ tasks = [$ tasks ];
@@ -137,7 +137,7 @@ protected function addTaskToStage($tasks, string $stage, Application $applicatio
137137 *
138138 * @return Workflow
139139 */
140- public function addTask ($ tasks , string $ stage , Application $ application = null )
140+ public function addTask ($ tasks , string $ stage , ? Application $ application = null )
141141 {
142142 $ this ->addTaskToStage ($ tasks , $ stage , $ application );
143143
@@ -151,7 +151,7 @@ public function addTask($tasks, string $stage, Application $application = null)
151151 *
152152 * @param array<int, class-string|string>|string $tasks
153153 */
154- public function afterTask (string $ task , $ tasks , Application $ application = null ): self
154+ public function afterTask (string $ task , $ tasks , ? Application $ application = null ): self
155155 {
156156 if (!is_array ($ tasks )) {
157157 $ tasks = [$ tasks ];
@@ -174,7 +174,7 @@ public function afterTask(string $task, $tasks, Application $application = null)
174174 *
175175 * @param array<int, class-string|string>|string $tasks
176176 */
177- public function beforeTask (string $ task , $ tasks , Application $ application = null ): self
177+ public function beforeTask (string $ task , $ tasks , ? Application $ application = null ): self
178178 {
179179 if (!is_array ($ tasks )) {
180180 $ tasks = [$ tasks ];
@@ -209,7 +209,7 @@ public function defineTask(string $taskName, string $baseTask, array $options):
209209 *
210210 * @param class-string[]|string $tasks
211211 */
212- public function beforeStage (string $ stage , $ tasks , Application $ application = null ): self
212+ public function beforeStage (string $ stage , $ tasks , ? Application $ application = null ): self
213213 {
214214 $ this ->addTaskToStage ($ tasks , $ stage , $ application , 'before ' );
215215
@@ -221,7 +221,7 @@ public function beforeStage(string $stage, $tasks, Application $application = nu
221221 *
222222 * @param class-string[]|string $tasks
223223 */
224- public function afterStage (string $ stage , $ tasks , Application $ application = null ): self
224+ public function afterStage (string $ stage , $ tasks , ? Application $ application = null ): self
225225 {
226226 $ this ->addTaskToStage ($ tasks , $ stage , $ application , 'after ' );
227227
0 commit comments