Passed
Push — master ( 97bca0...c3d0da )
by Carsten
19:24 queued 12:32
created
module/Applications/src/Controller/ConsoleController.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
         $table = new Table(
159 159
             array('columnWidths' => array(40, 40, 40),
160
-                                 'decorator' => 'ascii')
160
+                                    'decorator' => 'ascii')
161 161
         );
162 162
 
163 163
         $table->appendRow(array('Module', 'Name', 'Description'));
@@ -238,8 +238,8 @@  discard block
 block discarded – undo
238 238
             $attachments = $app->getAttachments();
239 239
             foreach ($attachments as $attachment) {
240 240
                 $attachment->getPermissions()
241
-                           ->clear()
242
-                           ->inherit($permissions);
241
+                            ->clear()
242
+                            ->inherit($permissions);
243 243
             }
244 244
             $contact = $app->getContact();
245 245
             if ($contact) {
@@ -247,8 +247,8 @@  discard block
 block discarded – undo
247 247
 
248 248
                 if ($image) {
249 249
                     $image->getPermissions()
250
-                          ->clear()
251
-                          ->inherit($permissions);
250
+                            ->clear()
251
+                            ->inherit($permissions);
252 252
                 }
253 253
             }
254 254
         }
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                 
98 98
         echo "Generate keywords for $count applications ...\n";
99 99
         
100
-        $progress     = new ProgressBar($count);
100
+        $progress = new ProgressBar($count);
101 101
 
102 102
         /** @var \Core\Repository\Filter\PropertyToKeywords $filter */
103 103
         $filter = $this->filterManager->get('Core/Repository/PropertyToKeywords');
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 
106 106
         /** @var \Applications\Entity\Application $application */
