Add constant for path to tasks files
[SonOfLokstallBot.git] / src / unfinished.php
index 890e0bf..27d6c1a 100644 (file)
@@ -15,20 +15,20 @@ $unfinishedForYear = array_diff(
              return getTasksForTheSeason($season, $taskMatrix);
          }
      )(['summer', 'autumn', 'winter', 'spring'])),
-     array_reduce(getFilePathsForYear($monday->year), $extractTasks, [])
+     array_reduce(getFilePathsForYear($monday->year, PATH_TO_TASKS_FILES), $extractTasks, [])
 );
 
 $unfinishedForSeason = array_diff(
     getTasksForTheSeason($monday->season, $taskMatrix),
-    array_reduce(getFilePathsForSeason($monday->year, $monday->season), $extractTasks, [])
+    array_reduce(getFilePathsForSeason($monday->year, $monday->season, PATH_TO_TASKS_FILES), $extractTasks, [])
 );
 
 $unfinishedForMonth = array_diff(
     getTasksForTheMonth($monday->month, $taskMatrix),
-    array_reduce(getFilePathsForMonth($monday->year, $monday->month), $extractTasks, [])
+    array_reduce(getFilePathsForMonth($monday->year, $monday->month, PATH_TO_TASKS_FILES), $extractTasks, [])
 );
 
-$filePathForWeek = getFilePathForWeek($monday->year, $monday->month, $monday->weekNum);
+$filePathForWeek = getFilePathForWeek($monday->year, $monday->month, $monday->weekNum, PATH_TO_TASKS_FILES);
 $unfinishedForWeek = array_diff(
     getTasksForTheWeek($monday->year, $monday->month, $monday->weekNum, $taskMatrix),
     file_exists($filePathForWeek) ? lines(trim(file_get_contents($filePathForWeek))) : []