Completed
Pull Request — develop (#229)
by ANTHONIUS
08:26
created
module/Applications/src/Applications/Controller/ConsoleController.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
                 
64 64
         echo "Generate keywords for $count applications ...\n";
65 65
         
66
-        $progress     = new ProgressBar($count);
66
+        $progress = new ProgressBar($count);
67 67
 
68 68
         /** @var PropertyToKeywords $filter */
69 69
         $filter = $services->get('filtermanager')->get('Core/Repository/PropertyToKeywords');
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
         /** @var \Applications\Entity\Application $application */
73 73
         foreach ($applications as $application) {
74
-            $progress->update($i++, 'Application ' . $i . ' / ' . $count);
74
+            $progress->update($i++, 'Application '.$i.' / '.$count);
75 75
             $keywords = $filter->filter($application);
76 76
             
77 77
             $application->setKeywords($keywords);
@@ -97,13 +97,13 @@  discard block
 block discarded – undo
97 97
     {
98 98
         $applications = $this->fetchApplications();
99 99
         $count = count($applications);
100
-        $i=0;
101
-        echo "Calculate rating for " . $count . " applications ...\n";
100
+        $i = 0;
101
+        echo "Calculate rating for ".$count." applications ...\n";
102 102
         
103 103
         $progress = new ProgressBar($count);
104 104
         /** @var  \Applications\Entity\Application $application */
105 105
         foreach ($applications as $application) {
106
-            $progress->update($i++, 'Application ' . $i . ' / ' . $count);
106
+            $progress->update($i++, 'Application '.$i.' / '.$count);
107 107
             $application->getRating(/* recalculate */ true);
108 108
         }
109 109
         $progress->update($i, 'Write to database...');
@@ -131,14 +131,14 @@  discard block
 block discarded – undo
131 131
         $documentManager = $services->get('Core/DocumentManager');
132 132
 
133 133
         $count = count($applications);
134
-        $i=0;
134
+        $i = 0;
135 135
 
136
-        echo  $count . " applications in Draft Mode and older than " . $days . " days will be deleted\n";
136
+        echo  $count." applications in Draft Mode and older than ".$days." days will be deleted\n";
137 137
 
138 138
         $progress = new ProgressBar($count);
139 139
 
140 140
         foreach ($applications as $application) {
141
-            $progress->update($i++, 'Application ' . $i . ' / ' . $count);
141
+            $progress->update($i++, 'Application '.$i.' / '.$count);
142 142
             $documentManager->remove($application);
143 143
         }
144 144
         $progress->update($i, 'clean up database');
@@ -160,17 +160,17 @@  discard block
 block discarded – undo
160 160
 
161 161
         $table->appendRow(array('Module', 'Name', 'Description'));
162 162
 
163
-        $offset=strlen(getcwd())+1;
164
-        $links="";
165
-        $github='https://github.com/cross-solution/YAWIK/blob/master/';
163
+        $offset = strlen(getcwd()) + 1;
164
+        $links = "";
165
+        $github = 'https://github.com/cross-solution/YAWIK/blob/master/';
166 166
 
167 167
         foreach ($config['view_manager']['template_map'] as $key => $absolute_filename) {
168 168
             // strip the application_root plus an additional slash
169
-            $filename=substr(realpath($absolute_filename), $offset);
169
+            $filename = substr(realpath($absolute_filename), $offset);
170 170
             if (preg_match('~module/([^/]+)~', $filename, $match)) {
171
-                $module=$match[1];
171
+                $module = $match[1];
172 172
             } else {
173
-                $module="not found ($key)";
173
+                $module = "not found ($key)";
174 174
             }
175 175
 
176 176
             $viewModel = new ViewModel();
@@ -179,17 +179,17 @@  discard block
 block discarded – undo
179 179
             $row = new Row();
180 180
             $row->appendColumn(new Column($module));
181 181
             if ($filename) {
182
-                $row->appendColumn(new Column('`' . $key . '`_'));
183
-                $links.='.. _'. $key .': '. $github.$filename .PHP_EOL;
182
+                $row->appendColumn(new Column('`'.$key.'`_'));
183
+                $links .= '.. _'.$key.': '.$github.$filename.PHP_EOL;
184 184
             } else {
185 185
                 $row->appendColumn(new Column("WRONG CONFIGURATION"));
186 186
             }
187
-            $comment="";
187
+            $comment = "";
188 188
             if (file_exists($absolute_filename)) {
189
-                $src=file_get_contents($absolute_filename);
190
-                $comment="file exists";
189
+                $src = file_get_contents($absolute_filename);
190
+                $comment = "file exists";
191 191
                 if (preg_match("/{{rtd:\s*(.*)}}/", $src, $match)) {
192
-                    $comment=$match['1'];
192
+                    $comment = $match['1'];
193 193
                 }
194 194
             }
195 195
             $row->appendColumn(new Column($comment));
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
     {
207 207
         echo "Loading applications... ";
208 208
 
209
-        $filter       = \Zend\Json\Json::decode($this->params('filter', '{}'), \Zend\Json\Json::TYPE_ARRAY);
209
+        $filter = \Zend\Json\Json::decode($this->params('filter', '{}'), \Zend\Json\Json::TYPE_ARRAY);
210 210
         $filter['$or'] = array(
211 211
             array('attachments' => array('$exists' => 1)),
212 212
             array('contact.image' => array('$exists' => 1)),
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
             return;
221 221
         }
222 222
         $progress = new ProgressBar($count);
223
-        $i=0;
223
+        $i = 0;
224 224
 
225 225
         foreach ($applications as $app) {
226 226
             $progress->update($i++, "Process $i / $count");
Please login to merge, or discard this patch.
module/Applications/src/Applications/Controller/MultimanageController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $hidden = '';
73 73
         $displayNames = array();
74 74
         foreach ($elements as $element) {
75
-            $hidden .= '<input type="hidden" name="elements[]" value="' . $element . '">';
75
+            $hidden .= '<input type="hidden" name="elements[]" value="'.$element.'">';
76 76
             $application = $repository->find($element);
77 77
             $isAllowed = $this->acl()->test($application, 'change');
78 78
             if ($isAllowed) {
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
             array(
92 92
             'ok' => true,
93 93
             'header' => $translator->translate('reject the applicants'),
94
-            'content' => '<form action="' . $actionUrl . '">' .
95
-            $hidden .
94
+            'content' => '<form action="'.$actionUrl.'">'.
95
+            $hidden.
96 96
             '<input class=" form-control " name="mail-subject" value="'
97
-                . $mailSubject . '"><br /><br />' .
97
+                . $mailSubject.'"><br /><br />'.
98 98
             '<textarea class=" form-control " id="mail-content" name="mail-content">'
99
-                . $mailText . '</textarea></form>'
99
+                . $mailText.'</textarea></form>'
100 100
             )
101 101
         );
102 102
     }
@@ -144,6 +144,6 @@  discard block
 block discarded – undo
144 144
             $repositoryService->store($application);
145 145
             unset($mail);
146 146
         }
147
-        return new JsonModel(array('ok' => true, ));
147
+        return new JsonModel(array('ok' => true,));
148 148
     }
149 149
 }
Please login to merge, or discard this patch.
module/Applications/Module.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function getConfig()
51 51
     {
52
-        return ModuleConfigLoader::load(__DIR__ . '/config');
52
+        return ModuleConfigLoader::load(__DIR__.'/config');
53 53
     }
54 54
 
55 55
     /**
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
         return array(
63 63
             'Zend\Loader\StandardAutoloader' => array(
64 64
                 'namespaces' => array(
65
-                    __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,
66
-                    __NAMESPACE__ . 'Test' => __DIR__ . '/test/' . __NAMESPACE__ .'Test',
65
+                    __NAMESPACE__ => __DIR__.'/src/'.__NAMESPACE__,
66
+                    __NAMESPACE__.'Test' => __DIR__.'/test/'.__NAMESPACE__.'Test',
67 67
                 ),
68 68
             ),
69 69
         );
Please login to merge, or discard this patch.
module/Pdf/config/module.config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
     ),
9 9
     'view_manager' => array(
10 10
         'template_map' => array(
11
-            'pdf/application/details/button' => __DIR__ . '/../view/applicationDetailsButton.phtml',
11
+            'pdf/application/details/button' => __DIR__.'/../view/applicationDetailsButton.phtml',
12 12
         )
13 13
     ),
14 14
 );
Please login to merge, or discard this patch.
module/Pdf/Module.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function getConfig()
51 51
     {
52
-        return ModuleConfigLoader::load(__DIR__ . '/config');
52
+        return ModuleConfigLoader::load(__DIR__.'/config');
53 53
     }
54 54
     
55 55
     public function setServiceManager(ServiceManager $serviceManager)
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         $eventManager->getSharedManager()->attach(
65 65
             'Applications',
66 66
             'application.detail.actionbuttons',
67
-            function ($event) {
67
+            function($event) {
68 68
                 return 'pdf/application/details/button';
69 69
             }
70 70
         );
@@ -144,9 +144,9 @@  discard block
 block discarded – undo
144 144
     {
145 145
         $file = $e->getLastFileObject();
146 146
         // assume it is of the class Core\Entity\FileEntity
147
-        $return = '<div class="col-md-3"><a href="#attachment_' . $file->getId() . '">' . $file->getName() . '</a></div>' . PHP_EOL
148
-                . '<div class="col-md-3">' . $file->getType() . '</div>'
149
-                . '<div class="col-md-3">' . $file->prettySize . '</div>';
147
+        $return = '<div class="col-md-3"><a href="#attachment_'.$file->getId().'">'.$file->getName().'</a></div>'.PHP_EOL
148
+                . '<div class="col-md-3">'.$file->getType().'</div>'
149
+                . '<div class="col-md-3">'.$file->prettySize.'</div>';
150 150
         /*
151 151
          * this snippet was for direct inserting an image into the PDF
152 152
         if ($file && $file instanceOf FileEntity && 0 === strpos($file->getType(), 'image')) {
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
         
247 247
         // the handles are for temporary files
248 248
         error_reporting(0);
249
-        foreach (array(self::RENDER_FULL, self::RENDER_WITHOUT_PDF, self::RENDER_WITHOUT_ATTACHMENTS ) as $render) {
249
+        foreach (array(self::RENDER_FULL, self::RENDER_WITHOUT_PDF, self::RENDER_WITHOUT_ATTACHMENTS) as $render) {
250 250
             $handles = array();
251 251
             try {
252 252
                 $pdf = new extern\mPDFderive();
@@ -260,8 +260,8 @@  discard block
 block discarded – undo
260 260
                     if (is_array($this->appendImage) && !empty($this->appendImage)) {
261 261
                         foreach ($this->appendImage as $imageAttachment) {
262 262
                             $content = $imageAttachment->getContent();
263
-                            $url = 'data:image/' . $imageAttachment->getType() . ';base64,' . base64_encode($content);
264
-                            $html = '<a name="attachment_' . $imageAttachment->getId() . '"><img src="' . $url . '" /><br /></a>';
263
+                            $url = 'data:image/'.$imageAttachment->getType().';base64,'.base64_encode($content);
264
+                            $html = '<a name="attachment_'.$imageAttachment->getId().'"><img src="'.$url.'" /><br /></a>';
265 265
                             $pdf->WriteHTML($html);
266 266
                         }
267 267
                     }
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
                     $pagecount = $pdf->SetSourceFile($filename);
289 289
                     for ($pages = 0; $pages < $pagecount; $pages++) {
290 290
                         $pdf->AddPage();
291
-                        $pdf->WriteHTML(' pages: ' . $pagecount);
291
+                        $pdf->WriteHTML(' pages: '.$pagecount);
292 292
                         $tx = $pdf->ImportPage($pages + 1);
293 293
                         $pdf->UseTemplate($tx);
294 294
                     }
@@ -325,18 +325,18 @@  discard block
 block discarded – undo
325 325
             $defaultSuffix = $viewTemplatePathStack->getDefaultSuffix();
326 326
             if (pathinfo($name, PATHINFO_EXTENSION) != $defaultSuffix) {
327 327
                 ;
328
-                $name .= '.pdf.' . $defaultSuffix;
328
+                $name .= '.pdf.'.$defaultSuffix;
329 329
             } else {
330 330
                 // TODO: replace Filename by Filename for PDF
331 331
             }
332 332
 
333 333
             foreach ($paths as $path) {
334
-                $file = new SplFileInfo($path . $name);
334
+                $file = new SplFileInfo($path.$name);
335 335
                 if ($file->isReadable()) {
336 336
                     // Found! Return it.
337 337
                     if (($filePath = $file->getRealPath()) === false && substr($path, 0, 7) === 'phar://') {
338 338
                         // Do not try to expand phar paths (realpath + phars == fail)
339
-                        $filePath = $path . $name;
339
+                        $filePath = $path.$name;
340 340
                         if (!file_exists($filePath)) {
341 341
                             break;
342 342
                         }
Please login to merge, or discard this patch.
module/Settings/config/module.config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         'translation_file_patterns' => array(
38 38
             array(
39 39
                 'type' => 'gettext',
40
-                'base_dir' => __DIR__ . '/../language',
40
+                'base_dir' => __DIR__.'/../language',
41 41
                 'pattern' => '%s.mo',
42 42
             ),
43 43
         ),
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
         
101 101
         // Where to look for view templates not mapped above
102 102
         'template_path_stack' => array(
103
-            __DIR__ . '/../view',
103
+            __DIR__.'/../view',
104 104
         ),
105 105
         ),
106 106
     
Please login to merge, or discard this patch.
module/Settings/src/Settings/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.
module/Settings/src/Settings/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.
src/Settings/Form/View/Helper/FormDisableElementsCapableFormSettings.php 1 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('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
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
                     unset($boxes['__all__']);
61 61
                 }
62 62
 
63
-                $markup .= '<ul class="disable-elements">' . $this->renderCheckboxes($boxes) . '</ul>';
63
+                $markup .= '<ul class="disable-elements">'.$this->renderCheckboxes($boxes).'</ul>';
64 64
             } else {
65 65
                 $markup .= $this->renderCheckbox($boxes);
66 66
             }
@@ -82,12 +82,12 @@  discard block
 block discarded – undo
82 82
         /* @var $renderer \Zend\View\Renderer\PhpRenderer */
83 83
         $renderer = $this->getView();
84 84
         if (null !== $class) {
85
-            $box->setAttribute('class', $box->getAttribute('class') . ' ' . $class);
85
+            $box->setAttribute('class', $box->getAttribute('class').' '.$class);
86 86
         }
87 87
         $markup = $renderer->formCheckbox($box);
88 88
         if ($desc = $box->getOption('description')) {
89 89
             $desc = $this->getTranslator()->translate($desc, $this->getTranslatorTextDomain());
90
-            $markup .= '<div class="alert alert-info"><p>' . $desc . '</p></div>';
90
+            $markup .= '<div class="alert alert-info"><p>'.$desc.'</p></div>';
91 91
         }
92 92
         return $markup;
93 93
     }
Please login to merge, or discard this patch.