Completed
Push — 2.0 ( 76e968...4129d9 )
by Marco
13:01
created
src/Comodojo/Extender/Orm/Entities/Schedule.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     /**
137 137
      * Get cron expression of this schedule
138 138
      *
139
-     * @return string
139
+     * @return CronExpression
140 140
      */
141 141
     public function getExpression() {
142 142
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     /**
148 148
      * set cron expression for this schedule
149 149
      *
150
-     * @param srting $expression A cron-compatible expression
150
+     * @param CronExpression $expression A cron-compatible expression
151 151
      * @return Schedule
152 152
      */
153 153
     public function setExpression(CronExpression $expression) {
Please login to merge, or discard this patch.
src/Comodojo/Extender/Orm/Entities/Worklog.php 1 patch
Doc Comments   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
     /**
186 186
      * Get worklog item's parent
187 187
      *
188
-     * @return strin
188
+     * @return integer
189 189
      */
190 190
     public function getParentUid() {
191 191
 
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
      * Set associated task
223 223
      *
224 224
      * @param string $task
225
-     * @return Schedule
225
+     * @return Worklog
226 226
      */
227 227
     public function setTask($task) {
228 228
 
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
      * Set queue item's parameters
248 248
      *
249 249
      * @param TaskParameters $parameters
250
-     * @return Schedule
250
+     * @return Worklog
251 251
      */
252 252
     public function setParameters(TaskParameters $parameters) {
253 253
 
@@ -271,7 +271,6 @@  discard block
 block discarded – undo
271 271
     /**
272 272
      * Set current job status
273 273
      *
274
-     * @param string $name
275 274
      * @return Worklog
276 275
      */
277 276
     public function setStatus($status) {
Please login to merge, or discard this patch.
src/Comodojo/Extender/Queue/Manager.php 2 patches
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -38,10 +38,8 @@
 block discarded – undo
38 38
     /**
39 39
      * Class constructor
40 40
      *
41
-     * @param string $manager_name
42 41
      * @param Configuration $configuration
43 42
      * @param LoggerInterface $logger
44
-     * @param TasksTable $tasks
45 43
      * @param EventsManager $events
46 44
      * @param EntityManager $em
47 45
      */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
         $em = $this->getEntityManager();
82 82
 
83
-        foreach ($queue as $record) {
83
+        foreach ( $queue as $record ) {
84 84
             $em->remove($record);
85 85
         }
86 86
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 
107 107
         $records = [];
108 108
 
109
-        foreach ($queue as $name => $request) {
109
+        foreach ( $queue as $name => $request ) {
110 110
             $records[] = $request instanceof Request ? $this->doAddRequest($name, $request, $em) : false;
111 111
         }
112 112
 
Please login to merge, or discard this patch.
src/Comodojo/Extender/Schedule/Manager.php 2 patches
Doc Comments   -2 removed lines patch added patch discarded remove patch
@@ -41,10 +41,8 @@
 block discarded – undo
41 41
     /**
42 42
      * Class constructor
43 43
      *
44
-     * @param string $manager_name
45 44
      * @param Configuration $configuration
46 45
      * @param LoggerInterface $logger
47
-     * @param TasksTable $tasks
48 46
      * @param EventsManager $events
49 47
      * @param EntityManager $em
50 48
      */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $date = new DateTime();
99 99
         $timestamps = [];
100 100
 
101
-        foreach ($items as $schedule) {
101
+        foreach ( $items as $schedule ) {
102 102
 
103 103
             $timestamps[] = $schedule->getNextPlannedRun($date)->getTimestamp();
104 104
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
         $em = $this->getEntityManager();
114 114
 
115
-        foreach ($results as $result) {
115
+        foreach ( $results as $result ) {
116 116
 
117 117
             $id = $result->getJid();
118 118
 
Please login to merge, or discard this patch.
src/Comodojo/Extender/Schedule/Request.php 1 patch
Doc Comments   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,8 +45,6 @@  discard block
 block discarded – undo
45 45
      * Class constructor
46 46
      *
47 47
      * @param string $name
48
-     * @param string $task
49
-     * @param TaskParameters $parameters
50 48
      */
51 49
     public function __construct($name, $expression, TaskRequest $request, $description = null) {
52 50
 
@@ -68,6 +66,9 @@  discard block
 block discarded – undo
68 66
 
69 67
     }
70 68
 
69
+    /**
70
+     * @param string $name
71
+     */
71 72
     public function setName($name) {
72 73
 
73 74
         $this->name = $name;
@@ -79,7 +80,7 @@  discard block
 block discarded – undo
79 80
     /**
80 81
      * Get request associated task
81 82
      *
82
-     * @return string
83
+     * @return TaskRequest
83 84
      */
84 85
     public function getTaskRequest() {
85 86
 
@@ -117,7 +118,7 @@  discard block
 block discarded – undo
117 118
     /**
118 119
      * Get parent unique id
119 120
      *
120
-     * @return int
121
+     * @return string
121 122
      */
122 123
     public function getExpression() {
123 124
 
Please login to merge, or discard this patch.
src/Comodojo/Extender/Task/Locker.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -95,6 +95,9 @@  discard block
 block discarded – undo
95 95
 
96 96
     }
97 97
 
98
+    /**
99
+     * @param null|integer $pid
100
+     */
98 101
     public function setRunning($uid, $pid) {
99 102
 
100 103
         $request = $this->queued[$uid];
@@ -214,6 +217,9 @@  discard block
 block discarded – undo
214 217
 
215 218
     }
216 219
 
220
+    /**
221
+     * @param string $name
222
+     */
217 223
     public static function create($name, Configuration $configuration, LoggerInterface $logger) {
218 224
 
219 225
         return new Locker($name, $configuration, $logger);
Please login to merge, or discard this patch.
src/Comodojo/Extender/Task/Manager.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -428,6 +428,9 @@
 block discarded – undo
428 428
 
429 429
     }
430 430
 
431
+    /**
432
+     * @param string $message
433
+     */
431 434
     private function generateSyntheticResult($uid, $message, $success = true) {
432 435
 
433 436
         return new Result([
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -139,9 +139,9 @@  discard block
 block discarded – undo
139 139
 
140 140
         $responses = [];
141 141
 
142
-        foreach ($requests as $id => $request) {
142
+        foreach ( $requests as $id => $request ) {
143 143
 
144
-            if ($request instanceof \Comodojo\Extender\Task\Request) {
144
+            if ( $request instanceof \Comodojo\Extender\Task\Request ) {
145 145
                 $this->add($request);
146 146
                 $responses[$id] = true;
147 147
             } else {
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 
175 175
     protected function cycle() {
176 176
 
177
-        foreach ($this->locker->getQueued() as $uid => $request) {
177
+        foreach ( $this->locker->getQueued() as $uid => $request ) {
178 178
 
179 179
             if ( $this->multithread === false ) {
180 180
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 
203 203
                 if ( $this->max_childs > 0 && $this->locker->countRunning() >= $this->max_childs ) {
204 204
 
205
-                    while( $this->locker->countRunning() >= $this->max_childs ) {
205
+                    while ( $this->locker->countRunning() >= $this->max_childs ) {
206 206
 
207 207
                         $this->catcher();
208 208
 
Please login to merge, or discard this patch.
src/Comodojo/Extender/Traits/BaseEntityTrait.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      * Set queue item's id
52 52
      *
53 53
      * @param string $id
54
-     * @return Schedule
54
+     * @return BaseEntityTrait
55 55
      */
56 56
     public function setId($id) {
57 57
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      * Set queue item's name
77 77
      *
78 78
      * @param string $name
79
-     * @return Schedule
79
+     * @return BaseEntityTrait
80 80
      */
81 81
     public function setName($name) {
82 82
 
Please login to merge, or discard this patch.
src/Comodojo/Extender/Traits/BaseWorklogTrait.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      * Set queue item's id
66 66
      *
67 67
      * @param string $id
68
-     * @return Schedule
68
+     * @return BaseScheduleEntityTrait
69 69
      */
70 70
     public function setId($id) {
71 71
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      * Set queue item's name
91 91
      *
92 92
      * @param string $name
93
-     * @return Schedule
93
+     * @return BaseScheduleEntityTrait
94 94
      */
95 95
     public function setName($name) {
96 96
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      * Set associated task
116 116
      *
117 117
      * @param string $task
118
-     * @return Schedule
118
+     * @return BaseScheduleEntityTrait
119 119
      */
120 120
     public function setTask($task) {
121 121
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
      * Set queue item's parameters
141 141
      *
142 142
      * @param TaskParameters $parameters
143
-     * @return Schedule
143
+     * @return BaseScheduleEntityTrait
144 144
      */
145 145
     public function setParameters(TaskParameters $parameters) {
146 146
 
Please login to merge, or discard this patch.