107 107
         foreach ($applications as $application) {
108
-            $progress->update($i++, 'Application ' . $i . ' / ' . $count);
108
+            $progress->update($i++, 'Application '.$i.' / '.$count);
109 109
             $keywords = $filter->filter($application);
110 110
             
111 111
             $application->setKeywords($keywords);
@@ -131,13 +131,13 @@  discard block
 block discarded – undo
131 131
     {
132 132
         $applications = $this->fetchApplications();
133 133
         $count = count($applications);
134
-        $i=0;
135
-        echo "Calculate rating for " . $count . " applications ...\n";
134
+        $i = 0;
135
+        echo "Calculate rating for ".$count." applications ...\n";
136 136
         
137 137
         $progress = new ProgressBar($count);
138 138
         /** @var  \Applications\Entity\Application $application */
139 139
         foreach ($applications as $application) {
140
-            $progress->update($i++, 'Application ' . $i . ' / ' . $count);
140
+            $progress->update($i++, 'Application '.$i.' / '.$count);
141 141
             $application->getRating(/* recalculate */ true);
142 142
         }
143 143
         $progress->update($i, 'Write to database...');
@@ -164,14 +164,14 @@  discard block
 block discarded – undo
164 164
         $documentManager = $this->documentManager;
165 165
 
166 166
         $count = count($applications);
167
-        $i=0;
167
+        $i = 0;
168 168
 
169
-        echo  $count . " applications in Draft Mode and older than " . $days . " days will be deleted\n";
169
+        echo  $count." applications in Draft Mode and older than ".$days." days will be deleted\n";
170 170
 
171 171
         $progress = new ProgressBar($count);
172 172
 
173 173
         foreach ($applications as $application) {
174
-            $progress->update($i++, 'Application ' . $i . ' / ' . $count);
174
+            $progress->update($i++, 'Application '.$i.' / '.$count);
175 175
             try {
176 176
                 $documentManager->remove($application);
177 177
             } catch (\Exception $e) {
@@ -198,17 +198,17 @@  discard block
 block discarded – undo
198 198
 
199 199
         $table->appendRow(array('Module', 'Name', 'Description'));
200 200
 
201
-        $offset=strlen(getcwd())+1;
202
-        $links="";
203
-        $github='https://github.com/cross-solution/YAWIK/blob/master/';
201
+        $offset = strlen(getcwd()) + 1;
202
+        $links = "";
203
+        $github = 'https://github.com/cross-solution/YAWIK/blob/master/';
204 204
 
205 205
         foreach ($config['view_manager']['template_map'] as $key => $absolute_filename) {
206 206
             // strip the application_root plus an additional slash
207
-            $filename=substr(realpath($absolute_filename), $offset);
207
+            $filename = substr(realpath($absolute_filename), $offset);
208 208
             if (preg_match('~module/([^/]+)~', $filename, $match)) {
209
-                $module=$match[1];
209
+                $module = $match[1];
210 210
             } else {
211
-                $module="not found ($key)";
211
+                $module = "not found ($key)";
212 212
             }
213 213
 
214 214
             $viewModel = new ViewModel();
@@ -217,17 +217,17 @@  discard block
 block discarded – undo
217 217
             $row = new Row();
218 218
             $row->appendColumn(new Column($module));
219 219
             if ($filename) {
220
-                $row->appendColumn(new Column('`' . $key . '`_'));
221
-                $links.='.. _'. $key .': '. $github.$filename .PHP_EOL;
220
+                $row->appendColumn(new Column('`'.$key.'`_'));
221
+                $links .= '.. _'.$key.': '.$github.$filename.PHP_EOL;
222 222
             } else {
223 223
                 $row->appendColumn(new Column("WRONG CONFIGURATION"));
224 224
             }
225
-            $comment="";
225
+            $comment = "";
226 226
             if (file_exists($absolute_filename)) {
227
-                $src=file_get_contents($absolute_filename);
228
-                $comment="file exists";
227
+                $src = file_get_contents($absolute_filename);
228
+                $comment = "file exists";
229 229
                 if (preg_match("/{{rtd:\s*(.*)}}/", $src, $match)) {
230
-                    $comment=$match['1'];
230
+                    $comment = $match['1'];
231 231
                 }
232 232
             }
233 233
             $row->appendColumn(new Column($comment));
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
     {
245 245
         echo "Loading applications... ";
246 246
 
247
-        $filter       = \Zend\Json\Json::decode($this->params('filter', '{}'), \Zend\Json\Json::TYPE_ARRAY);
247
+        $filter = \Zend\Json\Json::decode($this->params('filter', '{}'), \Zend\Json\Json::TYPE_ARRAY);
248 248
         $filter['$or'] = array(
249 249
             array('attachments' => array('$exists' => 1)),
250 250
             array('contact.image' => array('$exists' => 1)),
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
             return;
259 259
         }
260 260
         $progress = new ProgressBar($count);
261
-        $i=0;
261
+        $i = 0;
262 262
 
263 263
         foreach ($applications as $app) {
264 264
             $progress->update($i++, "Process $i / $count");
Please login to merge, or discard this patch.
module/Applications/src/Paginator/JobSelectPaginator.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
         /* @var \Doctrine\ODM\MongoDB\Query\Builder $qb */
44 44
         $qb = $this->repository->createQueryBuilder();
45
-        $qb->field('title')->equals(new \MongoRegex('/' . addslashes($q) . '/i'));
45
+        $qb->field('title')->equals(new \MongoRegex('/'.addslashes($q).'/i'));
46 46
         $cursor = $qb->getQuery()->execute();
47 47
 
48 48
         $adapter = new DoctrineMongoCursor($cursor);
Please login to merge, or discard this patch.
module/Core/config/doctrine.config.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@
 block discarded – undo
26 26
 //                'driver'             => 'odm_default',
27 27
 //
28 28
 //                'generate_proxies'   => true,
29
-                  'proxy_dir'          => getcwd().'/var/cache/DoctrineMongoODMModule/Proxy',
29
+                    'proxy_dir'          => getcwd().'/var/cache/DoctrineMongoODMModule/Proxy',
30 30
 //                'proxy_namespace'    => 'DoctrineMongoODMModule\Proxy',
31 31
 //
32 32
 //                'generate_hydrators' => true,
33
-                  'hydrator_dir'       => getcwd().'/var/cache/DoctrineMongoODMModule/Hydrator',
33
+                    'hydrator_dir'       => getcwd().'/var/cache/DoctrineMongoODMModule/Hydrator',
34 34
 //                'hydrator_namespace' => 'DoctrineMongoODMModule\Hydrator',
35 35
 //
36 36
 //                'default_db'         => '',
Please login to merge, or discard this patch.
module/Core/src/Decorator/Decorator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     protected function checkObjectType($object)
58 58
     {
59 59
         if (!$object instanceof $this->objectType) {
60
-            throw new \InvalidArgumentException('Wrapped entity must be of type ' . $this->objectType);
60
+            throw new \InvalidArgumentException('Wrapped entity must be of type '.$this->objectType);
61 61
         }
62 62
     }
63 63
 }
Please login to merge, or discard this patch.
module/Core/src/Options/ImageSetOptions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
      * @var array
44 44
      */
45 45
     protected $images = [
46
-        ImageSetInterface::THUMBNAIL => [100,100],
46
+        ImageSetInterface::THUMBNAIL => [100, 100],
47 47
     ];
48 48
 
49 49
     /**
Please login to merge, or discard this patch.
module/Core/src/Options/FieldsetCustomizationOptions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
                     'attributes',
134 134
                     'options',
135 135
                     'label' => 'options',
136
-                    'required' => ['key' => ['attributes','*'], 'value' => 'required', 'if' => true],
136
+                    'required' => ['key' => ['attributes', '*'], 'value' => 'required', 'if' => true],
137 137
                     'type',
138 138
                 ]
139 139
             );
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
                 $value = $source[$key];
253 253
             }
254 254
 
255
-            $tmpTarget =& $target;
255
+            $tmpTarget = & $target;
256 256
             foreach ($targetKeys as $targetKey) {
257 257
                 if ('*' == $targetKey) {
258 258
                     $targetKey = $key;
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
                 if (!isset($tmpTarget[$targetKey])) {
261 261
                     $tmpTarget[$targetKey] = [];
262 262
                 }
263
-                $tmpTarget =& $tmpTarget[$targetKey];
263
+                $tmpTarget = & $tmpTarget[$targetKey];
264 264
             }
265 265
 
266 266
             $tmpTarget = $value;
Please login to merge, or discard this patch.
module/Core/src/Repository/DoctrineMongoODM/Types/TimezoneAwareDate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     public function closureToDatabase()
72 72
     {
73 73
         return '
74
-            /* CODE FROM: ' . __METHOD__ . ' */
74
+            /* CODE FROM: ' . __METHOD__.' */
75 75
             if (!$value instanceOf \DateTime) return null;
76 76
             $return = array(
77 77
                 "date" => new \MongoDate($value->getTimestamp()), 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     public function closureToPhp()
114 114
     {
115 115
         return '
116
-            /* CODE FROM: ' . __METHOD__ . ' */
116
+            /* CODE FROM: ' . __METHOD__.' */
117 117
             if (!is_array($value) 
118 118
                 || !isset($value["date"]) 
119 119
                 || !$value["date"] instanceOf \MongoDate
Please login to merge, or discard this patch.
src/Repository/DoctrineMongoODM/Event/GenerateSearchKeywordsListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         }
59 59
         
60 60
         
61
-        $dm         = $eventArgs->getDocumentManager();
61
+        $dm = $eventArgs->getDocumentManager();
62 62
         $uow       = $dm->getUnitOfWork();
63 63
         $changeset = $uow->getDocumentChangeset($document);
64 64
         $filter    = $this->getKeywordsFilter();
Please login to merge, or discard this patch.
Core/src/Repository/DoctrineMongoODM/Event/RepositoryEventsSubscriber.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
      */
92 92
     protected function injectAttachableEntityManager(AttachableEntityInterface $entity)
93 93
     {
94
-        if (! isset($this->attachableEntityManagerPrototype)) {
94
+        if (!isset($this->attachableEntityManagerPrototype)) {
95 95
             $this->attachableEntityManagerPrototype = new AttachableEntityManager($this->services->get('repositories'));
96 96
         }
97 97
         
Please login to merge, or discard this patch.