Completed
Push — 2.0 ( 2f2bc4...95e7c3 )
by Marco
35:36 queued 01:24
created
src/Comodojo/Extender/Task/Request.php 2 patches
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
     /**
165 165
      * Get start timestamp (microseconds)
166 166
      *
167
-     * @return float
167
+     * @return integer
168 168
      */
169 169
     public function getStartTimestamp() {
170 170
 
@@ -283,6 +283,10 @@  discard block
 block discarded – undo
283 283
 
284 284
     }
285 285
 
286
+    /**
287
+     * @param string $name
288
+     * @param string $task
289
+     */
286 290
     public static function create($name, $task, TaskParameters $parameters = null) {
287 291
 
288 292
         return new Request($name, $task, $parameters);
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 
262 262
     public function isChain() {
263 263
 
264
-        return ( $this->done !== null || $this->fail !== null || $this->pipe !== null );
264
+        return ($this->done !== null || $this->fail !== null || $this->pipe !== null);
265 265
 
266 266
     }
267 267
 
@@ -275,9 +275,9 @@  discard block
 block discarded – undo
275 275
         $message->setMaxtime($this->getMaxtime());
276 276
         $message->setParameters($this->getParameters()->export());
277 277
 
278
-        if ( $this->done !== null ) $message->onDone( $this->getOnDone()->convertToMessage() );
279
-        if ( $this->fail !== null ) $message->onFail( $this->getOnFail()->convertToMessage() );
280
-        if ( $this->pipe !== null ) $message->pipe( $this->getPipe()->convertToMessage() );
278
+        if ( $this->done !== null ) $message->onDone($this->getOnDone()->convertToMessage());
279
+        if ( $this->fail !== null ) $message->onFail($this->getOnFail()->convertToMessage());
280
+        if ( $this->pipe !== null ) $message->pipe($this->getPipe()->convertToMessage());
281 281
 
282 282
         return $message;
283 283
 
Please login to merge, or discard this patch.
src/Comodojo/Extender/Socket/SocketInjector.php 1 patch
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
         $mmanager->add(
33 33
             RpcMethod::create(
34 34
                 "scheduler.refresh",
35
-                 'Comodojo\Extender\Socket\Commands\Scheduler\Refresh::execute',
36
-                 $daemon)
35
+                    'Comodojo\Extender\Socket\Commands\Scheduler\Refresh::execute',
36
+                    $daemon)
37 37
             ->setDescription("Refresh current scheduler's schedule")
38 38
             ->setReturnType('boolean')
39 39
         );
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
         $mmanager->add(
42 42
             RpcMethod::create(
43 43
                 "scheduler.info",
44
-                 'Comodojo\Extender\Socket\Commands\Scheduler\Info::execute',
45
-                 $daemon)
44
+                    'Comodojo\Extender\Socket\Commands\Scheduler\Info::execute',
45
+                    $daemon)
46 46
             ->setDescription("Refresh current scheduler status")
47 47
             ->setReturnType('array')
48 48
         );
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
         $mmanager->add(
51 51
             RpcMethod::create(
52 52
                 "scheduler.add",
53
-                 'Comodojo\Extender\Socket\Commands\Scheduler\Add::execute',
54
-                 $daemon)
53
+                    'Comodojo\Extender\Socket\Commands\Scheduler\Add::execute',
54
+                    $daemon)
55 55
             ->setDescription("Set new schedule")
56 56
             ->addParameter('struct', 'schedule')
57 57
             ->addParameter('struct', 'request')
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
         $mmanager->add(
62 62
             RpcMethod::create(
63 63
                 "scheduler.list",
64
-                 'Comodojo\Extender\Socket\Commands\Scheduler\GetList::execute',
65
-                 $daemon)
64
+                    'Comodojo\Extender\Socket\Commands\Scheduler\GetList::execute',
65
+                    $daemon)
66 66
             ->setDescription("List all installed schedules")
67 67
             ->setReturnType('array')
