Passed
Push — master ( 97bca0...c3d0da )
by Carsten
19:24 queued 12:32
created
module/Pdf/src/Module.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,10 +40,10 @@
 block discarded – undo
40 40
     
41 41
     
42 42
     /**
43
-    * Loads module specific configuration.
44
-    *
45
-    * @return array
46
-    */
43
+     * Loads module specific configuration.
44
+     *
45
+     * @return array
46
+     */
47 47
     public function getConfig()
48 48
     {
49 49
         return ModuleConfigLoader::load(__DIR__ . '/../config');
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     */
47 47
     public function getConfig()
48 48
     {
49
-        return ModuleConfigLoader::load(__DIR__ . '/../config');
49
+        return ModuleConfigLoader::load(__DIR__.'/../config');
50 50
     }
51 51
     
52 52
     public static function factory(ServiceManager $serviceManager)
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $eventManager->getSharedManager()->attach(
63 63
             'Applications',
64 64
             'application.detail.actionbuttons',
65
-            function ($event) {
65
+            function($event) {
66 66
                 return 'pdf/application/details/button';
67 67
             }
68 68
         );
@@ -142,9 +142,9 @@  discard block
 block discarded – undo
142 142
     {
143 143
         $file = $e->getLastFileObject();
144 144
         // assume it is of the class Core\Entity\FileEntity
145
-        $return = '<div class="col-md-3"><a href="#attachment_' . $file->getId() . '">' . $file->getName() . '</a></div>' . PHP_EOL
146
-                . '<div class="col-md-3">' . $file->getType() . '</div>'
147
-                . '<div class="col-md-3">' . $file->prettySize . '</div>';
145
+        $return = '<div class="col-md-3"><a href="#attachment_'.$file->getId().'">'.$file->getName().'</a></div>'.PHP_EOL
146
+                . '<div class="col-md-3">'.$file->getType().'</div>'
147
+                . '<div class="col-md-3">'.$file->prettySize.'</div>';
148 148
         /*
149 149
          * this snippet was for direct inserting an image into the PDF
150 150
         if ($file && $file instanceOf FileEntity && 0 === strpos($file->getType(), 'image')) {
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
         
245 245
         // the handles are for temporary files
246 246
         error_reporting(0);
247
-        foreach (array(self::RENDER_FULL, self::RENDER_WITHOUT_PDF, self::RENDER_WITHOUT_ATTACHMENTS ) as $render) {
247
+        foreach (array(self::RENDER_FULL, self::RENDER_WITHOUT_PDF, self::RENDER_WITHOUT_ATTACHMENTS) as $render) {
248 248
             $handles = array();
249 249
             try {
250 250
                 $pdf = new extern\mPDFderive();
@@ -258,8 +258,8 @@  discard block
 block discarded – undo
258 258
                     if (is_array($this->appendImage) && !empty($this->appendImage)) {
259 259
                         foreach ($this->appendImage as $imageAttachment) {
260 260
                             $content = $imageAttachment->getContent();
261
-                            $url = 'data:image/' . $imageAttachment->getType() . ';base64,' . base64_encode($content);
262
-                            $html = '<a name="attachment_' . $imageAttachment->getId() . '"><img src="' . $url . '" /><br /></a>';
261
+                            $url = 'data:image/'.$imageAttachment->getType().';base64,'.base64_encode($content);
262
+                            $html = '<a name="attachment_'.$imageAttachment->getId().'"><img src="'.$url.'" /><br /></a>';
263 263
                             $pdf->WriteHTML($html);
264 264
                         }
265 265
                     }
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
                     $pagecount = $pdf->SetSourceFile($filename);
287 287
                     for ($pages = 0; $pages < $pagecount; $pages++) {
288 288
                         $pdf->AddPage();
289
-                        $pdf->WriteHTML(' pages: ' . $pagecount);
289
+                        $pdf->WriteHTML(' pages: '.$pagecount);
290 290
                         $tx = $pdf->ImportPage($pages + 1);
291 291
                         $pdf->UseTemplate($tx);
292 292
                     }
@@ -323,18 +323,18 @@  discard block
 block discarded – undo
323 323
             $defaultSuffix = $viewTemplatePathStack->getDefaultSuffix();
324 324
             if (pathinfo($name, PATHINFO_EXTENSION) != $defaultSuffix) {
325 325
                 ;
326
-                $name .= '.pdf.' . $defaultSuffix;
326
+                $name .= '.pdf.'.$defaultSuffix;
327 327
             } else {
328 328
                 // TODO: replace Filename by Filename for PDF
329 329
             }
330 330
 
331 331
             foreach ($paths as $path) {
332
-                $file = new SplFileInfo($path . $name);
332
+                $file = new SplFileInfo($path.$name);
333 333
                 if ($file->isReadable()) {
334 334
                     // Found! Return it.
335 335
                     if (($filePath = $file->getRealPath()) === false && substr($path, 0, 7) === 'phar://') {
336 336
                         // Do not try to expand phar paths (realpath + phars == fail)
337
-                        $filePath = $path . $name;
337
+                        $filePath = $path.$name;
338 338
                         if (!file_exists($filePath)) {
339 339
                             break;
340 340
                         }
Please login to merge, or discard this patch.
module/Settings/src/Form/Element/DisableElementsCapableFormSettings.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
                 $this->prepareCheckboxes($box, $prefix);
196 196
             } else {
197 197
                 /* @var $box Checkbox */
198
-                $box->setName($prefix . $box->getName());
198
+                $box->setName($prefix.$box->getName());
199 199
             }
200 200
         }
201 201
     }
