Completed
Pull Request — develop (#353)
by ANTHONIUS
06:14
created
module/Organizations/src/Organizations/Entity/Organization.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
      */
234 234
     public function getParent($returnSelf = false)
235 235
     {
236
-        return $this->parent ? : ($returnSelf ? $this : null);
236
+        return $this->parent ?: ($returnSelf ? $this : null);
237 237
     }
238 238
 
239 239
     /**
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
      */
466 466
     public function getPermissionsResourceId()
467 467
     {
468
-        return 'organization:' . $this->getId();
468
+        return 'organization:'.$this->getId();
469 469
     }
470 470
 
471 471
     /**
Please login to merge, or discard this patch.
module/Cv/src/Cv/Options/ModuleOptions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      *
35 35
      * @var array $attachmentsMimeType
36 36
      */
37
-    protected $attachmentsMimeType = array('image','applications/pdf',
37
+    protected $attachmentsMimeType = array('image', 'applications/pdf',
38 38
         'application/x-pdf',
39 39
         'application/acrobat',
40 40
         'applications/vnd.pdf',
Please login to merge, or discard this patch.
module/Applications/src/Applications/Controller/ConsoleController.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
                 
62 62
         echo "Generate keywords for $count applications ...\n";
63 63
         
64
-        $progress     = new ProgressBar($count);
64
+        $progress = new ProgressBar($count);
65 65
 
66 66
         /** @var \Core\Repository\Filter\PropertyToKeywords $filter */
67 67
         $filter = $services->get('filtermanager')->get('Core/Repository/PropertyToKeywords');
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
         /** @var \Applications\Entity\Application $application */
71 71
         foreach ($applications as $application) {
72
-            $progress->update($i++, 'Application ' . $i . ' / ' . $count);
72
+            $progress->update($i++, 'Application '.$i.' / '.$count);
73 73
             $keywords = $filter->filter($application);
74 74
             
75 75
             $application->setKeywords($keywords);
@@ -95,13 +95,13 @@  discard block
 block discarded – undo
95 95
     {
96 96
         $applications = $this->fetchApplications();
97 97
         $count = count($applications);
98
-        $i=0;
99
-        echo "Calculate rating for " . $count . " applications ...\n";
98
+        $i = 0;
99
+        echo "Calculate rating for ".$count." applications ...\n";
100 100
         
101 101
         $progress = new ProgressBar($count);
102 102
         /** @var  \Applications\Entity\Application $application */
103 103
         foreach ($applications as $application) {
104
-            $progress->update($i++, 'Application ' . $i . ' / ' . $count);
104
+            $progress->update($i++, 'Application '.$i.' / '.$count);
105 105
             $application->getRating(/* recalculate */ true);
106 106
         }
107 107
         $progress->update($i, 'Write to database...');
@@ -129,17 +129,17 @@  discard block
 block discarded – undo
129 129
         $documentManager = $services->get('Core/DocumentManager');
130 130
 
131 131
         $count = count($applications);
132
-        $i=0;
132
+        $i = 0;
133 133
 
134
-        echo  $count . " applications in Draft Mode and older than " . $days . " days will be deleted\n";
134
+        echo  $count." applications in Draft Mode and older than ".$days." days will be deleted\n";
135 135
 
136 136
         $progress = new ProgressBar($count);
137 137
 
138 138
         foreach ($applications as $application) {
139
-            $progress->update($i++, 'Application ' . $i . ' / ' . $count);
139
+            $progress->update($i++, 'Application '.$i.' / '.$count);
140 140
             try {
141 141
                 $documentManager->remove($application);
142
-            } catch (\Exception $e){
142
+            } catch (\Exception $e) {
143 143
                 // log something
144 144
                 $e->getCode();
145 145
             }
@@ -163,17 +163,17 @@  discard block
 block discarded – undo
163 163
 
164 164
         $table->appendRow(array('Module', 'Name', 'Description'));
165 165
 
166
-        $offset=strlen(getcwd())+1;
167
-        $links="";
168
-        $github='https://github.com/cross-solution/YAWIK/blob/master/';
166
+        $offset = strlen(getcwd()) + 1;
167
+        $links = "";
168
+        $github = 'https://github.com/cross-solution/YAWIK/blob/master/';
169 169
 
170 170
         foreach ($config['view_manager']['template_map'] as $key => $absolute_filename) {
171 171
             // strip the application_root plus an additional slash
172
-            $filename=substr(realpath($absolute_filename), $offset);
172
+            $filename = substr(realpath($absolute_filename), $offset);
173 173
             if (preg_match('~module/([^/]+)~', $filename, $match)) {
174
-                $module=$match[1];
174
+                $module = $match[1];
175 175
             } else {
176
-                $module="not found ($key)";
176
+                $module = "not found ($key)";
177 177
             }
178 178
 
179 179
             $viewModel = new ViewModel();
@@ -182,17 +182,17 @@  discard block
 block discarded – undo
182 182
             $row = new Row();
183 183
             $row->appendColumn(new Column($module));
184 184
             if ($filename) {
185
-                $row->appendColumn(new Column('`' . $key . '`_'));
186
-                $links.='.. _'. $key .': '. $github.$filename .PHP_EOL;
185
+                $row->appendColumn(new Column('`'.$key.'`_'));
186
+                $links .= '.. _'.$key.': '.$github.$filename.PHP_EOL;
187 187
             } else {
188 188
                 $row->appendColumn(new Column("WRONG CONFIGURATION"));
189 189
             }
190
-            $comment="";
190
+            $comment = "";
191 191
             if (file_exists($absolute_filename)) {
192
-                $src=file_get_contents($absolute_filename);
193
-                $comment="file exists";
192
+                $src = file_get_contents($absolute_filename);
193
+                $comment = "file exists";
194 194
                 if (preg_match("/{{rtd:\s*(.*)}}/", $src, $match)) {
195
-                    $comment=$match['1'];
195
+                    $comment = $match['1'];
196 196
                 }
197 197
             }
198 198
             $row->appendColumn(new Column($comment));
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
     {
210 210
         echo "Loading applications... ";
211 211
 
212
-        $filter       = \Zend\Json\Json::decode($this->params('filter', '{}'), \Zend\Json\Json::TYPE_ARRAY);
212
+        $filter = \Zend\Json\Json::decode($this->params('filter', '{}'), \Zend\Json\Json::TYPE_ARRAY);
213 213
         $filter['$or'] = array(
214 214
             array('attachments' => array('$exists' => 1)),
215 215
             array('contact.image' => array('$exists' => 1)),
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
             return;
224 224
         }
225 225
         $progress = new ProgressBar($count);
226
-        $i=0;
226
+        $i = 0;
227 227
 
228 228
         foreach ($applications as $app) {
229 229
             $progress->update($i++, "Process $i / $count");
Please login to merge, or discard this patch.
module/Applications/src/Applications/Controller/MultimanageController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $hidden = '';
71 71
         $displayNames = array();
72 72
         foreach ($elements as $element) {
73
-            $hidden .= '<input type="hidden" name="elements[]" value="' . $element . '">';
73
+            $hidden .= '<input type="hidden" name="elements[]" value="'.$element.'">';
74 74
             $application = $repository->find($element);
75 75
             $isAllowed = $this->acl()->test($application, 'change');
76 76
             if ($isAllowed) {
@@ -89,12 +89,12 @@  discard block
 block discarded – undo
89 89
             array(
90 90
             'ok' => true,
91 91
             'header' => $translator->translate('reject the applicants'),
92
-            'content' => '<form action="' . $actionUrl . '">' .
93
-            $hidden .
92
+            'content' => '<form action="'.$actionUrl.'">'.
93
+            $hidden.
94 94
             '<input class=" form-control " name="mail-subject" value="'
95
-                . $mailSubject . '"><br /><br />' .
95
+                . $mailSubject.'"><br /><br />'.
96 96
             '<textarea class=" form-control " id="mail-content" name="mail-content">'
97
-                . $mailText . '</textarea></form>'
97
+                . $mailText.'</textarea></form>'
98 98
             )
99 99
         );
100 100
     }
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
             $repositoryService->store($application);
143 143
             unset($mail);
144 144
         }
145
-        return new JsonModel(array('ok' => true, ));
145
+        return new JsonModel(array('ok' => true,));
146 146
     }
147 147
     
148 148
     /**
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      */
153 153
     public function moveAction()
154 154
     {
155
-        $ids = (array)$this->params()->fromPost('ids');
155
+        $ids = (array) $this->params()->fromPost('ids');
156 156
         $moved = 0;
157 157
         
158 158
         if ($ids) {
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/AbstractStatusEntity.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
             $name = $this->default;
83 83
         }
84 84
 
85
-        if (!isset(static::$orderMap[ $name ])) {
85
+        if (!isset(static::$orderMap[$name])) {
86 86
             throw new \InvalidArgumentException(sprintf(
87 87
                 'Unknown status name "%s" for "%s"',
88 88
                 $name, static::class
@@ -90,6 +90,6 @@  discard block
 block discarded – undo
90 90
         }
91 91
 
92 92
         $this->name  = $name;
93
-        $this->order = static::$orderMap[ $name ];
93
+        $this->order = static::$orderMap[$name];
94 94
     }
95 95
 }
96 96
\ No newline at end of file
Please login to merge, or discard this patch.
module/Cv/src/Cv/Repository/Event/UpdateFilesPermissionsSubscriber.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 {
25 25
     protected $targetDocument = Cv::class;
26 26
 
27
-    protected $filesProperties = [ 'attachments' ];
27
+    protected $filesProperties = ['attachments'];
28 28
 
29 29
     /**
30 30
      *
Please login to merge, or discard this patch.
DoctrineMongoODM/Event/AbstractUpdateFilesPermissionsSubscriber.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 
50 50
     public function getSubscribedEvents()
51 51
     {
52
-        return [ Events::onFlush ];
52
+        return [Events::onFlush];
53 53
     }
54 54
 
55 55
     /**
Please login to merge, or discard this patch.
module/Cv/src/Cv/Form/InputFilter/Education.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     {
27 27
         $this->add([
28 28
             'name' => 'endDate',
29
-            'required' => ! $data['currentIndicator']
29
+            'required' => !$data['currentIndicator']
30 30
         ]);
31 31
         
32 32
         return parent::setData($data);
Please login to merge, or discard this patch.
module/Cv/config/module.config.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
                  * for multiple paths.
16 16
                  * example https://github.com/doctrine/DoctrineORMModule
17 17
                  */
18
-                'paths' => array( __DIR__ . '/../src/Cv/Entity'),
18
+                'paths' => array(__DIR__.'/../src/Cv/Entity'),
19 19
             ),
20 20
         ),
21 21
         'eventmanager' => array(
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         'translation_file_patterns' => array(
37 37
             array(
38 38
                 'type'     => 'gettext',
39
-                'base_dir' => __DIR__ . '/../language',
39
+                'base_dir' => __DIR__.'/../language',
40 40
                 'pattern'  => '%s.mo',
41 41
             ),
42 42
         ),
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
             'resume-recruiter' => array(
167 167
                 'label' =>  /*@translate*/ 'Talent-Pool',
168 168
                 'route' => 'lang/cvs',
169
-                'active_on' => [ 'lang/cvs/edit', 'lang/cvs/view' ],
169
+                'active_on' => ['lang/cvs/edit', 'lang/cvs/view'],
170 170
                 'resource' => 'navigation/resume-recruiter',
171 171
                 'order' => 10,
172 172
                 'pages' => array(
@@ -194,15 +194,15 @@  discard block
 block discarded – undo
194 194
     
195 195
         // Map template to files. Speeds up the lookup through the template stack.
196 196
         'template_map' => array(
197
-            'cv/form/employment.view' => __DIR__ . '/../view/cv/form/employment.view.phtml',
198
-            'cv/form/employment.form' => __DIR__ . '/../view/cv/form/employment.form.phtml',
199
-            'cv/form/education.view' => __DIR__ . '/../view/cv/form/education.view.phtml',
200
-            'cv/form/education.form' => __DIR__ . '/../view/cv/form/education.form.phtml'
197
+            'cv/form/employment.view' => __DIR__.'/../view/cv/form/employment.view.phtml',
198
+            'cv/form/employment.form' => __DIR__.'/../view/cv/form/employment.form.phtml',
199
+            'cv/form/education.view' => __DIR__.'/../view/cv/form/education.view.phtml',
200
+            'cv/form/education.form' => __DIR__.'/../view/cv/form/education.form.phtml'
201 201
         ),
202 202
     
203 203
         // Where to look for view templates not mapped above
204 204
         'template_path_stack' => array(
205
-            __DIR__ . '/../view',
205
+            __DIR__.'/../view',
206 206
         ),
207 207
     ),
208 208
 
Please login to merge, or discard this patch.