Completed
Push — master ( dc4dd2...16100a )
by Mathias
08:39
created
module/Core/src/Controller/Console/PurgeController.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -69,13 +69,13 @@  discard block
 block discarded – undo
69 69
         }
70 70
 
71 71
         if (!$this->params('no-check')) {
72
-            $console->writeLine('Checking dependencies ... ' . PHP_EOL);
72
+            $console->writeLine('Checking dependencies ... '.PHP_EOL);
73 73
 
74 74
             $eraser = $this->plugin(EntityEraser::class);
75 75
             $counts = [];
76 76
             $totalCount = 0;
77 77
             foreach ($entities as $entity) {
78
-                $console->writeLine('    ' . $this->entityToString($entity));
78
+                $console->writeLine('    '.$this->entityToString($entity));
79 79
                 $totalCount += 1;
80 80
                 $dependencies = $eraser->checkDependencies($entity);
81 81
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
                         $entitiesCount = count($dependendEntities);
89 89
                     }
90 90
 
91
-                    $console->writeLine('        ' . $entitiesCount . ' ' . $dependencyList->getName() . ': ' . $dependencyList->getDescription());
91
+                    $console->writeLine('        '.$entitiesCount.' '.$dependencyList->getName().': '.$dependencyList->getDescription());
92 92
 
93 93
                     $totalCount += $entitiesCount;
94 94
                     if (!isset($counts[$dependencyList->getName()])) {
@@ -97,17 +97,17 @@  discard block
 block discarded – undo
97 97
                     $counts[$dependencyList->getName()] += $entitiesCount;
98 98
 
99 99
                     foreach ($dependendEntities as $dependendEntity) {
100
-                        $console->writeLine('        - ' . $this->entityToString($dependendEntity));
100
+                        $console->writeLine('        - '.$this->entityToString($dependendEntity));
101 101
                     }
102 102
                     $console->writeLine(' ');
103 103
                 }
104 104
                 $console->writeLine('');
105 105
             }
106 106
 
107
-            $console->writeLine($totalCount . ' entities affected:');
108
-            $console->writeLine('    ' . count($entities) . ' ' . $this->params('entity'));
107
+            $console->writeLine($totalCount.' entities affected:');
108
+            $console->writeLine('    '.count($entities).' '.$this->params('entity'));
109 109
             foreach ($counts as $name => $count) {
110
-                $console->writeLine('    ' . $count . ' ' . $name);
110
+                $console->writeLine('    '.$count.' '.$name);
111 111
             }
112 112
 
113 113
             $console->writeLine('');
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         $totalCount = 0;
124 124
         $counts = [];
125 125
 
126
-        $progress     = new ProgressBar(count($entities));
126
+        $progress = new ProgressBar(count($entities));
127 127
         $i = 0;
128 128
         foreach ($entities as $entity) {
129 129
             $progress->update(++$i, $entity->getId());
@@ -142,10 +142,10 @@  discard block
 block discarded – undo
142 142
 
143 143
         $progress->finish();
144 144
         $console->writeLine('');
145
-        $console->writeLine('Processed ' . $totalCount . ' entities.');
146
-        $console->writeLine('    ' . count($entities) . ' ' . $this->params('entity') . ' deleted.');
145
+        $console->writeLine('Processed '.$totalCount.' entities.');
146
+        $console->writeLine('    '.count($entities).' '.$this->params('entity').' deleted.');
147 147
         foreach ($counts as $name => $count) {
148
-            $console->writeLine('    ' . $count[0] . ' ' . $name . ' ' . $count[1]);
148
+            $console->writeLine('    '.$count[0].' '.$name.' '.$count[1]);
149 149
         }
150 150
     }
151 151
 
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         $str = get_class($entity);
193 193
 
194 194
         if ($entity instanceof \Core\Entity\IdentifiableEntityInterface) {
195
-            $str .= '( ' . $entity->getId() . ' )';
195
+            $str .= '( '.$entity->getId().' )';
196 196
         }
197 197
 
198 198
         return $str;
Please login to merge, or discard this patch.
module/Core/src/Controller/ContentController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
     public function indexAction()
