Passed
Push — master ( 16e453...952352 )
by Guillaume
03:11
created
src/Workflow.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,9 +41,11 @@
 block discarded – undo
41 41
         return self::getInstance()->scriptFilter->output();
42 42
     }
43 43
 
44
-    public static function do()
44
+    public static function do {
45
+        ()
45 46
     {
46 47
         $action = getenv('timer_action');
48
+    }
47 49
 
48 50
         if ($timerId = getenv('timer_id')) {
49 51
             return Timer::$action($timerId);
Please login to merge, or discard this patch.
src/Menus/Entrance.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     {
23 23
         $serviceEnabled = Workflow::serviceEnabled();
24 24
 
25
-        if (! $serviceEnabled) {
25
+        if (!$serviceEnabled) {
26 26
             return;
27 27
         }
28 28
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
     private static function startTimer()
47 47
     {
48
-        if (! empty(Workflow::serviceEnabled())) {
48
+        if (!empty(Workflow::serviceEnabled())) {
49 49
             return Item::create()
50 50
                 ->uid('start_timer')
51 51
                 ->title('Start "' . self::userInput() . '"')
Please login to merge, or discard this patch.
src/Menus/Harvest/Setup.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,8 +35,8 @@
 block discarded – undo
35 35
     private static function credentialsFound()
36 36
     {
37 37
         return (
38
-            ! empty(Workflow::getConfig()->read('harvest.api_token'))
39
-            || ! empty(Workflow::getConfig()->read('harvest.account_id'))
38
+            !empty(Workflow::getConfig()->read('harvest.api_token'))
39
+            || !empty(Workflow::getConfig()->read('harvest.account_id'))
40 40
         );
41 41
     }
42 42
 
Please login to merge, or discard this patch.
src/Menus/Harvest/SetupState.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 
43 43
     protected static function stateSubtitle()
44 44
     {
45
-        return (self::toEnable() ? 'Other services disabled. ': '') . 'You may press enter to quit the workflow';
45
+        return (self::toEnable() ? 'Other services disabled. ' : '') . 'You may press enter to quit the workflow';
46 46
     }
47 47
 
48 48
     private static function back()
Please login to merge, or discard this patch.
src/app.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,9 @@
 block discarded – undo
5 5
 use Godbout\Alfred\Time\Workflow;
6 6
 
7 7
 if (getenv('action') === 'do') {
8
-    $result = Workflow::do();
8
+    $result = Workflow::do {
9
+        ();
10
+    }
9 11
 
10 12
     if (getenv('timer_action') !== 'exit') {
11 13
         print Workflow::notify($result);
Please login to merge, or discard this patch.
src/Services/Toggl.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
                 'created_with' => 'Alfred Time'
53 53
             ]);
54 54
 
55
-            if (! isset($timer->id)) {
55
+            if (!isset($timer->id)) {
56 56
                 return false;
57 57
             }
58 58
         } catch (Exception $e) {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         if ($timerId = $this->runningTimer()) {
68 68
             $response = $this->client->stopTimeEntry($timerId);
69 69
 
70
-            if (! isset($response->id)) {
70
+            if (!isset($response->id)) {
71 71
                 throw new Exception("Can't stop current running timer.", 1);
72 72
 
73 73
                 return false;
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     {
111 111
         $data = $this->getData();
112 112
 
113
-        if (! isset($data->$needle)) {
113
+        if (!isset($data->$needle)) {
114 114
             return [];
115 115
         }
116 116
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     private function filterOutServerwiseDeletedItemsFromData($items = [])
132 132
     {
133 133
         return array_filter($items, function ($item) {
134
-            return ! isset($item->server_deleted_at);
134
+            return !isset($item->server_deleted_at);
135 135
         });
136 136
     }
137 137
 
Please login to merge, or discard this patch.
src/Services/Everhour.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
             $timer = json_decode($response->getBody()->getContents());
82 82
 
83
-            if (! isset($timer->status) || $timer->status !== 'active') {
83
+            if (!isset($timer->status) || $timer->status !== 'active') {
84 84
                 return false;
85 85
             }
86 86
         } catch (\Exception $e) {
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
             $timer = json_decode($response->getBody()->getContents());
99 99
 
100
-            if (! isset($timer->taskTime) || $timer->status !== 'stopped') {
100
+            if (!isset($timer->taskTime) || $timer->status !== 'stopped') {
101 101
                 return false;
102 102
             }
103 103
         } catch (\Exception $e) {
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
             $timer = json_decode($response->getBody()->getContents());
116 116
 
117
-            if (! isset($timer->duration) || $timer->status !== 'active') {
117
+            if (!isset($timer->duration) || $timer->status !== 'active') {
118 118
                 return false;
119 119
             }
120 120
         } catch (\Exception $e) {
Please login to merge, or discard this patch.
src/Services/Harvest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
                 'spent_date' => date('Y-m-d')
77 77
             ]);
78 78
 
79
-            if (! isset($timer['id'])) {
79
+            if (!isset($timer['id'])) {
80 80
                 return false;
81 81
             }
82 82
         } catch (ValidationFailedException $e) {
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         if ($timerId = $this->runningTimer()) {
92 92
             $timer = $this->client->timeEntries()->stop($timerId);
93 93
 
94
-            if (! isset($timer['id'])) {
94
+            if (!isset($timer['id'])) {
95 95
                 throw new \Exception("Can't stop current running timer.", 1);
96 96
             }
97 97
 
Please login to merge, or discard this patch.