@@ -232,10 +232,10 @@  discard block
 block discarded – undo
232 232
         foreach ($form as $element) {
233 233
             /* @var $element \Zend\Form\ElementInterface|DisableElementsCapableInterface|DisableCapableInterface */
234 234
             $name = $element->getName();
235
-            $elementName = $prefix . '[' . $element->getName() . ']';
235
+            $elementName = $prefix.'['.$element->getName().']';
236 236
             $options = $element->getOption('disable_capable');
237 237
             $boxOptions = array(
238
-                'long_label'  => isset($options['label']) ? $options['label'] : ($element->getLabel() ? : $name),
238
+                'long_label'  => isset($options['label']) ? $options['label'] : ($element->getLabel() ?: $name),
239 239
                 'description' => isset($options['description']) ? $options['description']
240 240
                         : 'Toggle availability of this element in the form.',
241 241
             );
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
                     $return[$name] = $this->buildCheckboxes($element, $elementName);
246 246
                 }
247 247
                 if ($element->isDisableCapable()) {
248
-                    $box = $this->createCheckbox($elementName . '[__all__]', $boxOptions);
248
+                    $box = $this->createCheckbox($elementName.'[__all__]', $boxOptions);
249 249
                     $box->setAttribute('checked', true);
250 250
                     $return[$name]['__all__'] = $box;
251 251
                 }
Please login to merge, or discard this patch.
Settings/src/Form/View/Helper/FormDisableElementsCapableFormSettings.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@
 block discarded – undo
37 37
         $headscript->appendFile($basepath('modules/Settings/js/forms.decfs.js'));
38 38
 
39 39
         return '<ul class="disable-elements-list" id="' . $element->getAttribute('id') . '-list"' . '>'
40
-               . $this->renderCheckboxes($element->getCheckboxes())
41
-               . '</ul>';
40
+                . $this->renderCheckboxes($element->getCheckboxes())
41
+                . '</ul>';
42 42
     }
43 43
 
44 44
     /**
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
         $headscript->appendFile($basepath('modules/Settings/js/forms.decfs.js'));
38 38
 
39
-        return '<ul class="disable-elements-list" id="' . $element->getAttribute('id') . '-list"' . '>'
39
+        return '<ul class="disable-elements-list" id="'.$element->getAttribute('id').'-list"'.'>'
40 40
                . $this->renderCheckboxes($element->getCheckboxes())
41 41
                . '</ul>';
42 42
     }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
                     unset($boxes['__all__']);
60 60
                 }
61 61
 
62
-                $markup .= '<ul class="disable-elements">' . $this->renderCheckboxes($boxes) . '</ul>';
62
+                $markup .= '<ul class="disable-elements">'.$this->renderCheckboxes($boxes).'</ul>';
63 63
             } else {
64 64
                 $markup .= $this->renderCheckbox($boxes);
65 65
             }
@@ -81,12 +81,12 @@  discard block
 block discarded – undo
81 81
         /* @var $renderer \Zend\View\Renderer\PhpRenderer */
82 82
         $renderer = $this->getView();
83 83
         if (null !== $class) {
84
-            $box->setAttribute('class', $box->getAttribute('class') . ' ' . $class);
84
+            $box->setAttribute('class', $box->getAttribute('class').' '.$class);
85 85
         }
86 86
         $markup = $renderer->formCheckBox($box);
87 87
         if ($desc = $box->getOption('description')) {
88 88
             $desc = $this->getTranslator()->translate($desc, $this->getTranslatorTextDomain());
89
-            $markup .= '<div class="alert alert-info"><p>' . $desc . '</p></div>';
89
+            $markup .= '<div class="alert alert-info"><p>'.$desc.'</p></div>';
90 90
         }
91 91
         return $markup;
92 92
     }
Please login to merge, or discard this patch.
module/Settings/src/Form/SettingsFieldset.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
                 $fieldset->setLabel(ucfirst($label));
103 103
             }
104 104
             $fieldset->setName($name)
105
-                     ->setObject($child);
105
+                        ->setObject($child);
106 106
             
107 107
             
108 108
             $this->add($fieldset);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             $inputLabel = isset($this->labelMap[$inputName]) ? $this->labelMap[$inputName] : $inputName;
75 75
 
76 76
             if (is_array($inputLabel)) {
77
-                $priority = isset($inputLabel[1])?$inputLabel[1]:0;
77
+                $priority = isset($inputLabel[1]) ? $inputLabel[1] : 0;
78 78
                 $inputLabel = $inputLabel[0];
79 79
             } else {
80 80
                 $priority = 0;
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
                     ),
