@@ -154,7 +154,7 @@ public function stop($code = 0)
154154 * @param string $controller The controller class
155155 * @return static
156156 */
157- public function controller (string $ name , string $ controller )
157+ public function controller ($ name , $ controller )
158158 {
159159 if (!$ name || !$ controller ) {
160160 throw new \InvalidArgumentException ('Parameters are not allowed to is empty! ' );
@@ -187,7 +187,7 @@ public function controllers(array $controllers)
187187 * @param string|\Closure $handler
188188 * @return $this
189189 */
190- public function command (string $ name , $ handler )
190+ public function command ($ name , $ handler )
191191 {
192192 if (!$ name || !$ handler ) {
193193 throw new \InvalidArgumentException ('Parameters are not allowed to is empty! ' );
@@ -214,7 +214,7 @@ public function commands(array $commands)
214214 /**
215215 * @return array
216216 */
217- public static function hooks (): array
217+ public static function hooks ()
218218 {
219219 return array_keys (self ::$ hooks );
220220 }
@@ -223,7 +223,7 @@ public static function hooks(): array
223223 * @param $event
224224 * @param callable $handler
225225 */
226- public function on (string $ event , callable $ handler )
226+ public function on ($ event , callable $ handler )
227227 {
228228 if (isset (self ::$ hooks [$ event ])) {
229229 self ::$ hooks [$ event ] = $ handler ;
@@ -233,7 +233,7 @@ public function on(string $event, callable $handler)
233233 /**
234234 * @return array
235235 */
236- public function getInternalCommands (): array
236+ public function getInternalCommands ()
237237 {
238238 return $ this ->internalCommands ;
239239 }
@@ -242,7 +242,7 @@ public function getInternalCommands(): array
242242 * @param $name
243243 * @return bool
244244 */
245- public function isInternalCommand (string $ name ): bool
245+ public function isInternalCommand ($ name )
246246 {
247247 return isset ($ this ->internalCommands [$ name ]);
248248 }
@@ -278,7 +278,7 @@ public function config($name, $default = null)
278278 }
279279 }
280280
281- return $ this ->config [$ name ] ?? $ default ;
281+ return isset ( $ this ->config [$ name ]) ? $ this -> config [ $ name ] : $ default ;
282282 }
283283
284284 /**
@@ -296,7 +296,7 @@ public function setConfig(array $config)
296296 * get config
297297 * @return array
298298 */
299- public function getConfig (): array
299+ public function getConfig ()
300300 {
301301 return $ this ->config ;
302302 }
@@ -305,7 +305,7 @@ public function getConfig(): array
305305 * is Debug
306306 * @return boolean
307307 */
308- public function isDebug (): bool
308+ public function isDebug ()
309309 {
310310 return (bool )$ this ->config ['debug ' ];
311311 }
@@ -314,7 +314,7 @@ public function isDebug(): bool
314314 * @param $name
315315 * @param bool $isGroup
316316 */
317- protected function checkName (string $ name , $ isGroup = false )
317+ protected function checkName ($ name , $ isGroup = false )
318318 {
319319 $ pattern = $ isGroup ? '/^[a-z][\w-]+$/ ' : '/^[a-z][\w-]*:?([a-z][\w-]+)?$/ ' ;
320320
0 commit comments