Completed
Push — develop ( 9659b8...659b85 )
by Mathias
13:02
created
module/Jobs/src/Jobs/Controller/ConsoleController.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
         }
56 56
 
57 57
         $date = new \DateTime('today');
58
-        $date->sub(new \DateInterval('P' . $days . 'D'));
58
+        $date->sub(new \DateInterval('P'.$days.'D'));
59 59
 
60
-        $query        = [
60
+        $query = [
61 61
             '$and' => [
62 62
                 ['status.name' => StatusInterface::ACTIVE],
63 63
                 ['$or' => [
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
         $offset = 0;
75 75
         if ($limit && false !== strpos($limit, ',')) {
76
-            list($limit,$offset) = explode(',', $limit);
76
+            list($limit, $offset) = explode(',', $limit);
77 77
         }
78 78
 
79 79
         $jobs = $jobsRepo->findBy($query, null, (int) $limit, (int) $offset);
@@ -84,9 +84,9 @@  discard block
 block discarded – undo
84 84
         }
85 85
 
86 86
         if ($info) {
87
-            echo count($jobs) , ' Jobs';
88
-            if ($offset) { echo ' starting from ' . $offset; }
89
-            echo PHP_EOL . PHP_EOL;
87
+            echo count($jobs), ' Jobs';
88
+            if ($offset) { echo ' starting from '.$offset; }
89
+            echo PHP_EOL.PHP_EOL;
90 90
             $this->listExpiredJobs($jobs);
91 91
             return;
92 92
         }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 //
98 98
         echo "$count jobs found, which have to expire ...\n";
99 99
         
100
-        $progress     = new ProgressBar(
100
+        $progress = new ProgressBar(
101 101
             new ConsoleAdapter(
102 102
                 array(
103 103
                 'elements' => array(
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
         /* @var \Jobs\Entity\Job $job */
122 122
         foreach ($jobs as $job) {
123
-            $progress->update($i++, 'Job ' . $i . ' / ' . $count);
123
+            $progress->update($i++, 'Job '.$i.' / '.$count);
124 124
 
125 125
             $job->changeStatus('expired');
126 126
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         $i            = 0;
149 149
         /* @var Job $job */
150 150
         foreach ($jobs as $job) {
151
-            $progress->update($i++, 'Job ' . $i . ' / ' . $count);
151
+            $progress->update($i++, 'Job '.$i.' / '.$count);
152 152
             
153 153
             $permissions = $job->getPermissions();
154 154
             $user        = $job->getUser();
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
                 continue;
157 157
             }
158 158
             try {
159
-                $group       = $user->getGroup($job->getCompany());
159
+                $group = $user->getGroup($job->getCompany());
160 160
             } catch (\Exception $e) {
161 161
                 continue;
162 162
             }
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
                 $org = $job->getCompany();
196 196
             }
197 197
             printf(
198
-                '%s   %s   %s   %-30s   %-20s' . PHP_EOL,
198
+                '%s   %s   %s   %-30s   %-20s'.PHP_EOL,
199 199
                 $id,
200 200
                 $job->getDatePublishStart()->format('Y-m-d'),
201 201
                 $job->getDatePublishEnd()->format('Y-m-d'),
@@ -203,6 +203,6 @@  discard block
 block discarded – undo
203 203
                 substr($org, 0, 20)
204 204
             );
205 205
         }
206
-        return count($jobs) . ' Jobs.';
206
+        return count($jobs).' Jobs.';
207 207
     }
208 208
 }
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Entity/Job.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -513,10 +513,10 @@  discard block
 block discarded – undo
513 513
     public function getLocation()
514 514
     {
515 515
         if (null === $this->location) {
516
-            $array=[];
517
-            if(null != $this->locations){
516
+            $array = [];
517
+            if (null != $this->locations) {
518 518
                 foreach ($this->locations as $location) { /* @var \Core\Entity\LocationInterface $location */
519
-                    $array[]=(string) $location;
519
+                    $array[] = (string) $location;
520 520
                 }
521 521
                 return implode(', ', $array);
522 522
             }
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
             if ($removePermissions) {
572 572
                 $this->getPermissions()->revoke($this->user, Permissions::PERMISSION_ALL);
573 573
             }
574
-            $this->user=null;
574
+            $this->user = null;
575 575
         }
576 576
 
577 577
         return $this;
@@ -579,8 +579,8 @@  discard block
 block discarded – undo
579 579
 
580 580
     public function unsetOrganization($removePermissions = true)
581 581
     {
582
-        if($this->organization && $removePermissions){
583
-            $this->getPermissions()->revoke($this->organization,Permissions::PERMISSION_ALL);
582
+        if ($this->organization && $removePermissions) {
583
+            $this->getPermissions()->revoke($this->organization, Permissions::PERMISSION_ALL);
584 584
         }
585 585
 
586 586
         $this->organization = null;
@@ -832,7 +832,7 @@  discard block
 block discarded – undo
832 832
         $organization = $this->organization;
833 833
         if (is_object($organization) && $organization->getImage()) {
834 834
             $organizationImage = $organization->getImage();
835
-            return "/file/Organizations.OrganizationImage/" . $organizationImage->getId();
835
+            return "/file/Organizations.OrganizationImage/".$organizationImage->getId();
836 836
         }
837 837
         return $this->logoRef;
838 838
     }
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Controller/ApiJobListByOrganizationController.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
             $response->setStatusCode(Response::STATUS_CODE_404);
42 42
             return $response;
43 43
         }
44
-        $jsonModel=new JsonModel();
44
+        $jsonModel = new JsonModel();
45 45
         $jsonModel->setVariables($this->apiJobDehydrator->dehydrateList($jobs));
46 46
         $jsonModel->setJsonpCallback($callback);
47 47
 
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Model/ApiJobDehydrator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
             'title' => $job->getTitle(),
64 64
             'location' => $job->getLocation(),
65 65
             'link' => $this->jobUrl->__invoke(
66
-                $job,[
66
+                $job, [
67 67
                   'linkOnly'=> true,
68 68
                   'absolute' => true,
69 69
                 ]
Please login to merge, or discard this patch.
module/Organizations/config/module.config.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
                 ],
14 14
             ],
15 15
             'annotation' => [
16
-                'paths' => [ __DIR__ . '/../src/Organizations/Entity']
16
+                'paths' => [__DIR__.'/../src/Organizations/Entity']
17 17
             ],
18 18
         ],
19 19
         'eventmanager' => [
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         'translation_file_patterns' => [
41 41
             [
42 42
                 'type' => 'gettext',
43
-                'base_dir' => __DIR__ . '/../language',
43
+                'base_dir' => __DIR__.'/../language',
44 44
                 'pattern' => '%s.mo',
45 45
             ],
46 46
         ],
@@ -66,19 +66,19 @@  discard block
 block discarded – undo
66 66
     'view_manager' => [
67 67
         // Map template to files. Speeds up the lookup through the template stack.
68 68
         'template_map' => [
69
-             'organizations/index/edit' => __DIR__ . '/../view/organizations/index/form.phtml',
70
-             'organizations/form/employees-fieldset' => __DIR__ . '/../view/form/employees-fieldset.phtml',
71
-             'organizations/form/employee-fieldset' => __DIR__ .'/../view/form/employee-fieldset.phtml',
72
-             'organizations/form/invite-employee-bar' => __DIR__ . '/../view/form/invite-employee-bar.phtml',
73
-             'organizations/error/no-parent' => __DIR__ . '/../view/error/no-parent.phtml',
74
-             'organizations/error/invite' => __DIR__ . '/../view/error/invite.phtml',
75
-             'organizations/mail/invite-employee' => __DIR__ . '/../view/mail/invite-employee.phtml',
76
-             'organizations/form/workflow-fieldset' => __DIR__ . '/../view/form/workflow-fieldset.phtml',
77
-            'organizations/profile/disabled' => __DIR__ . '/../view/organizations/profile/disabled.phtml',
69
+             'organizations/index/edit' => __DIR__.'/../view/organizations/index/form.phtml',
70
+             'organizations/form/employees-fieldset' => __DIR__.'/../view/form/employees-fieldset.phtml',
71
+             'organizations/form/employee-fieldset' => __DIR__.'/../view/form/employee-fieldset.phtml',
72
+             'organizations/form/invite-employee-bar' => __DIR__.'/../view/form/invite-employee-bar.phtml',
73
+             'organizations/error/no-parent' => __DIR__.'/../view/error/no-parent.phtml',
74
+             'organizations/error/invite' => __DIR__.'/../view/error/invite.phtml',
75
+             'organizations/mail/invite-employee' => __DIR__.'/../view/mail/invite-employee.phtml',
76
+             'organizations/form/workflow-fieldset' => __DIR__.'/../view/form/workflow-fieldset.phtml',
77
+            'organizations/profile/disabled' => __DIR__.'/../view/organizations/profile/disabled.phtml',
78 78
         ],
79 79
         // Where to look for view templates not mapped above
80 80
         'template_path_stack' => [
81
-            __DIR__ . '/../view',
81
+            __DIR__.'/../view',
82 82
         ],
83 83
     ],
84 84
     'form_elements' => [
@@ -156,13 +156,13 @@  discard block
 block discarded – undo
156 156
                 'allow' => [
157 157
                     'Entity/OrganizationImage',
158 158
                     'route/lang/organizations/invite',
159
-                    'Organizations/InviteEmployee' => [ 'accept' ],
159
+                    'Organizations/InviteEmployee' => ['accept'],
160 160
                     'route/lang/organizations/profile',
161 161
                     'route/lang/organizations/profileDetail',
162 162
                 ],
163 163
                 'deny' => [
164 164
                     'route/lang/organizations',
165
-                    'Organizations/InviteEmployee' => [ 'invite' ],
165
+                    'Organizations/InviteEmployee' => ['invite'],
166 166
                 ],
167 167
             ],
168 168
             // recruiters are allowed to view their companies
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
                 'allow' => [
171 171
                     'route/lang/organizations',
172 172
                     'Organizations/InviteEmployee',
173
-                    'Entity/Organization' => [ 'edit' => 'Organizations/Write' ],
173
+                    'Entity/Organization' => ['edit' => 'Organizations/Write'],
174 174
                     'route/lang/organizations/profile',
175 175
                     'route/lang/organizations/profileDetail'
176 176
                 ],
@@ -188,8 +188,8 @@  discard block
 block discarded – undo
188 188
             'organizations' => [
189 189
                 'label' => 'Organizations',
190 190
                 'route' => 'lang/organizations',
191
-                'order' => 65,                             // allows to order the menu items
192
-                'resource' => 'route/lang/organizations',  // if a resource is defined, the acl will be applied.
191
+                'order' => 65, // allows to order the menu items
192
+                'resource' => 'route/lang/organizations', // if a resource is defined, the acl will be applied.
193 193
 
194 194
                 'pages' => [
195 195
                     'list' => [
Please login to merge, or discard this patch.
module/Organizations/src/Organizations/Controller/ProfileController.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
     {
83 83
 
84 84
         $result = $this->pagination([
85
-            'params' => ['Organizations_Profile',[
85
+            'params' => ['Organizations_Profile', [
86 86
                     'q',
87 87
                     'count' => $this->options['count'],
88 88
                     'page' => 1,
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         $repo            = $this->repo;
117 117
         $id              = $this->params('id');
118 118
 
119
-        if(is_null($id)){
119
+        if (is_null($id)) {
120 120
             $this->getResponse()->setStatusCode(Response::STATUS_CODE_404);
121 121
             return [
122 122
                 'message' => $translator->translate('Can not access profile page without id'),
@@ -125,20 +125,20 @@  discard block
 block discarded – undo
125 125
         }
126 126
 
127 127
         $organization = $repo->find($id);
128
-        if(!$organization instanceof Organization){
128
+        if (!$organization instanceof Organization) {
129 129
             throw new NotFoundException($id);
130 130
         }
131 131
 
132
-        if(
132
+        if (
133 133
             Organization::PROFILE_DISABLED == $organization->getProfileSetting()
134 134
             || is_null($organization->getProfileSetting())
135
-        ){
135
+        ) {
136 136
             return $this->disabledProfileViewModel($organization);
137 137
         }
138 138
 
139 139
         $result = $this->pagination([
140 140
             'params' => [
141
-                'Organization_Jobs',[
141
+                'Organization_Jobs', [
142 142
                     'q',
143 143
                     'organization_id' => $id,
144 144
                     'count' => $this->options['count'],
@@ -151,13 +151,13 @@  discard block
 block discarded – undo
151 151
             ],
152 152
         ]);
153 153
 
154
-        if(
154
+        if (
155 155
             Organization::PROFILE_ACTIVE_JOBS == $organization->getProfileSetting()
156
-        ){
156
+        ) {
157 157
             /* @var \Zend\Paginator\Paginator $paginator */
158 158
             $paginator = $result['jobs'];
159 159
             $count = $paginator->getTotalItemCount();
160
-            if(0===$count){
160
+            if (0 === $count) {
161 161
                 return $this->disabledProfileViewModel($organization);
162 162
             }
163 163
         }
Please login to merge, or discard this patch.
module/Core/src/Core/Repository/RepositoryService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,9 +38,9 @@
 block discarded – undo
38 38
             $name = "\\$namespace\\Entity\\$entityName";
39 39
         }
40 40
         
41
-        $repository  = $this->dm->getRepository($name);
41
+        $repository = $this->dm->getRepository($name);
42 42
 
43
-        if (!$repository instanceOf AbstractRepository)  {
43
+        if (!$repository instanceOf AbstractRepository) {
44 44
             $eventArgs = new DoctrineMongoODM\Event\EventArgs(
45 45
                 array(
46 46
                     'repository' => $repository,
Please login to merge, or discard this patch.
module/Core/src/Core/Form/View/Helper/FormEditor.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      *
45 45
      * @var string
46 46
      */
47
-    protected $language="de";
47
+    protected $language = "de";
48 48
 
49 49
     /**
50 50
      * @var
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public function render(ElementInterface $element)
60 60
     {
61
-        $name   = $element->getName();
61
+        $name = $element->getName();
62 62
         if (empty($name) && $name !== 0) {
63 63
             throw new \DomainException(
64 64
                 sprintf(
@@ -82,10 +82,10 @@  discard block
 block discarded – undo
82 82
         //$headscript->prependFile($basepath('/assets/jquery/jquery.min.js'));
83 83
 
84 84
         $headscript->offsetSetScript(
85
-            '1000_tinymce_' . $this->getTheme(),
85
+            '1000_tinymce_'.$this->getTheme(),
86 86
             '
87 87
             $(document).ready(function() {
88
-            tinyMCE.init({' . $this->additionalOptions() . ',
88
+            tinyMCE.init({' . $this->additionalOptions().',
89 89
                  setup:  function(editor) {
90 90
                  
91 91
                     setPlaceHolder = function(editor, show) {
@@ -133,15 +133,15 @@  discard block
 block discarded – undo
133 133
         }
134 134
         if (is_string($content)) {
135 135
 
136
-            $class = array_key_exists('class', $attributes)?$attributes['class']:'';
137
-            $class .= (empty($class)?:' ') . ' tinymce_' . $this->getTheme();
136
+            $class = array_key_exists('class', $attributes) ? $attributes['class'] : '';
137
+            $class .= (empty($class) ?: ' ').' tinymce_'.$this->getTheme();
138 138
             $attributes['class'] = $class;
139 139
             $placeHolder = '';
140 140
             $elementOptions = $element->getOptions();
141 141
             if (array_key_exists('placeholder', $elementOptions) && !empty($elementOptions['placeholder'])) {
142
-                $placeHolder = '<div id="placeholder-' . $name . '" style="border: 0 none; position: relative; top: 0ex; left: 10px; color: #aaa; height: 0px; overflow: visible;' .
143
-                               (empty($content)?'':'display:none;') .
144
-                               '">' . $this->translator->translate($elementOptions['placeholder']) . '</div>';
142
+                $placeHolder = '<div id="placeholder-'.$name.'" style="border: 0 none; position: relative; top: 0ex; left: 10px; color: #aaa; height: 0px; overflow: visible;'.
143
+                               (empty($content) ? '' : 'display:none;').
144
+                               '">'.$this->translator->translate($elementOptions['placeholder']).'</div>';
145 145
             }
146 146
             return
147 147
                 $placeHolder
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
      * @param $language
180 180
      */
181 181
     public function setLanguage($language) {
182
-        $this->language=$language;
182
+        $this->language = $language;
183 183
     }
184 184
 
185 185
     /**
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
      * @param $languagePath
189 189
      */
190 190
     public function setLanguagePath($languagePath) {
191
-        $this->languagePath=$languagePath;
191
+        $this->languagePath = $languagePath;
192 192
     }
193 193
 
194 194
     /**
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
      * @param $name
198 198
      * @param $value
199 199
      */
200
-    public function setOption($name,$value){
200
+    public function setOption($name, $value) {
201 201
         $this->options[$name] = $value;
202 202
 
203 203
         return $this;
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
      */
211 211
     public function setOptions($options)
212 212
     {
213
-        foreach($options as $key => $val) {
213
+        foreach ($options as $key => $val) {
214 214
             $this->setOption($key, $val);
215 215
         }
216 216
     }
Please login to merge, or discard this patch.
module/Core/src/Core/Filter/File/Entity.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
     public function getFileEntity()
94 94
     {
95
-        if (! $this->fileEntity instanceof FileInterface) {
95
+        if (!$this->fileEntity instanceof FileInterface) {
96 96
             throw new \RuntimeException('No file entity set or it does not implement \Core\Entity\FileInterface.');
97 97
         }
98 98
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
     public function filter($value)
103 103
     {
104
-        if (! is_array($value) || ! isset($value['tmp_name']) || ((isset($value['error']) && UPLOAD_ERR_NO_FILE == $value['error']))) {
104
+        if (!is_array($value) || !isset($value['tmp_name']) || ((isset($value['error']) && UPLOAD_ERR_NO_FILE == $value['error']))) {
105 105
             return null;
106 106
         }
107 107
 
Please login to merge, or discard this patch.