89 89
             );
90 90
             if (is_bool($value)) {
91
-                $input['type']= 'Checkbox';
91
+                $input['type'] = 'Checkbox';
92 92
                 $input['attributes']['checked'] = $value;
93 93
             } else {
94 94
                 $input['attributes']['value'] = $value;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         foreach ($children as $name => $child) {
100 100
             $objectClass  = ltrim(get_class($settings), '\\');
101 101
             $moduleName   = substr($objectClass, 0, strpos($objectClass, '\\'));
102
-            $fieldsetName = $moduleName . '/' . ucfirst($name) . 'SettingsFieldset';
102
+            $fieldsetName = $moduleName.'/'.ucfirst($name).'SettingsFieldset';
103 103
             
104 104
             if ($this->formManager->has($fieldsetName)) {
105 105
                 $fieldset = $this->formManager->get($fieldsetName);
Please login to merge, or discard this patch.
module/Settings/src/Form/AbstractSettingsForm.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
         }
81 81
         
82 82
         $fieldset->setUseAsBaseFieldset(true)
83
-                 ->setName('base');
83
+                    ->setName('base');
84 84
         
85 85
         $fieldset->setObject($object);
86 86
         $this->add($fieldset);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         }
71 71
         $this->setAttribute('method', 'post');
72 72
         $object = $this->getObject();
73
-        $fieldsetName = $object->getModuleName() . '/SettingsFieldset';
73
+        $fieldsetName = $object->getModuleName().'/SettingsFieldset';
74 74
         
75 75
         if ($this->formManager->has($fieldsetName)) {
76 76
             $fieldset = $this->formManager->get($fieldsetName);
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         $this->add([
89 89
             'type' => 'DefaultButtonsFieldset'
90 90
         ]);
91
-        $this->isBuild=true;
91
+        $this->isBuild = true;
92 92
     }
93 93
         
94 94
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     
107 107
     public function setName($name)
108 108
     {
109
-        parent::setName(strtolower($name) . '-settings');
109
+        parent::setName(strtolower($name).'-settings');
110 110
         $urlHelper = $this->viewHelper->get('url');
111 111
         
112 112
         $url = $urlHelper('lang/settings', array('module' => $name), true);
Please login to merge, or discard this patch.
module/Settings/src/Module.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,6 +45,6 @@
 block discarded – undo
45 45
      */
46 46
     public function getConfig()
47 47
     {
48
-        return include __DIR__ . '/../config/module.config.php';
48
+        return include __DIR__.'/../config/module.config.php';
49 49
     }
50 50
 }
Please login to merge, or discard this patch.
module/Settings/src/Entity/SettingsContainer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      */
139 139
     public function __get($property)
140 140
     {
141
-        $getter = "get" . ucfirst($property);
141
+        $getter = "get".ucfirst($property);
142 142
         if (method_exists($this, $getter)) {
143 143
             return $this->$getter();
144 144
         }
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     {
160 160
         $this->checkWriteAccess();
161 161
         
162
-        $setter = 'set' . ucfirst($property);
162
+        $setter = 'set'.ucfirst($property);
163 163
         if (method_exists($this, $setter)) {
164 164
             $this->$setter($value);
165 165
             return;
Please login to merge, or discard this patch.
src/Entity/Hydrator/Strategy/DisableElementsCapableFormSettings.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 filterArrayStrings($array, $search, $replace)
58 58
     {
59 59
         $return = array();
60
-        foreach ((array)$array as $key => $value) {
60
+        foreach ((array) $array as $key => $value) {
61 61
             $key = str_replace($search, $replace, $key);
62 62
             $value = is_array($value)
63 63
                 ? $this->filterArrayStrings($value, $search, $replace)
Please login to merge, or discard this patch.
module/Settings/src/Entity/Hydrator/SettingsEntityHydrator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
         parent::__construct();
24 24
         $this->addFilter(
25 25
             'ignoreInternalProperties',
26
-            function ($property) {
26
+            function($property) {
27 27
                 return "_" != $property{0};
28 28
             }
29 29
         );
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             if (!$this->filterComposite->filter($propertyName)) {
44 44
                 continue;
45 45
             }
46
-            $getter = 'get' . ucfirst($propertyName);
46
+            $getter = 'get'.ucfirst($propertyName);
47 47
             $value = method_exists($object, $getter)
48 48
                    ? $object->$getter()
49 49
                    : $property->getValue($object);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         foreach ($data as $key => $value) {
66 66
             if (isset($reflProperties[$key])) {
67 67
                 $value  = $this->hydrateValue($key, $value);
68
-                $setter = 'set' . ucfirst($key);
68
+                $setter = 'set'.ucfirst($key);
69 69
                 if (method_exists($object, $setter)) {
70 70
                     $object->$setter($value);
71 71
                 } else {
Please login to merge, or discard this patch.