From 5836521686b8e80b3901779f105069ce73569a57 Mon Sep 17 00:00:00 2001 From: Maxime St-Pierre Date: Thu, 1 Feb 2018 10:00:10 -0500 Subject: [PATCH] Add refactoring for Asana.class --- lib/thirdparty/Asana.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/thirdparty/Asana.class.php b/lib/thirdparty/Asana.class.php index a7b7c000..b6f7b88d 100644 --- a/lib/thirdparty/Asana.class.php +++ b/lib/thirdparty/Asana.class.php @@ -49,7 +49,7 @@ class Asana 'group' => $tagLabel, 'project_id' => $projectId, 'assignee' => $fullTask['assignee'] ? ucwords($fullTask['assignee']['name']) : '', - 'quarter_date' => 'Q' . self::dateToQuarter($fullTask['due_on']) . ' ' . (string) date('Y', strtotime($fullTask['due_on'])) + 'quarter_date' => 'Q' . static::dateToQuarter($fullTask['due_on']) . ' ' . (string) date('Y', strtotime($fullTask['due_on'])) ]; } } @@ -94,7 +94,7 @@ class Asana // Converts date to quarter protected static function dateToQuarter($date) { - return $quarter = (string)ceil(date('m', strtotime($date))/3); + return (string)ceil(date('m', strtotime($date))/3); } }