Completed
Pull Request — develop (#359)
by Mathias
23:51
created
module/Core/src/Core/Listener/AjaxRouteListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
      * @var array
48 48
      */
49 49
     private $events = [
50
-        [ MvcEvent::EVENT_ROUTE, 'onRoute', 100 ],
50
+        [MvcEvent::EVENT_ROUTE, 'onRoute', 100],
51 51
     ];
52 52
 
53 53
     /**
Please login to merge, or discard this patch.
module/Geo/src/Geo/Service/Photon.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,11 +28,11 @@  discard block
 block discarded – undo
28 28
         $client->setMethod('GET');
29 29
 
30 30
         $osmTags = [
31
-            'tourism','aeroway','railway', 'amenity', 'historic', 'tunnel', 'mountain_pass',
31
+            'tourism', 'aeroway', 'railway', 'amenity', 'historic', 'tunnel', 'mountain_pass',
32 32
             'leisure', 'natural', 'bridge', 'waterway'
33 33
         ];
34 34
 
35
-        $osmTags = array_map(function($i) { return urlencode('!' . $i); }, $osmTags);
35
+        $osmTags = array_map(function($i) { return urlencode('!'.$i); }, $osmTags);
36 36
 
37 37
         $uri = sprintf(
38 38
             '%s?osm_tag=%s',
@@ -59,12 +59,12 @@  discard block
 block discarded – undo
59 59
     {
60 60
         $result = json_decode($result);
61 61
         $result = $result->features;
62
-        $r=[];
62
+        $r = [];
63 63
 
64 64
         foreach ($result as $key => $val) {
65
-            $row=[
66
-                  'postalCode' => (property_exists($val->properties, 'postcode') ? $val->properties->postcode:''),
67
-                  'city' =>(property_exists($val->properties, 'city') ? $val->properties->city:''),
65
+            $row = [
66
+                  'postalCode' => (property_exists($val->properties, 'postcode') ? $val->properties->postcode : ''),
67
+                  'city' =>(property_exists($val->properties, 'city') ? $val->properties->city : ''),
68 68
                   'street' => (property_exists($val->properties, 'street') ? $val->properties->street : ''),
69 69
                   'region' => (property_exists($val->properties, 'state') ? $val->properties->state : ''),
70 70
                   'country' => (property_exists($val->properties, 'country') ? $val->properties->country : ''),
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
                 ];
82 82
             }
83 83
             //$row['id'] = json_encode($row);
84
-            $r[]=$row;
84
+            $r[] = $row;
85 85
         }
86 86
         return $r;
87 87
     }
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/Plugin/SearchForm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,11 +72,11 @@
 block discarded – undo
72 72
     public function get($form, $options = null, $params = null)
73 73
     {
74 74
         if (!is_object($form)) {
75
-            $form             = $this->formElementManager->get($form, $options);
75
+            $form = $this->formElementManager->get($form, $options);
76 76
         }
77 77
 
78 78
         /** @noinspection PhpUndefinedMethodInspection */
79
-        $params           = $params ?: clone $this->getController()->getRequest()->getQuery();
79
+        $params = $params ?: clone $this->getController()->getRequest()->getQuery();
80 80
 
81 81
         /* I tried using form methods (bind, isValid)...
82 82
          * but because the search form could be in an invalidated state
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/View/Helper/JobUrl.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     public function __invoke(Job $jobEntity, $options = [], $urlParams = [])
68 68
     {
69 69
 
70
-        $options= array_merge($this->options, $options);
70
+        $options = array_merge($this->options, $options);
71 71
         $paramsHelper = $this->paramsHelper;
72 72
         $urlHelper = $this->urlHelper;
73 73
         $serverUrlHelper = $this->serverUrlHelper;
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         if (!empty($jobEntity->getLink())) {
77 77
             $url = $jobEntity->getLink();
78 78
             $isExternalLink = true;
79
-        }elseif($options['showPendingJobs']) {
79
+        }elseif ($options['showPendingJobs']) {
80 80
             $url = $urlHelper(
81 81
                 'lang/jobs/approval',
82 82
                 [],
@@ -86,10 +86,10 @@  discard block
 block discarded – undo
86 86
                     ]
87 87
                 ], true);
88 88
 
89
-        }else{
89
+        } else {
90 90
 
91 91
             $query = [
92
-                'subscriberUri' => $serverUrlHelper([]) . '/subscriber/' . 1,
92
+                'subscriberUri' => $serverUrlHelper([]).'/subscriber/'.1,
93 93
                 'id' => $jobEntity->getId()
94 94
             ];
95 95
             $route = 'lang/jobs/view';
@@ -103,16 +103,16 @@  discard block
 block discarded – undo
103 103
             $url = $urlHelper($route, $params, array('query' => $query));
104 104
         }
105 105
 
106
-        if ($options['linkOnly']){
106
+        if ($options['linkOnly']) {
107 107
             $result = $url;
108
-            if ($options['absolute'] && !$isExternalLink){
108
+            if ($options['absolute'] && !$isExternalLink) {
109 109
                 $result = $serverUrlHelper($url);
110 110
             }
111
-        }else{
111
+        } else {
112 112
             $result = sprintf('<a href="%s" rel="%s" %s>%s</a>',
113 113
                               $url,
114 114
                               $options['rel'],
115
-                              $options['target']?"target=" . $options['target']:"",
115
+                              $options['target'] ? "target=".$options['target'] : "",
116 116
                               strip_tags($jobEntity->getTitle()));
117 117
         }
118 118
 
@@ -122,10 +122,10 @@  discard block
 block discarded – undo
122 122
     /**
123 123
      * @param $options
124 124
      */
125
-    public function setOptions($options){
126
-        foreach($options as $key=>$val) {
127
-            if (array_key_exists($this->options,$key)) {
128
-                $this->options[$key]=$val;
125
+    public function setOptions($options) {
126
+        foreach ($options as $key=>$val) {
127
+            if (array_key_exists($this->options, $key)) {
128
+                $this->options[$key] = $val;
129 129
             }
130 130
         }
131 131
     }
Please login to merge, or discard this patch.
module/Jobs/config/module.config.php 1 patch
Spacing   +36 added lines, -36 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' => [ __DIR__ . '/../src/Jobs/Entity'],
18
+                'paths' => [__DIR__.'/../src/Jobs/Entity'],
19 19
             ],
20 20
         ],
21 21
         'eventmanager' => [
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
     ],
29 29
 
30 30
     'options' => [
31
-        'Jobs/JobboardSearchOptions' => [ 'class' => '\Jobs\Options\JobboardSearchOptions' ],
32
-        'Jobs/BaseFieldsetOptions' => [ 'class' => '\Jobs\Options\BaseFieldsetOptions' ],
31
+        'Jobs/JobboardSearchOptions' => ['class' => '\Jobs\Options\JobboardSearchOptions'],
32
+        'Jobs/BaseFieldsetOptions' => ['class' => '\Jobs\Options\BaseFieldsetOptions'],
33 33
     ],
34 34
 
35 35
     'Jobs' => [
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             'translation_file_patterns' => [
52 52
                     [
53 53
                             'type'     => 'gettext',
54
-                            'base_dir' => __DIR__ . '/../language',
54
+                            'base_dir' => __DIR__.'/../language',
55 55
                             'pattern'  => '%s.mo',
56 56
                     ],
57 57
             ],
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
                     'Jobboard',
92 92
                     'Jobs/Jobboard',
93 93
                     'Jobs/ApiJobListByChannel',
94
-                    'Jobs/Template' => [ 'view', 'edittemplate' ],
94
+                    'Jobs/Template' => ['view', 'edittemplate'],
95 95
                     'Jobs/Manage' => [
96 96
                         'template',
97 97
                     ],
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
     ],
231 231
 
232 232
     'event_manager' => [
233
-        'Core/AdminController/Events' => [ 'listeners' => [
233
+        'Core/AdminController/Events' => ['listeners' => [
234 234
             'Jobs/Listener/AdminWidgetProvider' => \Core\Controller\AdminControllerEvent::EVENT_DASHBOARD,
235 235
         ]],
236 236
 
@@ -296,40 +296,40 @@  discard block
 block discarded – undo
296 296
     'view_manager' => [
297 297
         // Map template to files. Speeds up the lookup through the template stack.
298 298
         'template_map' => [
299
-            'jobs/form/list-filter' => __DIR__ . '/../view/form/list-filter.phtml',
300
-            'jobs/form/apply-identifier' => __DIR__ . '/../view/form/apply-identifier.phtml',
301
-            'jobs/form/hiring-organization-select' => __DIR__ . '/../view/form/hiring-organization-select.phtml',
302
-            'jobs/form/multiposting-select' => __DIR__ . '/../view/form/multiposting-select.phtml',
303
-            'jobs/form/multiposting-checkboxes' => __DIR__ . '/../view/form/multiposting-checkboxes.phtml',
304
-            'jobs/form/ats-mode.view' => __DIR__ . '/../view/form/ats-mode.view.phtml',
305
-            'jobs/form/ats-mode.form' => __DIR__ . '/../view/form/ats-mode.form.phtml',
306
-            'jobs/form/preview' => __DIR__ . '/../view/form/preview.phtml',
307
-            'jobs/form/customer-note' => __DIR__ . '/../view/form/customer-note.phtml',
308
-            'jobs/partials/channel-list' => __DIR__ . '/../view/partials/channel-list.phtml',
309
-            'jobs/assign-user' => __DIR__ . '/../view/jobs/manage/assign-user.phtml',
310
-            'jobs/snapshot_or_preview' => __DIR__ . '/../view/partials/snapshot_or_preview.phtml',
311
-            'jobs/history' => __DIR__ . '/../view/partials/history.phtml',
312
-            'jobs/portalsummary' => __DIR__ . '/../view/partials/portalsummary.phtml',
313
-            'content/jobs-publish-on-yawik' => __DIR__ . '/../view/modals/yawik.phtml',
314
-            'content/jobs-publish-on-jobsintown' => __DIR__ . '/../view/modals/jobsintown.phtml',
315
-            'content/jobs-publish-on-homepage' => __DIR__ . '/../view/modals/homepage.phtml',
316
-            'content/jobs-publish-on-fazjob' => __DIR__ . '/../view/modals/fazjob.phtml',
317
-            'content/jobs-terms-and-conditions' => __DIR__ . '/../view/jobs/index/terms.phtml',
318
-            'mail/job-created' => __DIR__ . '/../view/mails/job-created.phtml',
319
-            'mail/job-pending' => __DIR__ . '/../view/mails/job-pending.phtml',
320
-            'mail/job-accepted' => __DIR__ . '/../view/mails/job-accepted.phtml',
321
-            'mail/job-rejected' => __DIR__ . '/../view/mails/job-rejected.phtml',
322
-            'mail/job-created.en' => __DIR__ . '/../view/mails/job-created.en.phtml',
323
-            'mail/job-pending.en' => __DIR__ . '/../view/mails/job-pending.en.phtml',
324
-            'mail/job-accepted.en' => __DIR__ . '/../view/mails/job-accepted.en.phtml',
325
-            'mail/job-rejected.en' => __DIR__ . '/../view/mails/job-rejected.en.phtml',
326
-            'jobs/error/no-parent' => __DIR__ . '/../view/error/no-parent.phtml',
327
-            'jobs/error/expired' => __DIR__ . '/../view/error/expired.phtml',
299
+            'jobs/form/list-filter' => __DIR__.'/../view/form/list-filter.phtml',
300
+            'jobs/form/apply-identifier' => __DIR__.'/../view/form/apply-identifier.phtml',
301
+            'jobs/form/hiring-organization-select' => __DIR__.'/../view/form/hiring-organization-select.phtml',
302
+            'jobs/form/multiposting-select' => __DIR__.'/../view/form/multiposting-select.phtml',
303
+            'jobs/form/multiposting-checkboxes' => __DIR__.'/../view/form/multiposting-checkboxes.phtml',
304
+            'jobs/form/ats-mode.view' => __DIR__.'/../view/form/ats-mode.view.phtml',
305
+            'jobs/form/ats-mode.form' => __DIR__.'/../view/form/ats-mode.form.phtml',
306
+            'jobs/form/preview' => __DIR__.'/../view/form/preview.phtml',
307
+            'jobs/form/customer-note' => __DIR__.'/../view/form/customer-note.phtml',
308
+            'jobs/partials/channel-list' => __DIR__.'/../view/partials/channel-list.phtml',
309
+            'jobs/assign-user' => __DIR__.'/../view/jobs/manage/assign-user.phtml',
310
+            'jobs/snapshot_or_preview' => __DIR__.'/../view/partials/snapshot_or_preview.phtml',
311
+            'jobs/history' => __DIR__.'/../view/partials/history.phtml',
312
+            'jobs/portalsummary' => __DIR__.'/../view/partials/portalsummary.phtml',
313
+            'content/jobs-publish-on-yawik' => __DIR__.'/../view/modals/yawik.phtml',
314
+            'content/jobs-publish-on-jobsintown' => __DIR__.'/../view/modals/jobsintown.phtml',
315
+            'content/jobs-publish-on-homepage' => __DIR__.'/../view/modals/homepage.phtml',
316
+            'content/jobs-publish-on-fazjob' => __DIR__.'/../view/modals/fazjob.phtml',
317
+            'content/jobs-terms-and-conditions' => __DIR__.'/../view/jobs/index/terms.phtml',
318
+            'mail/job-created' => __DIR__.'/../view/mails/job-created.phtml',
319
+            'mail/job-pending' => __DIR__.'/../view/mails/job-pending.phtml',
320
+            'mail/job-accepted' => __DIR__.'/../view/mails/job-accepted.phtml',
321
+            'mail/job-rejected' => __DIR__.'/../view/mails/job-rejected.phtml',
322
+            'mail/job-created.en' => __DIR__.'/../view/mails/job-created.en.phtml',
323
+            'mail/job-pending.en' => __DIR__.'/../view/mails/job-pending.en.phtml',
324
+            'mail/job-accepted.en' => __DIR__.'/../view/mails/job-accepted.en.phtml',
325
+            'mail/job-rejected.en' => __DIR__.'/../view/mails/job-rejected.en.phtml',
326
+            'jobs/error/no-parent' => __DIR__.'/../view/error/no-parent.phtml',
327
+            'jobs/error/expired' => __DIR__.'/../view/error/expired.phtml',
328 328
         ],
329 329
 
330 330
         // Where to look for view templates not mapped above
331 331
         'template_path_stack' => [
332
-            __DIR__ . '/../view',
332
+            __DIR__.'/../view',
333 333
         ],
334 334
     ],
335 335
 
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Entity/Status.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -59,12 +59,12 @@  discard block
 block discarded – undo
59 59
     {
60 60
         parent::__construct($status);
61 61
 
62
-        $constant = 'self::' . strtoupper(str_replace(' ', '_', $status));
62
+        $constant = 'self::'.strtoupper(str_replace(' ', '_', $status));
63 63
         if (!defined($constant)) {
64
-            throw new \DomainException('Unknown status: ' . $status);
64
+            throw new \DomainException('Unknown status: '.$status);
65 65
         }
66
-        $this->name=constant($constant);
67
-        $this->order=$this->getOrder();
66
+        $this->name = constant($constant);
67
+        $this->order = $this->getOrder();
68 68
     }
69 69
 
70 70
     /**
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function getName()
76 76
     {
77
-        return isset($this->name)?$this->name:'';
77
+        return isset($this->name) ? $this->name : '';
78 78
     }
79 79
 
80 80
     /**
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Repository/Job.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     public function findByAssignedPermissionsResourceId($resourceId)
71 71
     {
72 72
         $criteria = $this->getIsDeletedCriteria(
73
-                ['permissions.assigned.' . $resourceId => [ '$exists' => true]]
73
+                ['permissions.assigned.'.$resourceId => ['$exists' => true]]
74 74
         );
75 75
 
76 76
         return $this->findBy($criteria);
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $qb->hydrate(false)
91 91
            ->select('title', 'applyId')
92 92
            ->field('permissions.view')->equals($userId)
93
-           ->field('title')->equals(new \MongoRegex('/' . $query . '/i'))
93
+           ->field('title')->equals(new \MongoRegex('/'.$query.'/i'))
94 94
            ->sort('title')
95 95
            ->limit(5);
96 96
         
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         $qb = $this->createQueryBuilder();
160 160
         $qb->distinct('organization')
161 161
             ->hydrate(true)
162
-           ->field('status.name')->notIn([ StatusInterface::EXPIRED, StatusInterface::INACTIVE ]);
162
+           ->field('status.name')->notIn([StatusInterface::EXPIRED, StatusInterface::INACTIVE]);
163 163
         $q = $qb->getQuery();
164 164
         $r = $q->execute();
165 165
         $r = $r->toArray();
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
      */
221 221
     public function createQueryBuilder($isDeleted = false)
222 222
     {
223
-        $qb =  parent::createQueryBuilder();
223
+        $qb = parent::createQueryBuilder();
224 224
 
225 225
         if (null !== $isDeleted) {
226 226
             $qb->addAnd(
Please login to merge, or discard this patch.
module/Core/src/Core/View/Helper/AjaxUrl.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function __construct($basePath = '')
51 51
     {
52
-        $this->basePath = rtrim($basePath, '/') . '/';
52
+        $this->basePath = rtrim($basePath, '/').'/';
53 53
     }
54 54
 
55 55
     /**
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     public function __invoke($name, array $params = [])
65 65
     {
66 66
         if (is_array($name)) {
67
-            if (!isset($name[ 'ajax' ])) {
67
+            if (!isset($name['ajax'])) {
68 68
                 throw new \InvalidArgumentException('Key "ajax" is required when passing array as first argument.');
69 69
             }
70 70
             $params = $name;
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/Status/AbstractStatus.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         $states = static::getStates();
59 59
 
60 60
         if (!in_array($state, $states)) {
61
-            throw new \InvalidArgumentException('Invalid state name: ' . $state);
61
+            throw new \InvalidArgumentException('Invalid state name: '.$state);
62 62
         }
63 63
 
64 64
         $this->state = $state;
Please login to merge, or discard this patch.