68 68
         );
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
         $mmanager->add(
71 71
             RpcMethod::create(
72 72
                 "scheduler.get",
73
-                 'Comodojo\Extender\Socket\Commands\Scheduler\Get::execute',
74
-                 $daemon)
73
+                    'Comodojo\Extender\Socket\Commands\Scheduler\Get::execute',
74
+                    $daemon)
75 75
             ->setDescription("Get a schedule and related task request by id (int) or name (string)")
76 76
             ->addParameter('int', 'id')
77 77
             ->setReturnType('array')
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
         $mmanager->add(
84 84
             RpcMethod::create(
85 85
                 "scheduler.edit",
86
-                 'Comodojo\Extender\Socket\Commands\Scheduler\Edit::execute',
87
-                 $daemon)
86
+                    'Comodojo\Extender\Socket\Commands\Scheduler\Edit::execute',
87
+                    $daemon)
88 88
             ->setDescription("Edit a schedule")
89 89
             ->addParameter('struct', 'schedule')
90 90
             ->addParameter('struct', 'request')
@@ -94,8 +94,8 @@  discard block
 block discarded – undo
94 94
         $mmanager->add(
95 95
             RpcMethod::create(
96 96
                 "scheduler.disable",
97
-                 'Comodojo\Extender\Socket\Commands\Scheduler\Disable::execute',
98
-                 $daemon)
97
+                    'Comodojo\Extender\Socket\Commands\Scheduler\Disable::execute',
98
+                    $daemon)
99 99
             ->setDescription("Disable a schedule by id (int) or name (string)")
100 100
             ->addParameter('int', 'id')
101 101
             ->setReturnType('boolean')
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
         $mmanager->add(
108 108
             RpcMethod::create(
109 109
                 "scheduler.enable",
110
-                 'Comodojo\Extender\Socket\Commands\Scheduler\Enable::execute',
111
-                 $daemon)
110
+                    'Comodojo\Extender\Socket\Commands\Scheduler\Enable::execute',
111
+                    $daemon)
112 112
             ->setDescription("Enable a schedule by id (int) or name (string)")
113 113
             ->addParameter('int', 'id')
114 114
             ->setReturnType('boolean')
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
         $mmanager->add(
121 121
             RpcMethod::create(
122 122
                 "scheduler.remove",
123
-                 'Comodojo\Extender\Socket\Commands\Scheduler\Remove::execute',
124
-                 $daemon)
123
+                    'Comodojo\Extender\Socket\Commands\Scheduler\Remove::execute',
124
+                    $daemon)
125 125
             ->setDescription("Remove a schedule by id (int) or name (string)")
126 126
             ->addParameter('int', 'id')
127 127
             ->setReturnType('boolean')
@@ -137,8 +137,8 @@  discard block
 block discarded – undo
137 137
         $mmanager->add(
138 138
             RpcMethod::create(
139 139
                 "queue.info",
140
-                 'Comodojo\Extender\Socket\Commands\Queue\Info::execute',
141
-                 $daemon)
140
+                    'Comodojo\Extender\Socket\Commands\Queue\Info::execute',
141
+                    $daemon)
142 142
             ->setDescription("Get current queue status")
143 143
             ->setReturnType('array')
144 144
         );
@@ -146,8 +146,8 @@  discard block
 block discarded – undo
146 146
         $mmanager->add(
147 147
             RpcMethod::create(
148 148
                 "queue.add",
149
-                 'Comodojo\Extender\Socket\Commands\Queue\Add::execute',
150
-                 $daemon)
149
+                    'Comodojo\Extender\Socket\Commands\Queue\Add::execute',
150
+                    $daemon)
151 151
             ->setDescription("Push new request to queue")
152 152
             ->addParameter('struct', 'request')
153 153
             ->setReturnType('string')
@@ -156,8 +156,8 @@  discard block
 block discarded – undo
156 156
         $mmanager->add(
157 157
             RpcMethod::create(
158 158
                 "queue.addBulk",
159
-                 'Comodojo\Extender\Socket\Commands\Queue\AddBulk::execute',
160
-                 $daemon)
159
+                    'Comodojo\Extender\Socket\Commands\Queue\AddBulk::execute',
160
+                    $daemon)
161 161
             ->setDescription("Push new requests to queue")
