Passed
Push — master ( c58a40...6d37ad )
by Mathias
10:02 queued 04:27
created
module/Core/src/Entity/FileTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -94,17 +94,17 @@
 block discarded – undo
94 94
         $size = $this->getLength();
95 95
 
96 96
         if ($size >= 1073741824) {
97
-            return round($size / 1073741824, 2) . ' GB';
97
+            return round($size / 1073741824, 2).' GB';
98 98
         }
99 99
 
100 100
         if ($size >= 1048576) {
101
-            return round($size / 1048576, 2) . ' MB';
101
+            return round($size / 1048576, 2).' MB';
102 102
         }
103 103
 
104 104
         if ($size >= 1024) {
105
-            return round($size / 1024, 2) . ' kB';
105
+            return round($size / 1024, 2).' kB';
106 106
         }
107 107
 
108
-        return (string)$size;
108
+        return (string) $size;
109 109
     }
110 110
 }
111 111
\ No newline at end of file
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
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      * Image specifications.
42 42
      */
43 43
     protected array $images = [
44
-        ImageSetInterface::THUMBNAIL => [100,100],
44
+        ImageSetInterface::THUMBNAIL => [100, 100],
45 45
     ];
46 46
 
47 47
     /**
Please login to merge, or discard this patch.
module/Core/src/Repository/SnapshotRepository.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
             'entity' => $snapshot
126 126
         ]);
127 127
         $this->dm->getEventManager()
128
-                 ->dispatchEvent(DoctrineMongoODM\Event\RepositoryEventsSubscriber::postCreate, $eventArgs);
128
+                    ->dispatchEvent(DoctrineMongoODM\Event\RepositoryEventsSubscriber::postCreate, $eventArgs);
129 129
 
130 130
         $this->copy($source, $snapshot);
131 131
 
@@ -201,12 +201,12 @@  discard block
 block discarded – undo
201 201
     public function findLatest($sourceId, $isDraft = false)
202 202
     {
203 203
         $entity = $this->createQueryBuilder()
204
-          ->field('snapshotEntity')->equals(new ObjectId($sourceId))
205
-          ->field('snapshotMeta.isDraft')->equals($isDraft)
206
-          ->sort('snapshotMeta.dateCreated.date', 'desc')
207
-          ->limit(1)
208
-          ->getQuery()
209
-          ->getSingleResult()
204
+            ->field('snapshotEntity')->equals(new ObjectId($sourceId))
205
+            ->field('snapshotMeta.isDraft')->equals($isDraft)
206
+            ->sort('snapshotMeta.dateCreated.date', 'desc')
207
+            ->limit(1)
208
+            ->getQuery()
209
+            ->getSingleResult()
210 210
         ;
211 211
         if ($entity) {
212 212
             $this->dm->getEventManager()->dispatchEvent(
Please login to merge, or discard this patch.
module/Core/src/Repository/DoctrineMongoODM/DocumentManagerFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,11 +69,11 @@
 block discarded – undo
69 69
         $proxyDir = $config->getProxyDir();
70 70
         $hydratorDir = $config->getHydratorDir();
71 71
 
72
-        if(!is_dir($proxyDir)){
72
+        if (!is_dir($proxyDir)) {
73 73
             mkdir($proxyDir, 0777, true);
74 74
         }
75 75
 
76
-        if(!is_dir($hydratorDir)){
76
+        if (!is_dir($hydratorDir)) {
77 77
             mkdir($hydratorDir, 0777, true);
78 78
         }
79 79
     }
Please login to merge, or discard this patch.
module/Core/src/Repository/DoctrineMongoODM/Types/TimezoneAwareDate.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         
56 56
         $timezone  = $value->getTimezone()->getName();
57 57
         $timestamp = $value->getTimestamp();
58
-        $date      = new UTCDateTime($timestamp*1000);
58
+        $date      = new UTCDateTime($timestamp * 1000);
59 59
         
60 60
         return array(
61 61
             'date' => $date,
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     public function closureToDatabase()
73 73
     {
74 74
         return '
75
-            /* CODE FROM: ' . __METHOD__ . ' */
75
+            /* CODE FROM: ' . __METHOD__.' */
76 76
             if (!$value instanceOf \DateTime) return null;