29 29
     {
30 30
         $view = $this->params('view');
31
-        $view = 'content/' . $view;
31
+        $view = 'content/'.$view;
32 32
 
33 33
         $viewModel = new ViewModel();
34 34
         $viewModel->setTemplate($view);
Please login to merge, or discard this patch.
module/Core/src/Controller/FileController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $response      = $this->getResponse();
73 73
 
74 74
         try {
75
-            $repository = $this->repositories->get($module . '/' . $entityName);
75
+            $repository = $this->repositories->get($module.'/'.$entityName);
76 76
         } catch (\Exception $e) {
77 77
             $response->setStatusCode(404);
78 78
             $this->getEvent()->setParam('exception', $e);
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         
107 107
         $this->acl($file);
108 108
 
109
-        $headers=$response->getHeaders();
109
+        $headers = $response->getHeaders();
110 110
 
111 111
         $headers->addHeaderline('Content-Type', $file->getType())
112 112
             ->addHeaderline('Content-Length', $file->getLength());
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         /* @var \Core\EventManager\EventManager $events */
152 152
         $events = $this->coreFileEvents;
153 153
         $event = $events->getEvent(FileEvent::EVENT_DELETE, $this, ['file' => $file]);
154
-        $results = $events->triggerEventUntil(function ($r) {
154
+        $results = $events->triggerEventUntil(function($r) {
155 155
             return true === $r;
156 156
         }, $event);
157 157
 
Please login to merge, or discard this patch.
module/Core/src/Controller/IndexController.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
     {
132 132
         $viewModel = new ViewModel();
133 133
         $viewModel->setTemplate('error/index')
134
-                  ->setVariable('message', 'An unexpected error had occured. Please try again later.');
134
+                    ->setVariable('message', 'An unexpected error had occured. Please try again later.');
135 135
         return $viewModel;
136 136
     }
137 137
 }
Please login to merge, or discard this patch.
module/Core/src/Controller/Plugin/PaginationParams.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@
 block discarded – undo
135 135
     public function getList($namespace, $callback)
136 136
     {
137 137
         $session = new Container($namespace);
138
-        $params  = $session->params?:array();
138
+        $params  = $session->params ?: array();
139 139
         if (!$session->list) {
140 140
             $session->list = is_array($callback)
141 141
             ? call_user_func($callback, $session->params)
Please login to merge, or discard this patch.
module/Core/src/Controller/Plugin/EntityEraser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
 
112 112
         $event = $this->loadEntitiesEvents->getEvent($entity, $this, $params);
113 113
         $responses = $this->loadEntitiesEvents->triggerEventUntil(
114
-            function ($response) {
114
+            function($response) {
115 115
                 return (is_array($response) || $response instanceof \Traversable) && count($response);
116 116
             },
117 117
             $event
Please login to merge, or discard this patch.
module/Core/src/Controller/Plugin/SearchForm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,11 +72,11 @@
 block discarded – undo
72 72
     public function get($form, $options = null, $params = null)
73 73
     {
74 74
         if (!is_object($form)) {
75
-            $form             = $this->formElementManager->get($form, $options);
75
+            $form = $this->formElementManager->get($form, $options);
76 76
         }
77 77
 
78 78
         /** @noinspection PhpUndefinedMethodInspection */
79
-        $params           = $params ?: clone $this->getController()->getRequest()->getQuery();
79
+        $params = $params ?: clone $this->getController()->getRequest()->getQuery();
80 80
 
81 81
         /* I tried using form methods (bind, isValid)...
82 82
          * but because the search form could be in an invalidated state
Please login to merge, or discard this patch.
module/Core/src/Controller/Plugin/FileSender.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         }
33 33
         
34 34
         $response->getHeaders()->addHeaderline('Content-Type', $file->type)
35
-                               ->addHeaderline('Content-Length', $file->size);
35
+                                ->addHeaderline('Content-Length', $file->size);
36 36
         $response->sendHeaders();
37 37
         
38 38
         $resource = $file->getResource();
Please login to merge, or discard this patch.
module/Core/src/Controller/Plugin/Mail.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -153,18 +153,18 @@  discard block
 block discarded – undo
153 153
         $replyTo = $this->stringFromMailHeader($this->getReplyTo());
154 154
         
155 155
         return str_pad($template, 30)
156
-                . 'to: ' . str_pad($to, 50)
157
-                . 'cc: ' . str_pad($cc, 50)
158
-                . 'bcc: ' . str_pad($bcc, 50)
159
-                . 'from: ' . str_pad($from, 50)
160
-                . 'replyTo: ' . str_pad($replyTo, 50)
156
+                . 'to: '.str_pad($to, 50)
157
+                . 'cc: '.str_pad($cc, 50)
158
+                . 'bcc: '.str_pad($bcc, 50)
159
+                . 'from: '.str_pad($from, 50)
160
+                . 'replyTo: '.str_pad($replyTo, 50)
161 161
                 //. str_pad(implode(',', ArrayUtils::iteratorToArray($this->getSender())),50)
162
-                . 'subject: ' . str_pad($this->getSubject(), 50);
162
+                . 'subject: '.str_pad($this->getSubject(), 50);
163 163
     }
164 164
     
165 165
     public function template($template)
166 166
     {
167
-        $controller =  is_object($this->controller) ? get_class($this->controller):'null';
167
+        $controller = is_object($this->controller) ? get_class($this->controller) : 'null';
168 168
         
169 169
         $event = new Event();
170 170
         $eventManager = $this->eventManager;
@@ -181,11 +181,11 @@  discard block
 block discarded – undo
181 181
         $controllerIdentifier = strtolower(substr($controller, 0, strpos($controller, '\\')));
182 182
         $viewResolver = $this->viewResolver;
183 183
                 
184
-        $templateHalf = 'mail/' . $template;
184
+        $templateHalf = 'mail/'.$template;
185 185
         $resource = $viewResolver->resolve($templateHalf);
186 186
         
187 187
         if (empty($resource)) {
188
-            $templateFull = $controllerIdentifier . '/mail/' . $template;
188
+            $templateFull = $controllerIdentifier.'/mail/'.$template;
189 189
             $resource = $viewResolver->resolve($templateFull);
190 190
         }
191 191
         
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
                     unset($__vars[$key]);
213 213
                 }
214 214
             }
215
-            unset($__vars['content'],$__vars['controllerIdentifier'],$__vars['controller'],$__vars['resource'],$__vars['template'],$__vars['viewResolver']);
215
+            unset($__vars['content'], $__vars['controllerIdentifier'], $__vars['controller'], $__vars['resource'], $__vars['template'], $__vars['viewResolver']);
216 216
             $this->config = $__vars;
217 217
         }
218 218
     }
@@ -237,20 +237,20 @@  discard block
 block discarded – undo
237 237
         if (isset($this->config['from'])) {
238 238
             $from = $this->config['from'];
239 239
         } else {
240
-            $log->err('A from email address must be provided (Variable $from) in Template: ' . $template);
241
-            throw new \InvalidArgumentException('A from email address must be provided (Variable $from) in Template: ' . $template);
240
+            $log->err('A from email address must be provided (Variable $from) in Template: '.$template);
241
+            throw new \InvalidArgumentException('A from email address must be provided (Variable $from) in Template: '.$template);
242 242
         }
243 243
         if (isset($this->config['fromName'])) {
244 244
             $fromName = $this->config['fromName'];
245 245
         } else {
246
-            $log->err('A from name must be provided (Variable $fromName) in Template: ' . $template);
247
-            throw new \InvalidArgumentException('A from name must be provided (Variable $fromName) in Template: ' . $template);
246
+            $log->err('A from name must be provided (Variable $fromName) in Template: '.$template);
247
+            throw new \InvalidArgumentException('A from name must be provided (Variable $fromName) in Template: '.$template);
248 248
         }
249 249
         if (isset($this->config['subject'])) {
250 250
             $subject = $this->config['subject'];
251 251
         } else {
252
-            $log->err('A subject must be provided (Variable $subject) in Template: ' . $template);
253
-            throw new \InvalidArgumentException('A subject must be provided (Variable $subject) in Template: ' . $template);
252
+            $log->err('A subject must be provided (Variable $subject) in Template: '.$template);
253
+            throw new \InvalidArgumentException('A subject must be provided (Variable $subject) in Template: '.$template);
254 254
         }
255 255
         $this->setFrom($from, $fromName);
256 256
         $this->setSubject($subject);
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
             $erg = true;
272 272
             $log->info($this);
273 273
         } catch (\Exception $e) {
274
-            $log->err('Mail failure ' . $e->getMessage());
274
+            $log->err('Mail failure '.$e->getMessage());
275 275
         }
276 276
         return $erg;
277 277
     }
@@ -288,6 +288,6 @@  discard block
 block discarded – undo
288 288
         $viewResolver   = $container->get('ViewResolver');
289 289
         $eventManager   = $container->get('EventManager');
290 290
         $moduleManager  = $container->get('ModuleManager');
291
-        return new static($mailLog,$viewResolver,$eventManager,$moduleManager);
291
+        return new static($mailLog, $viewResolver, $eventManager, $moduleManager);
292 292
     }
293 293
 }
Please login to merge, or discard this patch.