162 162
             ->addParameter('array', 'requests')
163 163
             ->setReturnType('array')
@@ -170,8 +170,8 @@  discard block
 block discarded – undo
170 170
         $mmanager->add(
171 171
             RpcMethod::create(
172 172
                 "worklog.count",
173
-                 'Comodojo\Extender\Socket\Commands\Worklog\Count::execute',
174
-                 $daemon)
173
+                    'Comodojo\Extender\Socket\Commands\Worklog\Count::execute',
174
+                    $daemon)
175 175
             ->setDescription("Count recorded worklogs")
176 176
             ->setReturnType('int')
177 177
         );
@@ -179,8 +179,8 @@  discard block
 block discarded – undo
179 179
         $mmanager->add(
180 180
             RpcMethod::create(
181 181
                 "worklog.list",
182
-                 'Comodojo\Extender\Socket\Commands\Worklog\GetList::execute',
183
-                 $daemon)
182
+                    'Comodojo\Extender\Socket\Commands\Worklog\GetList::execute',
183
+                    $daemon)
184 184
             ->setDescription("Get a list of worklog according to (optional) filter")
185 185
             ->setReturnType('array')
186 186
             ->addSignature()
@@ -191,8 +191,8 @@  discard block
 block discarded – undo
191 191
         $mmanager->add(
192 192
             RpcMethod::create(
193 193
                 "worklog.byId",
194
-                 'Comodojo\Extender\Socket\Commands\Worklog\ById::execute',
195
-                 $daemon)
194
+                    'Comodojo\Extender\Socket\Commands\Worklog\ById::execute',
195
+                    $daemon)
196 196
             ->setDescription("Get a worklog from id")
197 197
             ->addParameter('int', 'id')
198 198
             ->setReturnType('struct')
@@ -201,8 +201,8 @@  discard block
 block discarded – undo
201 201
         $mmanager->add(
202 202
             RpcMethod::create(
203 203
                 "worklog.byUid",
204
-                 'Comodojo\Extender\Socket\Commands\Worklog\ByUid::execute',
205
-                 $daemon)
204
+                    'Comodojo\Extender\Socket\Commands\Worklog\ByUid::execute',
205
+                    $daemon)
206 206
             ->setDescription("Get a worklog from uid")
207 207
             ->addParameter('string', 'uid')
208 208
             ->setReturnType('struct')
@@ -211,8 +211,8 @@  discard block
 block discarded – undo
211 211
         $mmanager->add(
212 212
             RpcMethod::create(
213 213
                 "worklog.byJid",
214
-                 'Comodojo\Extender\Socket\Commands\Worklog\ByJid::execute',
215
-                 $daemon)
214
+                    'Comodojo\Extender\Socket\Commands\Worklog\ByJid::execute',
215
+                    $daemon)
216 216
             ->setDescription("Get a list of worklog from job id according to (optional) filter")
217 217
             ->addParameter('int', 'jid')
218 218
             ->setReturnType('array')
@@ -225,8 +225,8 @@  discard block
 block discarded – undo
225 225
         $mmanager->add(
226 226
             RpcMethod::create(
227 227
                 "worklog.byPid",
228
-                 'Comodojo\Extender\Socket\Commands\Worklog\ByPid::execute',
229
-                 $daemon)
228
+                    'Comodojo\Extender\Socket\Commands\Worklog\ByPid::execute',
229
+                    $daemon)
230 230
             ->setDescription("Get a list of worklog from system pid according to (optional) filter")
231 231
             ->addParameter('int', 'pid')
232 232
             ->setReturnType('array')
Please login to merge, or discard this patch.
src/Comodojo/Extender/Socket/Messages/Scheduler/Schedule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
 
