Completed
Pull Request — develop (#236)
by ANTHONIUS
08:24
created
config/config.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -16,17 +16,17 @@
 block discarded – undo
16 16
     $modules = array('Install');
17 17
 } else {
18 18
     $modules = array(
19
-             'DoctrineModule',
20
-             'DoctrineMongoODMModule',
21
-             'Core',
22
-             'Auth',
23
-             'Cv',
24
-             'Applications',
25
-             'Jobs',
26
-             'Settings',
27
-             'Pdf',
28
-             'Geo',
29
-             'Organizations',
19
+                'DoctrineModule',
20
+                'DoctrineMongoODMModule',
21
+                'Core',
22
+                'Auth',
23
+                'Cv',
24
+                'Applications',
25
+                'Jobs',
26
+                'Settings',
27
+                'Pdf',
28
+                'Geo',
29
+                'Organizations',
30 30
         );
31 31
 
32 32
     if (!isset($allModules)) {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 $env = getenv('APPLICATION_ENV') ?: 'production';
14 14
 
15
-if (!file_exists(__DIR__ . '/autoload/yawik.config.global.php')) {
15
+if (!file_exists(__DIR__.'/autoload/yawik.config.global.php')) {
16 16
     $modules = array('Install');
17 17
 } else {
18 18
     $modules = array(
@@ -34,12 +34,12 @@  discard block
 block discarded – undo
34 34
         // kann und über Server-Variablen oder ähnlichen steuern kann
35 35
         $allModules = False;
36 36
     }
37
-    foreach (glob(__DIR__ . '/autoload/*.module.php') as $moduleFile) {
37
+    foreach (glob(__DIR__.'/autoload/*.module.php') as $moduleFile) {
38 38
         $addModules = require $moduleFile;
39 39
         foreach ($addModules as $addModule) {
40 40
             if (strpos($addModule, '-') === 0) {
41
-                $remove = substr($addModule,1);
42
-                $modules = array_filter($modules, function ($elem) use ($remove) { return strcasecmp($elem,$remove); });
41
+                $remove = substr($addModule, 1);
42
+                $modules = array_filter($modules, function($elem) use ($remove) { return strcasecmp($elem, $remove); });
43 43
             }
44 44
             else {
45 45
                 if (!in_array($addModule, $modules)) {
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     ),
93 93
 );
94 94
 
95
-$envConfigFile = __DIR__ . '/config.' . $env . '.php';
95
+$envConfigFile = __DIR__.'/config.'.$env.'.php';
96 96
 if (file_exists($envConfigFile)) {
97 97
     if (is_readable($envConfigFile)) {
98 98
         $envConfig = include $envConfigFile;
Please login to merge, or discard this patch.
module/Applications/Module.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,10 +35,10 @@
 block discarded – undo
35 35
             'applications list'             => 'list view scripts.',
36 36
             'applications reset-files-permissions [--filter=]' => 'Resets (means: Set again) the permissions of attachments and contact images',
37 37
             array('--filter=JSON', "available keys:\n"
38
-                                   . "- before    ISODate   only applications before the given date\n"
39
-                                   . "- after     ISODate   only applications after the given date\n"
40
-                                   . "- id        String    Mongo ID of the application\n"
41
-                                   . "- isDraft   Boolean   "),
38
+                                    . "- before    ISODate   only applications before the given date\n"
39
+                                    . "- after     ISODate   only applications after the given date\n"
40
+                                    . "- id        String    Mongo ID of the application\n"
41
+                                    . "- isDraft   Boolean   "),
42 42
         );
43 43
     }
44 44
     
Please login to merge, or discard this 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/Applications/src/Applications/Controller/ConsoleController.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
         $table = new Table(
159 159
             array('columnWidths' => array(40, 40, 40),
160
-                                 'decorator' => 'ascii')
160
+                                    'decorator' => 'ascii')
161 161
         );
162 162
 
163 163
         $table->appendRow(array('Module', 'Name', 'Description'));
@@ -238,8 +238,8 @@  discard block
 block discarded – undo
238 238
             $attachments = $app->getAttachments();
239 239
             foreach ($attachments as $attachment) {
240 240
                 $attachment->getPermissions()
241
-                           ->clear()
242
-                           ->inherit($permissions);
241
+                            ->clear()
242
+                            ->inherit($permissions);
243 243
             }
244 244
             $contact = $app->getContact();
245 245
             if ($contact) {
@@ -247,8 +247,8 @@  discard block
 block discarded – undo
247 247
 
248 248
                 if ($image) {
249 249
                     $image->getPermissions()
250
-                          ->clear()
251
-                          ->inherit($permissions);
250
+                            ->clear()
251
+                            ->inherit($permissions);
252 252
                 }
253 253
             }
254 254
         }
Please login to merge, or discard this 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/Entity/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -446,7 +446,7 @@
 block discarded – undo
446 446
     public function getCv()
447 447
     {
448 448
         if (is_null($this->cv)) {
449
-            $this->cv= new Cv();
449
+            $this->cv = new Cv();
450 450
         }
451 451
         return $this->cv;
452 452
     }
Please login to merge, or discard this patch.
module/Applications/src/Applications/Entity/StatusInterface.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     /**
21 21
      * A new application has been received
22 22
      */
23
-    const INCOMING  = 'incoming';
23
+    const INCOMING = 'incoming';
24 24
 
25 25
     /**
26 26
      * An acknowledgement of receipt has been sent
@@ -30,12 +30,12 @@  discard block
 block discarded – undo
30 30
     /**
31 31
      * An applicant ist invited to in interview
32 32
      */
33
-    const INVITED   = 'invited';
33
+    const INVITED = 'invited';
34 34
 
35 35
     /**
36 36
      * The applicant has been canceled
37 37
      */
38
-    const REJECTED  = 'rejected';
38
+    const REJECTED = 'rejected';
39 39
     
40 40
     public function __construct($status = self::INCOMING);
41 41
 
Please login to merge, or discard this patch.
module/Applications/src/Applications/Form/Base.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
      * @var string
26 26
      */
27
-    protected $label        = /*@translate*/ 'Cover Letter';
27
+    protected $label = /*@translate*/ 'Cover Letter';
28 28
     
29 29
     /**
30 30
      * {@inheritDoc}
Please login to merge, or discard this patch.
module/Applications/src/Applications/Mail/NewApplication.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
      */
96 96
     public function setUser($user)
97 97
     {
98
-        $this->user=$user;
98
+        $this->user = $user;
99 99
         return $this;
100 100
     }
101 101
 
Please login to merge, or discard this patch.
module/Applications/src/Applications/Options/ModuleOptions.php 2 patches
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.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
 
80 80
     protected $workflow = [
81 81
 
82
-      'recruiter',
82
+        'recruiter',
83 83
     ];
84 84
 
85 85
     /**
Please login to merge, or discard this patch.
module/Applications/src/Applications/Repository/Application.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -128,8 +128,8 @@
 block discarded – undo
128 128
      */
129 129
     public function loadUnreadApplicationsForJob($job)
130 130
     {
131
-        $auth=$this->getService('AuthenticationService');
132
-        $qb=$this->createQueryBuilder()
131
+        $auth = $this->getService('AuthenticationService');
132
+        $qb = $this->createQueryBuilder()
133 133
                   ->field("readBy")->notIn(array($auth->getUser()->id))
134 134
                   ->field("job")->equals(new \MongoId($job->id));
135 135
         return $qb->getQuery()->execute();
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -98,9 +98,9 @@  discard block
 block discarded – undo
98 98
     {
99 99
         $qb = $this->getPaginationQueryBuilder($params);
100 100
         $cursor = $qb->hydrate(false)
101
-                     ->select('_id')
102
-                     ->getQuery()
103
-                     ->execute();
101
+                        ->select('_id')
102
+                        ->getQuery()
103
+                        ->execute();
104 104
         
105 105
         $list = new PaginationList(array_keys(ArrayUtils::iteratorToArray($cursor)));
106 106
         return $list;
@@ -129,8 +129,8 @@  discard block
 block discarded – undo
129 129
     {
130 130
         $auth=$this->getService('AuthenticationService');
131 131
         $qb=$this->createQueryBuilder()
132
-                  ->field("readBy")->notIn(array($auth->getUser()->id))
133
-                  ->field("job")->equals(new \MongoId($job->id));
132
+                    ->field("readBy")->notIn(array($auth->getUser()->id))
133
+                    ->field("job")->equals(new \MongoId($job->id));
134 134
         return $qb->getQuery()->execute();
135 135
     }
136 136
 
Please login to merge, or discard this patch.