From 2998562d4eac7425f2f03ddb99877e54db4f58b6 Mon Sep 17 00:00:00 2001 From: Dave Mc Nicoll Date: Wed, 1 Feb 2023 16:36:27 +0000 Subject: [PATCH] - Quickfix on changes made to add Attributes --- src/TaskFetcher.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/TaskFetcher.php b/src/TaskFetcher.php index b01489e..0b572df 100644 --- a/src/TaskFetcher.php +++ b/src/TaskFetcher.php @@ -80,9 +80,7 @@ class TaskFetcher { # Should generate an equivalent of Ulmus's object reflection here ! $objectResolver = new ObjectResolver($class, true, true, false, true); - $taskList = $objectResolver->getAnnotationListFromClassname( $this->annotations['method'], false ); - - foreach($taskList as $func => $cronard) { + foreach($objectResolver->getAnnotationListFromClassname( $this->annotations['method'], false ) as $func => $cronard) { foreach($cronard as $task) { $list[] = [ 'class' => $class, 'method' => $func, 'annotation' => $task ]; } @@ -90,7 +88,7 @@ class TaskFetcher { } - return $list; + return $list ?? []; }); }