Random cleanup
authorCameron Ball <cameron@cameron1729.xyz>
Sun, 6 Jan 2019 18:34:00 +0000 (02:34 +0800)
committerCameron Ball <cameron@cameron1729.xyz>
Sun, 6 Jan 2019 18:34:20 +0000 (02:34 +0800)
src/goodnight.php
src/purjolok.php
src/tasks.php
src/unfinished.php

index f3ce616..e34a154 100644 (file)
@@ -15,7 +15,7 @@ array_filter(
     ),
     function($forecast) {
         $forecastDayLocal = DateTimeImmutable::createFromMutable($forecast->time->from)->setTimezone(new DateTimeZone('Australia/Perth'));
-        return (int)(new DateTimeImmutable())->format('d') + 1 == (int)$forecastDayLocal->format('d');
+        return (int)(new DateTimeImmutable)->format('d') + 1 == (int)$forecastDayLocal->format('d');
     }
 )));
 
index dcc2eac..94cc011 100644 (file)
@@ -16,7 +16,7 @@ if(getTelegram()->getWebHookUpdates()->get('message') && !canChatWith(getTelegra
 $message = getTelegram()->getWebHookUpdates()->get('message') ? getTelegram()->getWebHookUpdates()->get('message')->get('text') : '';
 
 if ($between = between(reveal($message ?? ''), '[taskid]')) {
-    $monday = turnBackTime(new DateTimeImmutable());
+    $monday = turnBackTime(new DateTimeImmutable);
     $completedTasksFile = getFilePathForWeek($monday->year, $monday->month, $monday->weekNum);
     $completedTasks = file_exists($completedTasksFile) ? lines(trim(file_get_contents($completedTasksFile))) : [];
     $tasksForTheWeek = getTasksForTheWeek(
@@ -225,7 +225,7 @@ getTelegram()->addCommand(
         protected $description = 'List tasks for this week';
 
         public function handle($arguments) {
-            $monday = turnBackTime(new DateTimeImmutable());
+            $monday = turnBackTime(new DateTimeImmutable);
             $tasksForTheWeek = getTasksForTheWeek(
                 $monday->year,
                 $monday->month,
index 42c0f7c..94a8e37 100644 (file)
@@ -3,7 +3,7 @@
 require_once('common.php');
 
 $taskMatrix = require 'taskMatrix.php';
-$monday = turnBackTime(new DateTimeImmutable());
+$monday = turnBackTime(new DateTimeImmutable);
 
 $taskLists = array_merge(
     isStartOfSeason($monday->month, $monday->dayNum) ? [unlines(map(getString)(getTasksForTheSeason($monday->season, $taskMatrix)))] : [],
index 5e3a02c..890e0bf 100644 (file)
@@ -3,7 +3,7 @@
 require_once('common.php');
 
 $taskMatrix = require 'taskMatrix.php';
-$monday = turnBackTime(new DateTimeImmutable());
+$monday = turnBackTime(new DateTimeImmutable);
 
 $extractTasks = function($tasks, $path) {
     return array_merge($tasks, file_exists($path) ? lines(trim(file_get_contents($path))) : []);