Completed
Push — develop ( 2c7f98...cb8417 )
by Carsten
14s
created
module/Jobs/src/Jobs/Factory/Controller/JobboardControllerFactory.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -25,16 +25,16 @@
 block discarded – undo
25 25
     
26 26
     public function __invoke(ContainerInterface $container, $requestedName, array $options = null) {
27 27
 	
28
-	    /* @var \Jobs\Options\JobboardSearchOptions $options */
29
-	    $options = $container->get( 'Jobs/JobboardSearchOptions' );
28
+        /* @var \Jobs\Options\JobboardSearchOptions $options */
29
+        $options = $container->get( 'Jobs/JobboardSearchOptions' );
30 30
 	
31
-	    /**
32
-	     * @var $jobRepository Repository\Job
33
-	     */
34
-	    $jobRepository         = $container->get( 'repositories' )->get( 'Jobs/Job' );
35
-	    $defaultListener       = $container->get( 'DefaultListeners' );
36
-	    $imageFileCacheManager = $container->get( 'Organizations\ImageFileCache\Manager' );
31
+        /**
32
+         * @var $jobRepository Repository\Job
33
+         */
34
+        $jobRepository         = $container->get( 'repositories' )->get( 'Jobs/Job' );
35
+        $defaultListener       = $container->get( 'DefaultListeners' );
36
+        $imageFileCacheManager = $container->get( 'Organizations\ImageFileCache\Manager' );
37 37
 	
38
-	    return new JobboardController( $defaultListener, $jobRepository, $imageFileCacheManager, [ 'count' => $options->getPerPage() ] );
38
+        return new JobboardController( $defaultListener, $jobRepository, $imageFileCacheManager, [ 'count' => $options->getPerPage() ] );
39 39
     }
40 40
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,15 +26,15 @@
 block discarded – undo
26 26
     public function __invoke(ContainerInterface $container, $requestedName, array $options = null) {
27 27
 	
28 28
 	    /* @var \Jobs\Options\JobboardSearchOptions $options */
29
-	    $options = $container->get( 'Jobs/JobboardSearchOptions' );
29
+	    $options = $container->get('Jobs/JobboardSearchOptions');
30 30
 	
31 31
 	    /**
32 32
 	     * @var $jobRepository Repository\Job
33 33
 	     */
34
-	    $jobRepository         = $container->get( 'repositories' )->get( 'Jobs/Job' );
35
-	    $defaultListener       = $container->get( 'DefaultListeners' );
36
-	    $imageFileCacheManager = $container->get( 'Organizations\ImageFileCache\Manager' );
34
+	    $jobRepository         = $container->get('repositories')->get('Jobs/Job');
35
+	    $defaultListener       = $container->get('DefaultListeners');
36
+	    $imageFileCacheManager = $container->get('Organizations\ImageFileCache\Manager');
37 37
 	
38
-	    return new JobboardController( $defaultListener, $jobRepository, $imageFileCacheManager, [ 'count' => $options->getPerPage() ] );
38
+	    return new JobboardController($defaultListener, $jobRepository, $imageFileCacheManager, ['count' => $options->getPerPage()]);
39 39
     }
40 40
 }
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Factory/Form/MultipostingMultiCheckboxFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
     public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