73 73
     public function setEnabled($enabled) {
74 74
 
75
-        $this->enabled =  DataFilter::filterBoolean($enabled);
75
+        $this->enabled = DataFilter::filterBoolean($enabled);
76 76
 
77 77
         return $this;
78 78
 
Please login to merge, or discard this patch.
src/Comodojo/Extender/Socket/Commands/Queue/AddBulk.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
         $requests = [];
18 18
 
19 19
         try {
20
-            foreach ($messages as $message) {
20
+            foreach ( $messages as $message ) {
21 21
                 $requests[] = TaskRequest::createFromMessage(
22 22
                     TaskRequestMessage::createFromExport($message)
23 23
                 );
Please login to merge, or discard this patch.
src/Comodojo/Extender/Socket/Commands/Scheduler/Disable.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@
 block discarded – undo
17 17
         $id = $params->get('id');
18 18
         $name = $params->get('name');
19 19
 
20
-        $disable = empty($id) ? $manager->disableByName($name) :
21
-            $manager->disable($id);
20
+        $disable = empty($id) ? $manager->disableByName($name) : $manager->disable($id);
22 21
 
23 22
         $refresh = Refresh::execute($params, $daemon);
24 23
 
Please login to merge, or discard this patch.
src/Comodojo/Extender/Socket/Commands/Scheduler/Enable.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@
 block discarded – undo
17 17
         $id = $params->get('id');
18 18
         $name = $params->get('name');
19 19
 
20
-        $enable = empty($id) ? $manager->enableByName($name) :
21
-            $manager->enable($id);
20
+        $enable = empty($id) ? $manager->enableByName($name) : $manager->enable($id);
22 21
 
23 22
         $refresh = Refresh::execute($params, $daemon);
24 23
 
Please login to merge, or discard this patch.
src/Comodojo/Extender/Socket/Commands/Scheduler/Add.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
         $schedule_message = $params->get('schedule');
19 19
         $request_message = $params->get('request');
20 20
 
21
-        if (empty($schedule_message['name']) || empty($schedule_message['expression'])) {
21
+        if ( empty($schedule_message['name']) || empty($schedule_message['expression']) ) {
22 22
             throw new RpcException("Missing schedule name or invalid expression", -32600);
23 23
         }
24 24
 
Please login to merge, or discard this patch.
src/Comodojo/Extender/Socket/Commands/Scheduler/GetList.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,12 +19,12 @@
 block discarded – undo
19 19
         $schedule_messages = [];
20 20
         $schedules = $manager->getAll();
21 21
 
22
-        foreach ($schedules as $schedule) {
22
+        foreach ( $schedules as $schedule ) {
23 23
             $schedule_message = new ScheduleMessage();
24 24
             $schedule_message->setId($schedule->getId());
25 25
             $schedule_message->setName($schedule->getName());
26 26
             $schedule_message->setDescription($schedule->getDescription());
27
-            $schedule_message->setExpression((string)$schedule->getExpression());
27
+            $schedule_message->setExpression((string) $schedule->getExpression());
28 28
             $schedule_message->setEnabled($schedule->getEnabled());
29 29
             $schedule_messages[] = $schedule_message->export();
30 30
         }
Please login to merge, or discard this patch.
src/Comodojo/Extender/Socket/Commands/Scheduler/Get.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@  discard block
 block discarded – undo
19 19
         $id = $params->get('id');
20 20
         $name = $params->get('name');
21 21
 
22
-        $schedule = empty($id) ? $manager->getByName($name) :
23
-            $manager->get($id);
22
+        $schedule = empty($id) ? $manager->getByName($name) : $manager->get($id);
24 23
 
25 24
         $request = $schedule->getRequest();
26 25
 
@@ -28,7 +27,7 @@  discard block
 block discarded – undo
28 27
         $schedule_message->setId($schedule->getId());
29 28
         $schedule_message->setName($schedule->getName());
30 29
         $schedule_message->setDescription($schedule->getDescription());
31
-        $schedule_message->setExpression((string)$schedule->getExpression());
30
+        $schedule_message->setExpression((string) $schedule->getExpression());
32 31
         $schedule_message->setEnabled($schedule->getEnabled());
33 32
 
34 33
         $request_message = $request->convertToMessage();
Please login to merge, or discard this patch.