77 77
             $return = array(
78 78
                 "date" => new UTCDateTime($value->getTimestamp()),
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     public function closureToPhp(): string
115 115
     {
116 116
         return '
117
-            /* CODE FROM: ' . __METHOD__ . ' */
117
+            /* CODE FROM: ' . __METHOD__.' */
118 118
             if (!is_array($value) 
119 119
                 || !isset($value["date"]) 
120 120
                 || is_null($value["date"])
Please login to merge, or discard this patch.
module/Core/src/Form/RatingFieldset.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $properties = $refl->getProperties();
50 50
         
51 51
         foreach ($properties as $property) {
52
-            $name  = $property->getName();
52
+            $name = $property->getName();
53 53
 
54 54
             // @TODO: check if '-' check is necessary
55 55
             if (
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
                 continue;
60 60
             }
61 61
 
62
-            $value = $rating->{'get' . $name}();
62
+            $value = $rating->{'get'.$name}();
63 63
             $input = array(
64 64
                 'type' => 'Core/Rating',
65 65
                 'name' => $name,
Please login to merge, or discard this patch.
module/Core/src/Form/View/Helper/FormImageUpload.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,15 +33,15 @@
 block discarded – undo
33 33
         if ($file && !is_null($file->getMetadata())) {
34 34
             $metadata = $file->getMetadata();
35 35
             if (0 === strpos($metadata->getContentType(), 'image/')) {
36
-                $basepath  = $this->getView()->plugin('basepath');
37
-                $preview = '<img src="' . $basepath($file->getUri()) . '" class="img-polaroid" />';
36
+                $basepath = $this->getView()->plugin('basepath');
37
+                $preview = '<img src="'.$basepath($file->getUri()).'" class="img-polaroid" />';
38 38
             } else {
39
-                $preview = '<span>' . $file->getName() . '(' . $file->getPrettySize() . ')</span>';
39
+                $preview = '<span>'.$file->getName().'('.$file->getPrettySize().')</span>';
40 40
             }
41 41
         }
42 42
         $notice = '<div class="iu-empty-notice" style="padding: 10px; color: #d3d3d3;">
43 43
                             <div style="padding: 0px 20px 5px;"><span class="yk-icon fa-file-image-o fa-5x"></span></div>
44
-                            <small>' . $translator->translate('Click here to add an image or use drag and drop.') . '</small>
44
+                            <small>' . $translator->translate('Click here to add an image or use drag and drop.').'</small>
45 45
                             
46 46
                         </div>';
47 47
         
Please login to merge, or discard this patch.
module/Core/src/Form/View/Helper/SummaryForm.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         $renderer->headscript()->appendFile($renderer->basepath('modules/Core/js/jquery.summary-form.js'));
68 68
         
69 69
         $label = $form->getLabel();
70
-        $labelContent = $label ? '<div class="sf-headline"><h3>' . $this->getView()->translate($label) . '</h3></div>' : '';
70
+        $labelContent = $label ? '<div class="sf-headline"><h3>'.$this->getView()->translate($label).'</h3></div>' : '';
71 71
         $formContent  = $this->renderForm($form, $layout, $parameter);
72 72
         $summaryContent = $this->renderSummary($form);
73 73
         
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
     public function renderForm(SummaryFormInterface $form, $layout = Form::LAYOUT_HORIZONTAL, $parameter = array())
133 133
     {
134 134
         /* @var $form SummaryFormInterface|\Core\Form\SummaryForm */
135
-        $renderer     = $this->getView();           /* @var $renderer \Laminas\View\Renderer\PhpRenderer */
136
-        $formHelper   = $renderer->plugin('form');  /* @var $formHelper \Core\Form\View\Helper\Form */
135
+        $renderer     = $this->getView(); /* @var $renderer \Laminas\View\Renderer\PhpRenderer */
136
+        $formHelper   = $renderer->plugin('form'); /* @var $formHelper \Core\Form\View\Helper\Form */
137 137
         $fieldset     = $form->getBaseFieldset();
138 138
         $resetPartial = false;
139 139
 
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         $form->prepare();
168 168
         $baseFieldset = $form->getBaseFieldset();
169 169
         if (!isset($baseFieldset)) {
170
-            throw new \InvalidArgumentException('For the Form ' . get_class($form) . ' there is no Basefieldset');
170
+            throw new \InvalidArgumentException('For the Form '.get_class($form).' there is no Basefieldset');
171 171
         }
172 172
 
173 173
         $dataAttributesMarkup = '';
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
             }
179 179
         }
180 180
         
181
-        $markup = '<div class="panel panel-default" style="min-height: 100px;"' . $dataAttributesMarkup . '>
181
+        $markup = '<div class="panel panel-default" style="min-height: 100px;"'.$dataAttributesMarkup.'>
182 182
                     <div class="panel-body"><div class="sf-controls">%s</div>%s</div></div>';
183 183
 
184 184
         $view = $this->getView();
@@ -190,9 +190,9 @@  discard block
 block discarded – undo
190 190
                         . '</button>';
191 191
         
192 192
         if (($controlButtons = $form->getOption('control_buttons')) !== null) {
193
-            $buttonMarkup .= PHP_EOL . implode(PHP_EOL, array_map(function (array $buttonSpec) use ($view) {
194
-                return '<button type="button" class="btn btn-default btn-xs' . (isset($buttonSpec['class']) ? ' ' . $buttonSpec['class'] : '') . '">'
195
-                    . (isset($buttonSpec['icon']) ? '<span class="yk-icon yk-icon-' . $buttonSpec['icon'] . '"></span> ' : '')
193
+            $buttonMarkup .= PHP_EOL.implode(PHP_EOL, array_map(function(array $buttonSpec) use ($view) {
194
+                return '<button type="button" class="btn btn-default btn-xs'.(isset($buttonSpec['class']) ? ' '.$buttonSpec['class'] : '').'">'
195
+                    . (isset($buttonSpec['icon']) ? '<span class="yk-icon yk-icon-'.$buttonSpec['icon'].'"></span> ' : '')
196 196
                     . $view->translate($buttonSpec['label'])
197 197
                     . '</button>';
198 198
             }, $controlButtons));
@@ -232,10 +232,10 @@  discard block
 block discarded – undo
232 232
         }
233 233
 
234 234
         if ($element instanceof ViewPartialProviderInterface) {
235
-            $renderer    = $this->getView();                 /* @var $renderer \Laminas\View\Renderer\PhpRenderer */
235
+            $renderer    = $this->getView(); /* @var $renderer \Laminas\View\Renderer\PhpRenderer */
236 236
             $origPartial = $element->getViewPartial();
237 237
             $partial     = "$origPartial.view";
238
-            $partialParams  = array(
238
+            $partialParams = array(
239 239
                 'element' => $element
240 240
             );
241 241
             if (!$renderer->resolver($partial)) {
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
         
252 252
         if ($element instanceof FieldsetInterface) {
253 253
             if (!$element instanceof FormInterface && $label) {
254
-                $markup .= '<h4>' . $label . '</h4>';
254
+                $markup .= '<h4>'.$label.'</h4>';
255 255
             }
256 256
             foreach ($element as $el) {
257 257
                 $markup .= $this->renderSummaryElement($el);
@@ -283,11 +283,11 @@  discard block
 block discarded – undo
283 283
                             }
284 284
 
285 285
                             $optGroupLabel = isset($optVal['label']) ? $translator->translate($optVal['label']) : $optKey;
286
-                            $multiOptions[] = $optGroupLabel . ' | ' . $translator->translate($optVal['options'][$optionKey]);
286
+                            $multiOptions[] = $optGroupLabel.' | '.$translator->translate($optVal['options'][$optionKey]);
287 287
                         }
288 288
                     }
289 289
 
290
-                    $elementValue = '<ul><li>' . join('</li><li>', $multiOptions) . '</li></ul>';
290
+                    $elementValue = '<ul><li>'.join('</li><li>', $multiOptions).'</li></ul>';
291 291
                 } else {
292 292
                     $elementValue = $translator->translate($options[$elementValue]);
293 293
                 }
@@ -301,13 +301,13 @@  discard block
 block discarded – undo
301 301
         $markup .= '<div class="row">';
302 302
         $col = 12;
303 303
         if ($label) {
304
-            $markup .= '<div class="col-md-3 yk-label"><label>' . $label . '</label></div>';
304
+            $markup .= '<div class="col-md-3 yk-label"><label>'.$label.'</label></div>';
305 305
             $col = 9;
306 306
         }
307
-        if(is_array($elementValue)){
307
+        if (is_array($elementValue)) {
308 308
             $elementValue = implode(",", $elementValue);
309 309
         }
310
-        $markup .= '<div class="col-md-' . $col . '">' . $elementValue . '</div>'
310
+        $markup .= '<div class="col-md-'.$col.'">'.$elementValue.'</div>'
311 311
             . '</div>';
312 312
         return $markup;
313 313
     }
Please login to merge, or discard this patch.
module/Auth/test/AuthTest/Controller/ForgotPasswordControllerTest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -195,7 +195,7 @@
 block discarded – undo
195 195
             ->method('isValid')
196 196
             ->willReturn(true);
197 197
 
198
-       $result = $this->controller->dispatch($request);
198
+        $result = $this->controller->dispatch($request);
199 199
 
200 200
         $expected = array(
201 201
             'form' => $this->formMock
Please login to merge, or discard this patch.