67 67
     {
68 68
         $factory = $this->getParentFactory();
69
-        $select = $factory($container,$requestedName);
69
+        $select = $factory($container, $requestedName);
70 70
         $select->setViewPartial('jobs/form/multiposting-checkboxes');
71 71
         $select->setHeadscripts(array('Jobs/js/form.multiposting-checkboxes.js'));
72 72
         return $select;
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Controller/ConsoleController.php 2 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -22,26 +22,26 @@
 block discarded – undo
22 22
 
23 23
 class ConsoleController extends AbstractActionController
24 24
 {
25
-	/**
26
-	 * @var RepositoryService
27
-	 */
28
-	private $repositories;
25
+    /**
26
+     * @var RepositoryService
27
+     */
28
+    private $repositories;
29 29
 	
30
-	public function __construct(
31
-		RepositoryService $repositories
32
-	)
33
-	{
34
-		$this->repositories = $repositories;
35
-	}
30
+    public function __construct(
31
+        RepositoryService $repositories
32
+    )
33
+    {
34
+        $this->repositories = $repositories;
35
+    }
36 36
 	
37
-	static public function factory(ContainerInterface $container)
38
-	{
39
-		return new self(
40
-			$container->get('repositories')
41
-		);
42
-	}
37
+    static public function factory(ContainerInterface $container)
38
+    {
39
+        return new self(
40
+            $container->get('repositories')
41
+        );
42
+    }
43 43
 	
44
-	public function expireJobsAction()
44
+    public function expireJobsAction()
45 45
     {
46 46
         $repositories = $this->repositories;
47 47
         /* @var \Jobs\Repository\Job $jobsRepo */
Please login to merge, or discard this 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
         }
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         
99 99
         echo "$count jobs found, which have to expire ...\n";
100 100
         
101
-        $progress     = new ProgressBar(
101
+        $progress = new ProgressBar(
102 102
             new ConsoleAdapter(
103 103
                 array(
104 104
                 'elements' => array(
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 
122 122
         /* @var \Jobs\Entity\Job $job */
123 123
         foreach ($jobs as $job) {
124
-            $progress->update($i++, 'Job ' . $i . ' / ' . $count);
124
+            $progress->update($i++, 'Job '.$i.' / '.$count);
125 125
 
126 126
             $job->changeStatus('expired');
127 127
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         $i            = 0;
150 150
         /* @var Job $job */
151 151
         foreach ($jobs as $job) {
152
-            $progress->update($i++, 'Job ' . $i . ' / ' . $count);
152
+            $progress->update($i++, 'Job '.$i.' / '.$count);
153 153
             
154 154
             $permissions = $job->getPermissions();
155 155
             $user        = $job->getUser();
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
                 continue;
158 158
             }
159 159
             try {
160
-                $group       = $user->getGroup($job->getCompany());
160
+                $group = $user->getGroup($job->getCompany());
161 161
             } catch (\Exception $e) {
162 162
                 continue;
163 163
             }
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
                 $org = $job->getCompany();
197 197
             }
198 198
             printf(
199
-                '%s   %s   %s   %-30s   %-20s' . PHP_EOL,
199
+                '%s   %s   %s   %-30s   %-20s'.PHP_EOL,
200 200
                 $id,
201 201
                 $job->getDatePublishStart()->format('Y-m-d'),
202 202
                 $job->getDatePublishEnd()->format('Y-m-d'),
@@ -204,6 +204,6 @@  discard block
 block discarded – undo
204 204
                 substr($org, 0, 20)
205 205
             );
206 206
         }
207
-        return count($jobs) . ' Jobs.';
207
+        return count($jobs).' Jobs.';
208 208
     }
209 209
 }
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Controller/JobboardController.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -50,11 +50,11 @@
 block discarded – undo
50 50
      * @param Repository\Job $jobRepository
51 51
      */
52 52
     public function __construct(
53
-    	DefaultListener $defaultListener,
54
-	    Repository\Job $jobRepository,
55
-	    ImageFileCacheManager $imageFileCacheManager,
56
-	    $options
57
-	)
53
+        DefaultListener $defaultListener,
54
+        Repository\Job $jobRepository,
55
+        ImageFileCacheManager $imageFileCacheManager,
56
+        $options
57
+    )
58 58
     {
59 59
         $this->jobRepository = $jobRepository;
60 60
         $this->options = $options;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     public function attachDefaultListeners()
69 69
     {
70 70
         parent::attachDefaultListeners();
71
-        $events          = $this->getEventManager();
71
+        $events = $this->getEventManager();
72 72
         $this->defaultListener->attach($events);
73 73
         return $this;
74 74
     }
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
         $request = $this->getRequest();
92 92
         $getParams = $request->getQuery();
93 93
         $routeParams = $this->params()->fromRoute();
94
-        if (isset($routeParams['q']) && !isset($getParams['q'])){
95
-            $getParams['q']=$routeParams['q'];
94
+        if (isset($routeParams['q']) && !isset($getParams['q'])) {
95
+            $getParams['q'] = $routeParams['q'];
96 96
         }
97 97
 
98 98
         $result = $this->pagination([
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Controller/AdminCategoriesController.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -28,31 +28,31 @@  discard block
 block discarded – undo
28 28
  */
29 29
 class AdminCategoriesController extends AbstractActionController
30 30
 {
31
-	private $adminCategoriesForm;
31
+    private $adminCategoriesForm;
32 32
 	
33
-	/**
34
-	 * @var Categories
35
-	 */
36
-	private $jobsCategoryRepo;
33
+    /**
34
+     * @var Categories
35
+     */
36
+    private $jobsCategoryRepo;
37 37
 	
38
-	private $repositories;
38
+    private $repositories;
39 39
 	
40
-	private $viewHelperManager;
40
+    private $viewHelperManager;
41 41
 	
42
-	static public function factory(ContainerInterface $container)
43
-	{
44
-		$ob = new static();
45
-		$ob->initContainer($container);
46
-		return $ob;
47
-	}
42
+    static public function factory(ContainerInterface $container)
43
+    {
44
+        $ob = new static();
45
+        $ob->initContainer($container);
46
+        return $ob;
47
+    }
48 48
 
49
-	public function initContainer(ContainerInterface $container)
50
-	{
51
-		$this->adminCategoriesForm = $container->get('forms')->get('Jobs/AdminCategories');
52
-		$this->repositories = $container->get('repositories');
53
-		$this->jobsCategoryRepo = $container->get('repositories')->get('Jobs/Category');
54
-		$this->viewHelperManager = $container->get('ViewHelperManager');
55
-	}
49
+    public function initContainer(ContainerInterface $container)
50
+    {
51
+        $this->adminCategoriesForm = $container->get('forms')->get('Jobs/AdminCategories');
52
+        $this->repositories = $container->get('repositories');
53
+        $this->jobsCategoryRepo = $container->get('repositories')->get('Jobs/Category');
54
+        $this->viewHelperManager = $container->get('ViewHelperManager');
55
+    }
56 56
 	
57 57
     public function indexAction()
58 58
     {
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     {
75 75
         //$services = $this->serviceLocator;
76 76
         $form = $this->adminCategoriesForm;
77
-	    $repositories = $this->repositories;
77
+        $repositories = $this->repositories;
78 78
         $rep = $this->jobsCategoryRepo;
79 79
 
80 80
         $professions = $rep->findOneBy(['value' => 'professions']);
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Controller/AdminController.php 2 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -26,34 +26,34 @@  discard block
 block discarded – undo
26 26
  */
27 27
 class AdminController extends AbstractActionController implements ContainerAwareInterface
28 28
 {
29
-	/**
30
-	 * @var RepositoryService
31
-	 */
32
-	private $repositories;
29
+    /**
30
+     * @var RepositoryService
31
+     */
32
+    private $repositories;
33 33
 	
34
-	/**
35
-	 * @var FormElementManagerTrait
36
-	 */
37
-	private $formManager;
34
+    /**
35
+     * @var FormElementManagerTrait
36
+     */
37
+    private $formManager;
38 38
 	
39
-	private $jobEvents;
39
+    private $jobEvents;
40 40
 	
41
-	static public function factory(ContainerInterface $container)
42
-	{
43
-		$ob = new self();
44
-		$ob->setContainer($container);
45
-		return $ob;
46
-	}
41
+    static public function factory(ContainerInterface $container)
42
+    {
43
+        $ob = new self();
44
+        $ob->setContainer($container);
45
+        return $ob;
46
+    }
47 47
 	
48
-	public function setContainer( ContainerInterface $container )
49
-	{
50
-		$this->repositories     = $container->get('repositories');
51
-		$this->formManager      = $container->get('forms');
52
-		$this->jobEvents        = $container->get('Jobs/Events');
53
-	}
48
+    public function setContainer( ContainerInterface $container )
49
+    {
50
+        $this->repositories     = $container->get('repositories');
51
+        $this->formManager      = $container->get('forms');
52
+        $this->jobEvents        = $container->get('Jobs/Events');
53
+    }
54 54
 	
55 55
 	
56
-	public function indexAction()
56
+    public function indexAction()
57 57
     {
58 58
         $params = $this->params()->fromQuery();
59 59
         return $this->pagination([
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             return new JsonModel([
92 92
                 'valid' => $valid,
93 93
                 'errors' => $errors
94
-                                 ]);
94
+                                    ]);
95 95
         }
96 96
 
97 97
         $form->bind($job);
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 		return $ob;
46 46
 	}
47 47
 	
48
-	public function setContainer( ContainerInterface $container )
48
+	public function setContainer(ContainerInterface $container)
49 49
 	{
50 50
 		$this->repositories     = $container->get('repositories');
51 51
 		$this->formManager      = $container->get('forms');
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
     {
58 58
         $params = $this->params()->fromQuery();
59 59
         return $this->pagination([
60
-            'params'    => [ 'Jobs_Admin', ['text', 'page' => 1, 'companyId', 'status' ] ],
61
-            'form'      => [ 'as' => 'form', 'Jobs/AdminSearch' ],
62
-            'paginator' => [ 'as' => 'jobs', 'Jobs/Admin' ],
60
+            'params'    => ['Jobs_Admin', ['text', 'page' => 1, 'companyId', 'status']],
61
+            'form'      => ['as' => 'form', 'Jobs/AdminSearch'],
62
+            'paginator' => ['as' => 'jobs', 'Jobs/Admin'],
63 63
         ]);
64 64
     }
65 65
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
                     $oldStatus = $job->getStatus();
85 85
                     $job->changeStatus($post['status'], '[System] Status changed via Admin GUI.');
86 86
                     $events = $this->jobEvents;
87
-                    $events->trigger(JobEvent::EVENT_STATUS_CHANGED, $this, [ 'job' => $job, 'status' => $oldStatus ]);
87
+                    $events->trigger(JobEvent::EVENT_STATUS_CHANGED, $this, ['job' => $job, 'status' => $oldStatus]);
88 88
                 }
89 89
             }
90 90
 
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
         $form->bind($job);
98 98
 
99
-        return [ 'form' => $form, 'job' => $job ];
99
+        return ['form' => $form, 'job' => $job];
100 100
     }
101 101
     
102 102
 }
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Form/MultipostFieldset.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -42,13 +42,13 @@
 block discarded – undo
42 42
 
43 43
         $this->add(
44 44
             array(
45
-                 'type' => 'Jobs/MultipostingSelect',
46
-                 'property' => true,
47
-                 'name' => 'portals',
48
-                 'options' => array(
49
-                     'label' => /*@translate*/ 'Portals',
50
-                 ),
51
-             )
45
+                    'type' => 'Jobs/MultipostingSelect',
46
+                    'property' => true,
47
+                    'name' => 'portals',
48
+                    'options' => array(
49
+                        'label' => /*@translate*/ 'Portals',
50
+                    ),
51
+                )
52 52
         );
53 53
     }
54 54
 
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Form/Job.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
                 'priority' => 100,
63 63
                 'label' => /*@translate*/ 'Basic Data',
64 64
                 'options' => [
65
-                	'label' => /*@translate*/ 'Basic Data'
65
+                    'label' => /*@translate*/ 'Basic Data'
66 66
                 ],
67 67
                 'property' => true,
68 68
                 'forms' => [
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 
117 117
             'description' => [
118 118
                 'priority' => '80',
119
-                'options' => [ 'label' => /*@translate*/ 'Create job opening' ],
119
+                'options' => ['label' => /*@translate*/ 'Create job opening'],
120 120
                 'property' => true,
121 121
                 'forms' => [
122 122
                     'descriptionForm' => array(
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
             'preview' => [
130 130
                 'priority' => 60,
131
-                'options' => [ 'label' => /*@translate*/ 'Preview' ],
131
+                'options' => ['label' => /*@translate*/ 'Preview'],
132 132
                 'property' => true,
133 133
                 'forms' => [
134 134
                     'previewForm' => array(
@@ -142,13 +142,13 @@  discard block
 block discarded – undo
142 142
 
143 143
         $this->setForms($elements);
144 144
 
145
-        $events  = $this->getEventManager();
145
+        $events = $this->getEventManager();
146 146
         $events->trigger(FormEvent::EVENT_INIT, $this);
147 147
     }
148 148
 
149 149
     public function renderPost(Renderer $renderer)
150 150
     {
151
-        $coreformsjs   = $renderer->basepath('/Core/js/core.forms.js');
151
+        $coreformsjs = $renderer->basepath('/Core/js/core.forms.js');
152 152
         $javaScript = <<<JS
153 153
         $(document).ready(function() {
154 154
 
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Form/Validator/UniqueApplyIdFactory.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,12 +15,12 @@
 block discarded – undo
15 15
 
16 16
 class UniqueApplyIdFactory implements FactoryInterface
17 17
 {
18
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
19
-	{
20
-		$repositories = $container->get('repositories');
21
-		$jobs         = $repositories->get('Jobs/Job');
22
-		$validator    = new UniqueApplyId($jobs);
18
+    public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
19
+    {
20
+        $repositories = $container->get('repositories');
21
+        $jobs         = $repositories->get('Jobs/Job');
22
+        $validator    = new UniqueApplyId($jobs);
23 23
 		
24
-		return $validator;
25
-	}
24
+        return $validator;
25
+    }
26 26
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
 
16 16
 class UniqueApplyIdFactory implements FactoryInterface
17 17
 {
18
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
18
+	public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
19 19
 	{
20 20
 		$repositories = $container->get('repositories');
21 21
 		$jobs         = $repositories->get('Jobs/Job');
Please login to merge, or discard this patch.