Completed
Push — develop ( 2c7f98...cb8417 )
by Carsten
14s
created
module/Behat/src/SummaryFormContext.php 3 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
 		$method = 'iSave'.$type;
73 73
 		if(method_exists($this,$method)){
74 74
 			call_user_func([$this,$method]);
75
-		}else{
75
+		} else{
76 76
 			$locator = $this->elementMap[$type].'-buttons-submit';
77 77
 			$this->coreContext->scrollIntoView($locator);
78 78
 			$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
Please login to merge, or discard this patch.
Indentation   +93 added lines, -93 removed lines patch added patch discarded remove patch
@@ -15,112 +15,112 @@
 block discarded – undo
15 15
 
16 16
 class SummaryFormContext implements Context
17 17
 {
18
-	use CommonContextTrait;
18
+    use CommonContextTrait;
19 19
 	
20
-	private $elementMap = array(
21
-		'name' => '#sf-nameForm',
22
-		'location' => '#sf-locationForm',
23
-		'employees' => '#sf-employeesManagement',
24
-		'workflow' => '#sf-workflowSettings',
25
-		'jobTitleAndLocation' => '#general-locationForm',
26
-		'jobClassification' => '#sf-general-classifications',
27
-		'customerNote' => '#sf-general-customerNote',
28
-		'personalInformations' => '#sf-contact-contact',
29
-		'resumePersonalInformations' => '#sf-contact',
30
-	);
20
+    private $elementMap = array(
21
+        'name' => '#sf-nameForm',
22
+        'location' => '#sf-locationForm',
23
+        'employees' => '#sf-employeesManagement',
24
+        'workflow' => '#sf-workflowSettings',
25
+        'jobTitleAndLocation' => '#general-locationForm',
26
+        'jobClassification' => '#sf-general-classifications',
27
+        'customerNote' => '#sf-general-customerNote',
28
+        'personalInformations' => '#sf-contact-contact',
29
+        'resumePersonalInformations' => '#sf-contact',
30
+    );
31 31
 	
32
-	/**
33
-	 * @When I click edit on :name form
34
-	 * @TODO: [ZF3] move this method to CoreContext
35
-	 */
36
-	public function iClickEditOnForm($name)
37
-	{
38
-		$this->iClickForm($name);
39
-		$name = Inflector::camelize($name);
40
-		$type = $this->elementMap[$name];
41
-		$locator = $type.' .sf-summary .sf-controls button';
42
-		$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
43
-		if(!$element){
44
-			throw new \Exception('No element found with this locator: "'.$locator.'"');
45
-		}
46
-		$element->click();
47
-	}
32
+    /**
33
+     * @When I click edit on :name form
34
+     * @TODO: [ZF3] move this method to CoreContext
35
+     */
36
+    public function iClickEditOnForm($name)
37
+    {
38
+        $this->iClickForm($name);
39
+        $name = Inflector::camelize($name);
40
+        $type = $this->elementMap[$name];
41
+        $locator = $type.' .sf-summary .sf-controls button';
42
+        $element = $this->minkContext->getSession()->getPage()->find('css',$locator);
43
+        if(!$element){
44
+            throw new \Exception('No element found with this locator: "'.$locator.'"');
45
+        }
46
+        $element->click();
47
+    }
48 48
 	
49
-	/**
50
-	 * @When I click :form form
51
-	 */
52
-	public function iClickForm($name)
53
-	{
54
-		$name = Inflector::camelize($name);
55
-		$type = $this->elementMap[$name];
56
-		$locator = $type.' .sf-summary';
57
-		$session = $this->minkContext->getSession();
58
-		$script = <<<EOC
49
+    /**
50
+     * @When I click :form form
51
+     */
52
+    public function iClickForm($name)
53
+    {
54
+        $name = Inflector::camelize($name);
55
+        $type = $this->elementMap[$name];
56
+        $locator = $type.' .sf-summary';
57
+        $session = $this->minkContext->getSession();
58
+        $script = <<<EOC
59 59
 var tElement = jQuery("$locator .sf-controls");
60 60
 tElement.css('display','block');
61 61
 tElement.css('visibility','visible');
62 62
 EOC;
63
-		$session->executeScript($script);
64
-	}
63
+        $session->executeScript($script);
64
+    }
65 65
 	
66
-	/**
67
-	 * @When I save :type form
68
-	 */
69
-	public function iSaveForm($type)
70
-	{
71
-		$type = Inflector::camelize($type);
72
-		$method = 'iSave'.$type;
73
-		if(method_exists($this,$method)){
74
-			call_user_func([$this,$method]);
75
-		}else{
76
-			$locator = $this->elementMap[$type].'-buttons-submit';
77
-			$this->coreContext->scrollIntoView($locator);
78
-			$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
79
-			$element->click();
80
-		}
81
-	}
66
+    /**
67
+     * @When I save :type form
68
+     */
69
+    public function iSaveForm($type)
70
+    {
71
+        $type = Inflector::camelize($type);
72
+        $method = 'iSave'.$type;
73
+        if(method_exists($this,$method)){
74
+            call_user_func([$this,$method]);
75
+        }else{
76
+            $locator = $this->elementMap[$type].'-buttons-submit';
77
+            $this->coreContext->scrollIntoView($locator);
78
+            $element = $this->minkContext->getSession()->getPage()->find('css',$locator);
79
+            $element->click();
80
+        }
81
+    }
82 82
 	
83
-	public function iSaveOrganizationName()
84
-	{
85
-		$locator = '#nameForm-buttons-submit';
86
-		$this->coreContext->scrollIntoView($locator);
87
-		$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
88
-		$element->click();
89
-	}
83
+    public function iSaveOrganizationName()
84
+    {
85
+        $locator = '#nameForm-buttons-submit';
86
+        $this->coreContext->scrollIntoView($locator);
87
+        $element = $this->minkContext->getSession()->getPage()->find('css',$locator);
88
+        $element->click();
89
+    }
90 90
 	
91
-	/**
92
-	 * Saving organization workflow
93
-	 */
94
-	public function iSaveWorkflow()
95
-	{
96
-		$locator = '#workflowSettings-buttons-submit';
97
-		$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
98
-		$element->click();
99
-	}
91
+    /**
92
+     * Saving organization workflow
93
+     */
94
+    public function iSaveWorkflow()
95
+    {
96
+        $locator = '#workflowSettings-buttons-submit';
97
+        $element = $this->minkContext->getSession()->getPage()->find('css',$locator);
98
+        $element->click();
99
+    }
100 100
 	
101
-	public function iSaveOrganizationLocation()
102
-	{
103
-		$locator = '#locationForm-buttons-submit';
104
-		$this->coreContext->scrollIntoView($locator);
105
-		$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
106
-		$element->click();
107
-	}
101
+    public function iSaveOrganizationLocation()
102
+    {
103
+        $locator = '#locationForm-buttons-submit';
104
+        $this->coreContext->scrollIntoView($locator);
105
+        $element = $this->minkContext->getSession()->getPage()->find('css',$locator);
106
+        $element->click();
107
+    }
108 108
 	
109 109
 	
110
-	public function iSaveJobClassification()
111
-	{
112
-		$locator = '#general-classifications-buttons-submit';
113
-		$this->coreContext->scrollIntoView($locator);
114
-		$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
115
-		$element->click();
116
-	}
110
+    public function iSaveJobClassification()
111
+    {
112
+        $locator = '#general-classifications-buttons-submit';
113
+        $this->coreContext->scrollIntoView($locator);
114
+        $element = $this->minkContext->getSession()->getPage()->find('css',$locator);
115
+        $element->click();
116
+    }
117 117
 	
118
-	public function iSaveCustomerNote()
119
-	{
120
-		$locator = '#general-customerNote-buttons-submit';
121
-		$this->coreContext->scrollIntoView('#sf-general-customerNote');
122
-		$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
123
-		$element->click();
124
-	}
118
+    public function iSaveCustomerNote()
119
+    {
120
+        $locator = '#general-customerNote-buttons-submit';
121
+        $this->coreContext->scrollIntoView('#sf-general-customerNote');
122
+        $element = $this->minkContext->getSession()->getPage()->find('css',$locator);
123
+        $element->click();
124
+    }
125 125
 	
126 126
 }
127 127
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
 		$name = Inflector::camelize($name);
40 40
 		$type = $this->elementMap[$name];
41 41
 		$locator = $type.' .sf-summary .sf-controls button';
42
-		$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
43
-		if(!$element){
42
+		$element = $this->minkContext->getSession()->getPage()->find('css', $locator);
43
+		if (!$element) {
44 44
 			throw new \Exception('No element found with this locator: "'.$locator.'"');
45 45
 		}
46 46
 		$element->click();
@@ -70,12 +70,12 @@  discard block
 block discarded – undo
70 70
 	{
71 71
 		$type = Inflector::camelize($type);
72 72
 		$method = 'iSave'.$type;
73
-		if(method_exists($this,$method)){
74
-			call_user_func([$this,$method]);
75
-		}else{
73
+		if (method_exists($this, $method)) {
74
+			call_user_func([$this, $method]);
75
+		} else {
76 76
 			$locator = $this->elementMap[$type].'-buttons-submit';
77 77
 			$this->coreContext->scrollIntoView($locator);
78
-			$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
78
+			$element = $this->minkContext->getSession()->getPage()->find('css', $locator);
79 79
 			$element->click();
80 80
 		}
81 81
 	}
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	{
85 85
 		$locator = '#nameForm-buttons-submit';
86 86
 		$this->coreContext->scrollIntoView($locator);
87
-		$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
87
+		$element = $this->minkContext->getSession()->getPage()->find('css', $locator);
88 88
 		$element->click();
89 89
 	}
90 90
 	
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 	public function iSaveWorkflow()
95 95
 	{
96 96
 		$locator = '#workflowSettings-buttons-submit';
97
-		$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
97
+		$element = $this->minkContext->getSession()->getPage()->find('css', $locator);
98 98
 		$element->click();
99 99
 	}
100 100
 	
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 	{
103 103
 		$locator = '#locationForm-buttons-submit';
104 104
 		$this->coreContext->scrollIntoView($locator);
105
-		$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
105
+		$element = $this->minkContext->getSession()->getPage()->find('css', $locator);
106 106
 		$element->click();
107 107
 	}
108 108
 	
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	{
112 112
 		$locator = '#general-classifications-buttons-submit';
113 113
 		$this->coreContext->scrollIntoView($locator);
114
-		$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
114
+		$element = $this->minkContext->getSession()->getPage()->find('css', $locator);
115 115
 		$element->click();
116 116
 	}
117 117
 	
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	{
120 120
 		$locator = '#general-customerNote-buttons-submit';
121 121
 		$this->coreContext->scrollIntoView('#sf-general-customerNote');
122
-		$element = $this->minkContext->getSession()->getPage()->find('css',$locator);
122
+		$element = $this->minkContext->getSession()->getPage()->find('css', $locator);
123 123
 		$element->click();
124 124
 	}
125 125
 	
Please login to merge, or discard this patch.
module/Jobs/config/module.config.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -274,9 +274,9 @@  discard block
 block discarded – undo
274 274
         ],
275 275
         'factories' => [
276 276
             'Jobs/Import' => [ Controller\ImportController::class, 'factory'],
277
-        	'Jobs/Console' => [ConsoleController::class,'factory'],
278
-	        'Jobs/AdminCategories' => [AdminCategoriesController::class,'factory'],
279
-	        'Jobs/Admin'      => [AdminController::class,'factory'],
277
+            'Jobs/Console' => [ConsoleController::class,'factory'],
278
+            'Jobs/AdminCategories' => [AdminCategoriesController::class,'factory'],
279
+            'Jobs/Admin'      => [AdminController::class,'factory'],
280 280
             'Jobs/Template' => 'Jobs\Factory\Controller\TemplateControllerFactory',
281 281
             'Jobs/Index' => 'Jobs\Factory\Controller\IndexControllerFactory',
282 282
             'Jobs/Approval' => 'Jobs\Factory\Controller\ApprovalControllerFactory',
@@ -428,15 +428,15 @@  discard block
 block discarded – undo
428 428
         'invokables' => [
429 429
             'Jobs/Location/New'                 => 'Jobs\Form\InputFilter\JobLocationNew',
430 430
             //'Jobs/Location/Edit'                => 'Jobs\Form\InputFilter\JobLocationEdit',
431
-	        JobLocationEdit::class => JobLocationEdit::class,
431
+            JobLocationEdit::class => JobLocationEdit::class,
432 432
             'Jobs/Company'                      => 'Jobs\Form\InputFilter\CompanyName',
433 433
         ],
434 434
         'factories' => [
435 435
             'Jobs/AtsMode'                      => 'Jobs\Factory\Form\InputFilter\AtsModeFactory',
436 436
         ],
437
-	    'aliases' => [
438
-	    	'Jobs/Location/Edit' => JobLocationEdit::class
439
-	    ]
437
+        'aliases' => [
438
+            'Jobs/Location/Edit' => JobLocationEdit::class
439
+        ]
440 440
     ],
441 441
 
442 442
     'filters' => [
Please login to merge, or discard this patch.
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
                  * for multiple paths.
22 22
                  * example https://github.com/doctrine/DoctrineORMModule
23 23
                  */
24
-                'paths' => [ __DIR__ . '/../src/Jobs/Entity'],
24
+                'paths' => [__DIR__.'/../src/Jobs/Entity'],
25 25
             ],
26 26
         ],
27 27
         'eventmanager' => [
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
     ],
35 35
 
36 36
     'options' => [
37
-        'Jobs/JobboardSearchOptions' => [ 'class' => '\Jobs\Options\JobboardSearchOptions' ],
38
-        'Jobs/BaseFieldsetOptions' => [ 'class' => '\Jobs\Options\BaseFieldsetOptions' ],
37
+        'Jobs/JobboardSearchOptions' => ['class' => '\Jobs\Options\JobboardSearchOptions'],
38
+        'Jobs/BaseFieldsetOptions' => ['class' => '\Jobs\Options\BaseFieldsetOptions'],
39 39
     ],
40 40
 
41 41
     'Jobs' => [
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
             'translation_file_patterns' => [
58 58
                     [
59 59
                             'type'     => 'gettext',
60
-                            'base_dir' => __DIR__ . '/../language',
60
+                            'base_dir' => __DIR__.'/../language',
61 61
                             'pattern'  => '%s.mo',
62 62
                     ],
63 63
             ],
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                     'Jobboard',
98 98
                     'Jobs/Jobboard',
99 99
                     'Jobs/ApiJobListByChannel',
100
-                    'Jobs/Template' => [ 'view', 'edittemplate' ],
100
+                    'Jobs/Template' => ['view', 'edittemplate'],
101 101
                     'Jobs/Manage' => [
102 102
                         'template',
103 103
                     ],
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
             'Jobs/Listener/AdminWidgetProvider'           => 'Jobs\Factory\Listener\AdminWidgetProviderFactory',
223 223
             'Jobs/ViewModelTemplateFilter'                => 'Jobs\Factory\Filter\ViewModelTemplateFilterFactory',
224 224
             'Jobs\Model\ApiJobDehydrator'                 => 'Jobs\Factory\Model\ApiJobDehydratorFactory',
225
-            'Jobs/Listener/Publisher'                     => [Publisher::class,'factory'],
225
+            'Jobs/Listener/Publisher'                     => [Publisher::class, 'factory'],
226 226
             'Jobs/PreviewLinkHydrator'                    => 'Jobs\Form\Hydrator\PreviewLinkHydrator::factory',
227 227
             'Jobs\Auth\Dependency\ListListener'           => 'Jobs\Factory\Auth\Dependency\ListListenerFactory',
228 228
             'Jobs/DefaultCategoriesBuilder'              => 'Jobs\Factory\Repository\DefaultCategoriesBuilderFactory',
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 
240 240
 
241 241
     'event_manager' => [
242
-        'Core/AdminController/Events' => [ 'listeners' => [
242
+        'Core/AdminController/Events' => ['listeners' => [
243 243
             'Jobs/Listener/AdminWidgetProvider' => \Core\Controller\AdminControllerEvent::EVENT_DASHBOARD,
244 244
         ]],
245 245
 
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
         'Core/Ajax/Events' => ['listeners' => [
262 262
             \Jobs\Listener\DeleteJob::class => ['jobs.delete', true],
263 263
             \Jobs\Listener\GetOrganizationManagers::class => ['jobs.manager-select', true],
264
-            \Jobs\Listener\LoadActiveOrganizations::class => [ 'jobs.admin.activeorganizations', true],
264
+            \Jobs\Listener\LoadActiveOrganizations::class => ['jobs.admin.activeorganizations', true],
265 265
 
266 266
         ]],
267 267
     ],
@@ -273,10 +273,10 @@  discard block
 block discarded – undo
273 273
             'Jobs/ApiJobListByChannel' => 'Jobs\Controller\ApiJobListByChannelController',
274 274
         ],
275 275
         'factories' => [
276
-            'Jobs/Import' => [ Controller\ImportController::class, 'factory'],
277
-        	'Jobs/Console' => [ConsoleController::class,'factory'],
278
-	        'Jobs/AdminCategories' => [AdminCategoriesController::class,'factory'],
279
-	        'Jobs/Admin'      => [AdminController::class,'factory'],
276
+            'Jobs/Import' => [Controller\ImportController::class, 'factory'],
277
+        	'Jobs/Console' => [ConsoleController::class, 'factory'],
278
+	        'Jobs/AdminCategories' => [AdminCategoriesController::class, 'factory'],
279
+	        'Jobs/Admin'      => [AdminController::class, 'factory'],
280 280
             'Jobs/Template' => 'Jobs\Factory\Controller\TemplateControllerFactory',
281 281
             'Jobs/Index' => 'Jobs\Factory\Controller\IndexControllerFactory',
282 282
             'Jobs/Approval' => 'Jobs\Factory\Controller\ApprovalControllerFactory',
@@ -309,41 +309,41 @@  discard block
 block discarded – undo
309 309
     'view_manager' => [
310 310
         // Map template to files. Speeds up the lookup through the template stack.
311 311
         'template_map' => [
312
-            'jobs/form/list-filter' => __DIR__ . '/../view/form/list-filter.phtml',
313
-            'jobs/form/apply-identifier' => __DIR__ . '/../view/form/apply-identifier.phtml',
314
-            'jobs/form/hiring-organization-select' => __DIR__ . '/../view/form/hiring-organization-select.phtml',
315
-            'jobs/form/multiposting-select' => __DIR__ . '/../view/form/multiposting-select.phtml',
316
-            'jobs/form/multiposting-checkboxes' => __DIR__ . '/../view/form/multiposting-checkboxes.phtml',
317
-            'jobs/form/ats-mode.view' => __DIR__ . '/../view/form/ats-mode.view.phtml',
318
-            'jobs/form/ats-mode.form' => __DIR__ . '/../view/form/ats-mode.form.phtml',
319
-            'jobs/form/company-name-fieldset' => __DIR__ . '/../view/form/company-name-fieldset.phtml',
320
-            'jobs/form/preview' => __DIR__ . '/../view/form/preview.phtml',
321
-            'jobs/form/customer-note' => __DIR__ . '/../view/form/customer-note.phtml',
322
-            'jobs/partials/channel-list' => __DIR__ . '/../view/partials/channel-list.phtml',
323
-            'jobs/assign-user' => __DIR__ . '/../view/jobs/manage/assign-user.phtml',
324
-            'jobs/snapshot_or_preview' => __DIR__ . '/../view/partials/snapshot_or_preview.phtml',
325
-            'jobs/history' => __DIR__ . '/../view/partials/history.phtml',
326
-            'jobs/portalsummary' => __DIR__ . '/../view/partials/portalsummary.phtml',
327
-            'content/jobs-publish-on-yawik' => __DIR__ . '/../view/modals/yawik.phtml',
328
-            'content/jobs-publish-on-jobsintown' => __DIR__ . '/../view/modals/jobsintown.phtml',
329
-            'content/jobs-publish-on-homepage' => __DIR__ . '/../view/modals/homepage.phtml',
330
-            'content/jobs-publish-on-fazjob' => __DIR__ . '/../view/modals/fazjob.phtml',
331
-            'content/jobs-terms-and-conditions' => __DIR__ . '/../view/jobs/index/terms.phtml',
332
-            'mail/job-created' => __DIR__ . '/../view/mails/job-created.phtml',
333
-            'mail/job-pending' => __DIR__ . '/../view/mails/job-pending.phtml',
334
-            'mail/job-accepted' => __DIR__ . '/../view/mails/job-accepted.phtml',
335
-            'mail/job-rejected' => __DIR__ . '/../view/mails/job-rejected.phtml',
336
-            'mail/job-created.en' => __DIR__ . '/../view/mails/job-created.en.phtml',
337
-            'mail/job-pending.en' => __DIR__ . '/../view/mails/job-pending.en.phtml',
338
-            'mail/job-accepted.en' => __DIR__ . '/../view/mails/job-accepted.en.phtml',
339
-            'mail/job-rejected.en' => __DIR__ . '/../view/mails/job-rejected.en.phtml',
340
-            'jobs/error/no-parent' => __DIR__ . '/../view/error/no-parent.phtml',
341
-            'jobs/error/expired' => __DIR__ . '/../view/error/expired.phtml',
312
+            'jobs/form/list-filter' => __DIR__.'/../view/form/list-filter.phtml',
313
+            'jobs/form/apply-identifier' => __DIR__.'/../view/form/apply-identifier.phtml',
314
+            'jobs/form/hiring-organization-select' => __DIR__.'/../view/form/hiring-organization-select.phtml',
315
+            'jobs/form/multiposting-select' => __DIR__.'/../view/form/multiposting-select.phtml',
316
+            'jobs/form/multiposting-checkboxes' => __DIR__.'/../view/form/multiposting-checkboxes.phtml',
317
+            'jobs/form/ats-mode.view' => __DIR__.'/../view/form/ats-mode.view.phtml',
318
+            'jobs/form/ats-mode.form' => __DIR__.'/../view/form/ats-mode.form.phtml',
319
+            'jobs/form/company-name-fieldset' => __DIR__.'/../view/form/company-name-fieldset.phtml',
320
+            'jobs/form/preview' => __DIR__.'/../view/form/preview.phtml',
321
+            'jobs/form/customer-note' => __DIR__.'/../view/form/customer-note.phtml',
322
+            'jobs/partials/channel-list' => __DIR__.'/../view/partials/channel-list.phtml',
323
+            'jobs/assign-user' => __DIR__.'/../view/jobs/manage/assign-user.phtml',
324
+            'jobs/snapshot_or_preview' => __DIR__.'/../view/partials/snapshot_or_preview.phtml',
325
+            'jobs/history' => __DIR__.'/../view/partials/history.phtml',
326
+            'jobs/portalsummary' => __DIR__.'/../view/partials/portalsummary.phtml',
327
+            'content/jobs-publish-on-yawik' => __DIR__.'/../view/modals/yawik.phtml',
328
+            'content/jobs-publish-on-jobsintown' => __DIR__.'/../view/modals/jobsintown.phtml',
329
+            'content/jobs-publish-on-homepage' => __DIR__.'/../view/modals/homepage.phtml',
330
+            'content/jobs-publish-on-fazjob' => __DIR__.'/../view/modals/fazjob.phtml',
331
+            'content/jobs-terms-and-conditions' => __DIR__.'/../view/jobs/index/terms.phtml',
332
+            'mail/job-created' => __DIR__.'/../view/mails/job-created.phtml',
333
+            'mail/job-pending' => __DIR__.'/../view/mails/job-pending.phtml',
334
+            'mail/job-accepted' => __DIR__.'/../view/mails/job-accepted.phtml',
335
+            'mail/job-rejected' => __DIR__.'/../view/mails/job-rejected.phtml',
336
+            'mail/job-created.en' => __DIR__.'/../view/mails/job-created.en.phtml',
337
+            'mail/job-pending.en' => __DIR__.'/../view/mails/job-pending.en.phtml',
338
+            'mail/job-accepted.en' => __DIR__.'/../view/mails/job-accepted.en.phtml',
339
+            'mail/job-rejected.en' => __DIR__.'/../view/mails/job-rejected.en.phtml',
340
+            'jobs/error/no-parent' => __DIR__.'/../view/error/no-parent.phtml',
341
+            'jobs/error/expired' => __DIR__.'/../view/error/expired.phtml',
342 342
         ],
343 343
 
344 344
         // Where to look for view templates not mapped above
345 345
         'template_path_stack' => [
346
-            __DIR__ . '/../view',
346
+            __DIR__.'/../view',
347 347
         ],
348 348
     ],
349 349
 
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Controller/ImportController.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -191,9 +191,9 @@
 block discarded – undo
191 191
                                 $location = new Location();
192 192
                                 $coords = array_map(function ($i) { return (float) $i; }, $locData['coordinates']);
193 193
                                 $location->setCountry($locData['country'])
194
-                                         ->setRegion($locData['region'])
195
-                                         ->setCity($locData['city'])
196
-                                         ->setCoordinates(new Point($coords));
194
+                                            ->setRegion($locData['region'])
195
+                                            ->setCity($locData['city'])
196
+                                            ->setCoordinates(new Point($coords));
197 197
 
198 198
                                 $jobLocations->add($location);
199 199
                             }
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
                         $entity = $repositoriesJob->findOneBy(array("applyId" => (string) $applyId));
85 85
                         if (!isset($entity)) {
86 86
                             // new Job (the more likely branch)
87
-                            $entity =$repositoriesJob->create(array("applyId" => (string) $applyId));
87
+                            $entity = $repositoriesJob->create(array("applyId" => (string) $applyId));
88 88
                         } else {
89 89
                             $createdJob = false;
90 90
                         }
@@ -130,10 +130,10 @@  discard block
 block discarded – undo
130 130
                             $entity->getPermissions()->grant($group, PermissionsInterface::PERMISSION_VIEW);
131 131
                         }
132 132
                         $result['isSaved'] = true;
133
-                        $log->info('Jobs/manage/saveJob [user: ' . $user->getLogin() . ']:' . var_export($p, true));
133
+                        $log->info('Jobs/manage/saveJob [user: '.$user->getLogin().']:'.var_export($p, true));
134 134
 
135 135
                         if (!empty($params->companyId)) {
136
-                            $companyId                = $params->companyId . $loginSuffix;
136
+                            $companyId                = $params->companyId.$loginSuffix;
137 137
                             $repOrganization          = $repositories->get('Organizations/Organization');
138 138
                             $hydratorManager          = $services->get('HydratorManager');
139 139
                             /* @var \Organizations\Entity\Hydrator\OrganizationHydrator $hydrator */
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
                             $jobLocations->clear();
190 190
                             foreach ($locations as $locData) {
191 191
                                 $location = new Location();
192
-                                $coords = array_map(function ($i) { return (float) $i; }, $locData['coordinates']);
192
+                                $coords = array_map(function($i) { return (float) $i; }, $locData['coordinates']);
193 193
                                 $location->setCountry($locData['country'])
194 194
                                          ->setRegion($locData['region'])
195 195
                                          ->setCity($locData['city'])
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
                                                     break;
255 255
                                             }
256 256
                                             if (array_key_exists($portal, $result['portals'])) {
257
-                                                throw new \RuntimeException('Publisher-Events (internal error): There are two publisher registered for ' . $portal);
257
+                                                throw new \RuntimeException('Publisher-Events (internal error): There are two publisher registered for '.$portal);
258 258
                                             }
259 259
                                             $result['portals'][$portal] = $status;
260 260
                                         } else {
@@ -267,16 +267,16 @@  discard block
 block discarded – undo
267 267
                             }
268 268
                         }
269 269
                     } else {
270
-                        $log->info('Jobs/manage/saveJob [error: ' . $form->getMessages() . ']:' . var_export($p, true));
270
+                        $log->info('Jobs/manage/saveJob [error: '.$form->getMessages().']:'.var_export($p, true));
271 271
                         $result['valid Error'] = $form->getMessages();
272 272
                     }
273 273
                 }
274 274
             } else {
275
-                $log->info('Jobs/manage/saveJob [error: session lost]:' . var_export($p, true));
275
+                $log->info('Jobs/manage/saveJob [error: session lost]:'.var_export($p, true));
276 276
                 $result['message'] = 'session_id is lost';
277 277
             }
278 278
         } catch (\Exception $e) {
279
-            $result['message'] = 'exception occured: ' . $e->getMessage();
279
+            $result['message'] = 'exception occured: '.$e->getMessage();
280 280
         }
281 281
         //$services->get('Core/Log')->info('Jobs/manage/saveJob result:' . PHP_EOL . var_export($p, True));
282 282
         return new JsonModel($result);
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Listener/Events/JobEvent.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,13 +33,13 @@  discard block
 block discarded – undo
33 33
      * Event is fired when a users has created a new job opening and accepted the
34 34
      * terms and conditions
35 35
      */
36
-    const EVENT_JOB_CREATED   = 'job.created';
36
+    const EVENT_JOB_CREATED = 'job.created';
37 37
 
38 38
     /**
39 39
      * Event is fired when the owner of the YAWIK installation has accepted the job
40 40
      * opening
41 41
      */
42
-    const EVENT_JOB_ACCEPTED   = 'job.accepted';
42
+    const EVENT_JOB_ACCEPTED = 'job.accepted';
43 43
 
44 44
     /**
45 45
      * Event is fired, when the owner of the YAWIK installation has rejected the job
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     /**
56 56
      * get all available names for publishing
57 57
      */
58
-    const PORTAL_AVAIL_NAME    = 'portal.availname';
58
+    const PORTAL_AVAIL_NAME = 'portal.availname';
59 59
 
60 60
     /**
61 61
      * portals to be published
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/Tree/Node.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -69,6 +69,9 @@
 block discarded – undo
69 69
      */
70 70
     protected $parent;
71 71
 
72
+    /**
73
+     * @param string $value
74
+     */
72 75
     final public static function filterValue($value)
73 76
     {
74 77
         $value = mb_strtolower($value);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@
 block discarded – undo
153 153
 
154 154
     public function getValueWithParents($withRoot = false, $useNames = false)
155 155
     {
156
-        $parts = [ ($useNames ? $this->getName() : $this->getValue()) ];
156
+        $parts = [($useNames ? $this->getName() : $this->getValue())];
157 157
         $item = $this;
158 158
 
159 159
         while ($item = $item->getParent()) {
Please login to merge, or discard this patch.
module/Core/src/Core/Entity/SnapshotMeta.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@
 block discarded – undo
20 20
  * @ODM\HasLifecycleCallbacks
21 21
  */
22 22
 class SnapshotMeta implements ModificationDateAwareEntityInterface,
23
-                              DraftableEntityInterface,
24
-                              Status\StatusAwareEntityInterface
23
+                                DraftableEntityInterface,
24
+                                Status\StatusAwareEntityInterface
25 25
 {
26 26
     use ModificationDateAwareEntityTrait, DraftableEntityTrait, Status\StatusAwareEntityTrait;
27 27
 }
Please login to merge, or discard this patch.
module/Cv/src/Cv/Factory/Form/LanguageSkillCollectionFactory.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -9,19 +9,19 @@
 block discarded – undo
9 9
 
10 10
 class LanguageSkillCollectionFactory implements FactoryInterface
11 11
 {
12
-	/**
13
-	 * Create a CollectionContainer form
14
-	 *
15
-	 * @param ContainerInterface $container
16
-	 * @param string $requestedName
17
-	 * @param array|null $options
18
-	 *
19
-	 * @return \Core\Form\CollectionContainer
20
-	 */
12
+    /**
13
+     * Create a CollectionContainer form
14
+     *
15
+     * @param ContainerInterface $container
16
+     * @param string $requestedName
17
+     * @param array|null $options
18
+     *
19
+     * @return \Core\Form\CollectionContainer
20
+     */
21 21
     public function __invoke(ContainerInterface $container, $requestedName, array $options = null) {
22
-	    $collectionContainer = new CollectionContainer( 'Cv/LanguageSkillForm', new Language() );
23
-	    $collectionContainer->setLabel(/*@translate */ 'Additional Language Skills' );
22
+        $collectionContainer = new CollectionContainer( 'Cv/LanguageSkillForm', new Language() );
23
+        $collectionContainer->setLabel(/*@translate */ 'Additional Language Skills' );
24 24
 	
25
-	    return $collectionContainer;
25
+        return $collectionContainer;
26 26
     }
27 27
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 	 * @return \Core\Form\CollectionContainer
20 20
 	 */
21 21
     public function __invoke(ContainerInterface $container, $requestedName, array $options = null) {
22
-	    $collectionContainer = new CollectionContainer( 'Cv/LanguageSkillForm', new Language() );
22
+	    $collectionContainer = new CollectionContainer('Cv/LanguageSkillForm', new Language());
23 23
 	    $collectionContainer->setLabel(/*@translate */ 'Additional Language Skills' );
24 24
 	
25 25
 	    return $collectionContainer;
Please login to merge, or discard this patch.
module/Behat/src/CoreContext.php 3 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
 	public function gatherContexts(BeforeScenarioScope $scope)
40 40
 	{
41 41
 		$this->minkContext = $scope->getEnvironment()->getContext(MinkContext::class);
42
-		if(false === static::$jobCategoryChecked){
42
+		if (false === static::$jobCategoryChecked) {
43 43
 			/* @var Categories $catRepo */
44 44
 			$catRepo = $this->getRepositories()->get('Jobs/Category');
45 45
 			$all = $catRepo->findAll();
46
-			if(count($all) <= 1){
46
+			if (count($all) <= 1) {
47 47
 				$catRepo->createDefaultCategory('professions');
48 48
 				$catRepo->createDefaultCategory('industries');
49 49
 				$catRepo->createDefaultCategory('employmentTypes');
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	 */
58 58
 	public function getApplication()
59 59
 	{
60
-		if(!is_object(static::$application)){
60
+		if (!is_object(static::$application)) {
61 61
 			$configFile = realpath(__DIR__.'/../../../config/config.php');
62 62
 			$config = include($configFile);
63 63
 			static::$application = Application::init($config);
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 	public function iSubmitTheFormWithId($arg)
142 142
 	{
143 143
 		$node = $this->minkContext->getSession()->getPage()->find('css', $arg);
144
-		if($node) {
144
+		if ($node) {
145 145
 			$this->minkContext->getSession()->executeScript("jQuery('$arg').submit();");
146 146
 		} else {
147 147
 			throw new \Exception('Element not found');
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	public function iSetMainWindowName()
166 166
 	{
167 167
 		$window_name = 'main_window';
168
-		$script = 'window.name = "' . $window_name . '"';
168
+		$script = 'window.name = "'.$window_name.'"';
169 169
 		$this->getSession()->executeScript($script);
170 170
 	}
171 171
 	
@@ -224,14 +224,14 @@  discard block
 block discarded – undo
224 224
 				break;
225 225
 			
226 226
 			default:
227
-				throw new \Exception(__METHOD__ . ' Couldn\'t find selector: ' . $selector . ' - Allowed selectors: #id, .className, //xpath');
227
+				throw new \Exception(__METHOD__.' Couldn\'t find selector: '.$selector.' - Allowed selectors: #id, .className, //xpath');
228 228
 				break;
229 229
 		}
230 230
 		
231 231
 		try {
232 232
 			$this->getSession()->executeScript($function);
233 233
 		} catch (\Exception $e) {
234
-			throw new \Exception(__METHOD__ . ' failed'. ' Message: for this locator:"'.$selector.'"');
234
+			throw new \Exception(__METHOD__.' failed'.' Message: for this locator:"'.$selector.'"');
235 235
 		}
236 236
 	}
237 237
 	
@@ -252,10 +252,10 @@  discard block
 block discarded – undo
252 252
 	 *
253 253
 	 * @return \Behat\Mink\Element\NodeElement|mixed|null
254 254
 	 */
255
-	public function getElement($locator,$selector='css')
255
+	public function getElement($locator, $selector = 'css')
256 256
 	{
257 257
 		$page = $this->minkContext->getSession()->getPage();
258
-		$element = $page->find('css',$locator);
258
+		$element = $page->find('css', $locator);
259 259
 		return $element;
260 260
 	}
261 261
 	
@@ -287,12 +287,12 @@  discard block
 block discarded – undo
287 287
 		$session = $this->getSession();
288 288
 		$element = $session->getPage()->find(
289 289
 			'xpath',
290
-			$session->getSelectorsHandler()->selectorToXpath('xpath', '*//*[text()="'. $text .'"]')
290
+			$session->getSelectorsHandler()->selectorToXpath('xpath', '*//*[text()="'.$text.'"]')
291 291
 		);
292
-		if(null === $element){
292
+		if (null === $element) {
293 293
 			$element = $session->getPage()->find(
294 294
 				'named',
295
-				array('id',$text)
295
+				array('id', $text)
296 296
 			);
297 297
 		}
298 298
 		if (null === $element) {
Please login to merge, or discard this patch.
Indentation   +232 added lines, -232 removed lines patch added patch discarded remove patch
@@ -23,290 +23,290 @@
 block discarded – undo
23 23
  */
24 24
 class CoreContext extends RawMinkContext
25 25
 {
26
-	static protected $application;
26
+    static protected $application;
27 27
 	
28
-	/**
29
-	 * @var MinkContext
30
-	 */
31
-	protected $minkContext;
28
+    /**
29
+     * @var MinkContext
30
+     */
31
+    protected $minkContext;
32 32
 	
33
-	static private $jobCategoryChecked = false;
33
+    static private $jobCategoryChecked = false;
34 34
 	
35
-	/**
36
-	 * @BeforeScenario
37
-	 * @param BeforeScenarioScope $scope
38
-	 */
39
-	public function gatherContexts(BeforeScenarioScope $scope)
40
-	{
41
-		$this->minkContext = $scope->getEnvironment()->getContext(MinkContext::class);
42
-		if(false === static::$jobCategoryChecked){
43
-			/* @var Categories $catRepo */
44
-			$catRepo = $this->getRepositories()->get('Jobs/Category');
45
-			$all = $catRepo->findAll();
46
-			if(count($all) <= 1){
47
-				$catRepo->createDefaultCategory('professions');
48
-				$catRepo->createDefaultCategory('industries');
49
-				$catRepo->createDefaultCategory('employmentTypes');
50
-			}
51
-			static::$jobCategoryChecked = true;
52
-		}
53
-	}
35
+    /**
36
+     * @BeforeScenario
37
+     * @param BeforeScenarioScope $scope
38
+     */
39
+    public function gatherContexts(BeforeScenarioScope $scope)
40
+    {
41
+        $this->minkContext = $scope->getEnvironment()->getContext(MinkContext::class);
42
+        if(false === static::$jobCategoryChecked){
43
+            /* @var Categories $catRepo */
44
+            $catRepo = $this->getRepositories()->get('Jobs/Category');
45
+            $all = $catRepo->findAll();
46
+            if(count($all) <= 1){
47
+                $catRepo->createDefaultCategory('professions');
48
+                $catRepo->createDefaultCategory('industries');
49
+                $catRepo->createDefaultCategory('employmentTypes');
50
+            }
51
+            static::$jobCategoryChecked = true;
52
+        }
53
+    }
54 54
 	
55
-	/**
56
-	 * @return Application
57
-	 */
58
-	public function getApplication()
59
-	{
60
-		if(!is_object(static::$application)){
61
-			$configFile = realpath(__DIR__.'/../../../config/config.php');
62
-			$config = include($configFile);
63
-			static::$application = Application::init($config);
64
-		}
65
-		return static::$application;
66
-	}
55
+    /**
56
+     * @return Application
57
+     */
58
+    public function getApplication()
59
+    {
60
+        if(!is_object(static::$application)){
61
+            $configFile = realpath(__DIR__.'/../../../config/config.php');
62
+            $config = include($configFile);
63
+            static::$application = Application::init($config);
64
+        }
65
+        return static::$application;
66
+    }
67 67
 	
68
-	/**
69
-	 * @return \Zend\ServiceManager\ServiceManager
70
-	 */
71
-	public function getServiceManager()
72
-	{
73
-		return $this->getApplication()->getServiceManager();
74
-	}
68
+    /**
69
+     * @return \Zend\ServiceManager\ServiceManager
70
+     */
71
+    public function getServiceManager()
72
+    {
73
+        return $this->getApplication()->getServiceManager();
74
+    }
75 75
 	
76
-	/**
77
-	 * @return \Zend\EventManager\EventManagerInterface
78
-	 */
79
-	public function getEventManager()
80
-	{
81
-		return $this->getApplication()->getEventManager();
82
-	}
76
+    /**
77
+     * @return \Zend\EventManager\EventManagerInterface
78
+     */
79
+    public function getEventManager()
80
+    {
81
+        return $this->getApplication()->getEventManager();
82
+    }
83 83
 	
84
-	/**
85
-	 * @return RepositoryService
86
-	 */
87
-	public function getRepositories()
88
-	{
89
-		return $this->getServiceManager()->get('repositories');
90
-	}
84
+    /**
85
+     * @return RepositoryService
86
+     */
87
+    public function getRepositories()
88
+    {
89
+        return $this->getServiceManager()->get('repositories');
90
+    }
91 91
 	
92
-	/**
93
-	 * @param $name
94
-	 * @param array $params
95
-	 *
96
-	 * @return string
97
-	 */
98
-	public function generateUrl($name)
99
-	{
100
-		return $this->minkContext->locatePath($name);
101
-	}
92
+    /**
93
+     * @param $name
94
+     * @param array $params
95
+     *
96
+     * @return string
97
+     */
98
+    public function generateUrl($name)
99
+    {
100
+        return $this->minkContext->locatePath($name);
101
+    }
102 102
 	
103
-	/**
104
-	 * @When /^I hover over the element "([^"]*)"$/
105
-	 */
106
-	public function iHoverOverTheElement($locator)
107
-	{
108
-		$session = $this->minkContext->getSession(); // get the mink session
109
-		$element = $session->getPage()->find('css', $locator); // runs the actual query and returns the element
103
+    /**
104
+     * @When /^I hover over the element "([^"]*)"$/
105
+     */
106
+    public function iHoverOverTheElement($locator)
107
+    {
108
+        $session = $this->minkContext->getSession(); // get the mink session
109
+        $element = $session->getPage()->find('css', $locator); // runs the actual query and returns the element
110 110
 		
111
-		// errors must not pass silently
112
-		if (null === $element) {
113
-			throw new \InvalidArgumentException(sprintf('Could not evaluate CSS selector: "%s"', $locator));
114
-		}
111
+        // errors must not pass silently
112
+        if (null === $element) {
113
+            throw new \InvalidArgumentException(sprintf('Could not evaluate CSS selector: "%s"', $locator));
114
+        }
115 115
 		
116
-		// ok, let's hover it
117
-		$element->mouseOver();
118
-	}
116
+        // ok, let's hover it
117
+        $element->mouseOver();
118
+    }
119 119
 	
120
-	/**
121
-	 * @Given /^I wait for (\d+) seconds$/
122
-	 */
123
-	public function iWaitForSecond($second)
124
-	{
125
-		sleep($second);
126
-	}
120
+    /**
121
+     * @Given /^I wait for (\d+) seconds$/
122
+     */
123
+    public function iWaitForSecond($second)
124
+    {
125
+        sleep($second);
126
+    }
127 127
 	
128
-	/**
129
-	 * @Then /^I wait for the ajax response$/
130
-	 */
131
-	public function iWaitForTheAjaxResponse()
132
-	{
133
-		$this->getSession()->wait(5000, '(0 === jQuery.active)');
134
-	}
128
+    /**
129
+     * @Then /^I wait for the ajax response$/
130
+     */
131
+    public function iWaitForTheAjaxResponse()
132
+    {
133
+        $this->getSession()->wait(5000, '(0 === jQuery.active)');
134
+    }
135 135
 	
136
-	/**
137
-	 * Some forms do not have a Submit button just pass the ID
138
-	 *
139
-	 * @Given /^I submit the form with id "([^"]*)"$/
140
-	 */
141
-	public function iSubmitTheFormWithId($arg)
142
-	{
143
-		$node = $this->minkContext->getSession()->getPage()->find('css', $arg);
144
-		if($node) {
145
-			$this->minkContext->getSession()->executeScript("jQuery('$arg').submit();");
146
-		} else {
147
-			throw new \Exception('Element not found');
148
-		}
149
-	}
136
+    /**
137
+     * Some forms do not have a Submit button just pass the ID
138
+     *
139
+     * @Given /^I submit the form with id "([^"]*)"$/
140
+     */
141
+    public function iSubmitTheFormWithId($arg)
142
+    {
143
+        $node = $this->minkContext->getSession()->getPage()->find('css', $arg);
144
+        if($node) {
145
+            $this->minkContext->getSession()->executeScript("jQuery('$arg').submit();");
146
+        } else {
147
+            throw new \Exception('Element not found');
148
+        }
149
+    }
150 150
 	
151
-	/**
152
-	 * @Then I switch to popup :name
153
-	 *
154
-	 * @param $name
155
-	 */
156
-	public function iSwitchToPopup($name)
157
-	{
158
-		$this->iSetMainWindowName();
159
-		$this->getSession()->switchToWindow($name);
160
-	}
151
+    /**
152
+     * @Then I switch to popup :name
153
+     *
154
+     * @param $name
155
+     */
156
+    public function iSwitchToPopup($name)
157
+    {
158
+        $this->iSetMainWindowName();
159
+        $this->getSession()->switchToWindow($name);
160
+    }
161 161
 	
162
-	/**
163
-	 * @Then I set main window name
164
-	 */
165
-	public function iSetMainWindowName()
166
-	{
167
-		$window_name = 'main_window';
168
-		$script = 'window.name = "' . $window_name . '"';
169
-		$this->getSession()->executeScript($script);
170
-	}
162
+    /**
163
+     * @Then I set main window name
164
+     */
165
+    public function iSetMainWindowName()
166
+    {
167
+        $window_name = 'main_window';
168
+        $script = 'window.name = "' . $window_name . '"';
169
+        $this->getSession()->executeScript($script);
170
+    }
171 171
 	
172
-	/**
173
-	 * @Then I switch back to main window
174
-	 */
175
-	public function iSwitchBackToMainWindow()
176
-	{
177
-		$this->getSession()->switchToWindow('main_window');
178
-	}
172
+    /**
173
+     * @Then I switch back to main window
174
+     */
175
+    public function iSwitchBackToMainWindow()
176
+    {
177
+        $this->getSession()->switchToWindow('main_window');
178
+    }
179 179
 	
180
-	public function iVisit($url)
181
-	{
182
-		$this->minkContext->getSession()->visit($url);
183
-	}
180
+    public function iVisit($url)
181
+    {
182
+        $this->minkContext->getSession()->visit($url);
183
+    }
184 184
 	
185
-	/**
186
-	 * @When I scroll :selector into view
187
-	 *
188
-	 * @param string $selector Allowed selectors: #id, .className, //xpath
189
-	 *
190
-	 * @throws \Exception
191
-	 */
192
-	public function scrollIntoView($selector)
193
-	{
194
-		$locator = substr($selector, 0, 1);
185
+    /**
186
+     * @When I scroll :selector into view
187
+     *
188
+     * @param string $selector Allowed selectors: #id, .className, //xpath
189
+     *
190
+     * @throws \Exception
191
+     */
192
+    public function scrollIntoView($selector)
193
+    {
194
+        $locator = substr($selector, 0, 1);
195 195
 		
196
-		switch ($locator) {
197
-			case '/' : // XPath selector
198
-				$function = <<<JS
196
+        switch ($locator) {
197
+            case '/' : // XPath selector
198
+                $function = <<<JS
199 199
 (function(){
200 200
   var elem = document.evaluate($selector, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
201 201
   elem.scrollIntoView(false);
202 202
 })()
203 203
 JS;
204
-				break;
204
+                break;
205 205
 			
206
-			case '#' : // ID selector
207
-				$selector = substr($selector, 1);
208
-				$function = <<<JS
206
+            case '#' : // ID selector
207
+                $selector = substr($selector, 1);
208
+                $function = <<<JS
209 209
 (function(){
210 210
   var elem = document.getElementById("$selector");
211 211
   elem.scrollIntoView(false);
212 212
 })()
213 213
 JS;
214
-				break;
214
+                break;
215 215
 			
216
-			case '.' : // Class selector
217
-				$selector = substr($selector, 1);
218
-				$function = <<<JS
216
+            case '.' : // Class selector
217
+                $selector = substr($selector, 1);
218
+                $function = <<<JS
219 219
 (function(){
220 220
   var elem = document.getElementsByClassName("$selector");
221 221
   elem[0].scrollIntoView(false);
222 222
 })()
223 223
 JS;
224
-				break;
224
+                break;
225 225
 			
226
-			default:
227
-				throw new \Exception(__METHOD__ . ' Couldn\'t find selector: ' . $selector . ' - Allowed selectors: #id, .className, //xpath');
228
-				break;
229
-		}
226
+            default:
227
+                throw new \Exception(__METHOD__ . ' Couldn\'t find selector: ' . $selector . ' - Allowed selectors: #id, .className, //xpath');
228
+                break;
229
+        }
230 230
 		
231
-		try {
232
-			$this->getSession()->executeScript($function);
233
-		} catch (\Exception $e) {
234
-			throw new \Exception(__METHOD__ . ' failed'. ' Message: for this locator:"'.$selector.'"');
235
-		}
236
-	}
231
+        try {
232
+            $this->getSession()->executeScript($function);
233
+        } catch (\Exception $e) {
234
+            throw new \Exception(__METHOD__ . ' failed'. ' Message: for this locator:"'.$selector.'"');
235
+        }
236
+    }
237 237
 	
238 238
 	
239
-	/**
240
-	 * @When I click location selector
241
-	 */
242
-	public function iClickLocationSelector()
243
-	{
244
-		$locator = '#jobBase-geoLocation-span .select2';
245
-		$element = $this->getElement($locator);
246
-		$element->click();
247
-	}
239
+    /**
240
+     * @When I click location selector
241
+     */
242
+    public function iClickLocationSelector()
243
+    {
244
+        $locator = '#jobBase-geoLocation-span .select2';
245
+        $element = $this->getElement($locator);
246
+        $element->click();
247
+    }
248 248
 	
249
-	/**
250
-	 * @param $locator
251
-	 * @param string $selector
252
-	 *
253
-	 * @return \Behat\Mink\Element\NodeElement|mixed|null
254
-	 */
255
-	public function getElement($locator,$selector='css')
256
-	{
257
-		$page = $this->minkContext->getSession()->getPage();
258
-		$element = $page->find('css',$locator);
259
-		return $element;
260
-	}
249
+    /**
250
+     * @param $locator
251
+     * @param string $selector
252
+     *
253
+     * @return \Behat\Mink\Element\NodeElement|mixed|null
254
+     */
255
+    public function getElement($locator,$selector='css')
256
+    {
257
+        $page = $this->minkContext->getSession()->getPage();
258
+        $element = $page->find('css',$locator);
259
+        return $element;
260
+    }
261 261
 	
262
-	/**
263
-	 * @When I fill in location search with :term
264
-	 * @param $term
265
-	 */
266
-	public function iFillInLocationSearch($term)
267
-	{
268
-		$locator = '.select2-container--open .select2-search__field';
269
-		$element = $this->getElement($locator);
270
-		$element->focus();
271
-		$element->setValue($term);
272
-		$this->iWaitForTheAjaxResponse();
273
-	}
262
+    /**
263
+     * @When I fill in location search with :term
264
+     * @param $term
265
+     */
266
+    public function iFillInLocationSearch($term)
267
+    {
268
+        $locator = '.select2-container--open .select2-search__field';
269
+        $element = $this->getElement($locator);
270
+        $element->focus();
271
+        $element->setValue($term);
272
+        $this->iWaitForTheAjaxResponse();
273
+    }
274 274
 	
275
-	public function iClickOn()
276
-	{
275
+    public function iClickOn()
276
+    {
277 277
 	
278
-	}
278
+    }
279 279
 	
280
-	/**
281
-	 * Click some text
282
-	 *
283
-	 * @When /^I click on the text "([^"]*)"$/
284
-	 */
285
-	public function iClickOnTheText($text)
286
-	{
287
-		$session = $this->getSession();
288
-		$element = $session->getPage()->find(
289
-			'xpath',
290
-			$session->getSelectorsHandler()->selectorToXpath('xpath', '*//*[text()="'. $text .'"]')
291
-		);
292
-		if(null === $element){
293
-			$element = $session->getPage()->find(
294
-				'named',
295
-				array('id',$text)
296
-			);
297
-		}
298
-		if (null === $element) {
299
-			throw new \InvalidArgumentException(sprintf('Cannot find text: "%s"', $text));
300
-		}
280
+    /**
281
+     * Click some text
282
+     *
283
+     * @When /^I click on the text "([^"]*)"$/
284
+     */
285
+    public function iClickOnTheText($text)
286
+    {
287
+        $session = $this->getSession();
288
+        $element = $session->getPage()->find(
289
+            'xpath',
290
+            $session->getSelectorsHandler()->selectorToXpath('xpath', '*//*[text()="'. $text .'"]')
291
+        );
292
+        if(null === $element){
293
+            $element = $session->getPage()->find(
294
+                'named',
295
+                array('id',$text)
296
+            );
297
+        }
298
+        if (null === $element) {
299
+            throw new \InvalidArgumentException(sprintf('Cannot find text: "%s"', $text));
300
+        }
301 301
 		
302
-		$element->click();
302
+        $element->click();
303 303
 		
304
-	}
304
+    }
305 305
 
306 306
     /**
307 307
      * @Then /^(?:|I )should see translated text "(?P<text>(?:[^"]|\\")*)"$/
308 308
      */
309
-	public function iShouldSeeText($text)
309
+    public function iShouldSeeText($text)
310 310
     {
311 311
         $translator = $this->getServiceManager()->get('translator');
312 312
         $translated = $translator->translate($text);
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -91,7 +91,6 @@  discard block
 block discarded – undo
91 91
 	
92 92
 	/**
93 93
 	 * @param $name
94
-	 * @param array $params
95 94
 	 *
96 95
 	 * @return string
97 96
 	 */
@@ -102,6 +101,7 @@  discard block
 block discarded – undo
102 101
 	
103 102
 	/**
104 103
 	 * @When /^I hover over the element "([^"]*)"$/
104
+	 * @param string $locator
105 105
 	 */
106 106
 	public function iHoverOverTheElement($locator)
107 107
 	{
@@ -247,10 +247,10 @@  discard block
 block discarded – undo
247 247
 	}
248 248
 	
249 249
 	/**
250
-	 * @param $locator
250
+	 * @param string $locator
251 251
 	 * @param string $selector
252 252
 	 *
253
-	 * @return \Behat\Mink\Element\NodeElement|mixed|null
253
+	 * @return \Behat\Mink\Element\NodeElement|null
254 254
 	 */
255 255
 	public function getElement($locator,$selector='css')
256 256
 	{
Please login to merge, or discard this patch.
public/index.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -11,23 +11,23 @@  discard block
 block discarded – undo
11 11
 
12 12
 date_default_timezone_set('Europe/Berlin');
13 13
 
14
-if(!version_compare(PHP_VERSION, '5.6.0', 'ge')){
15
-    echo sprintf('<p>Sorry, YAWIK requires at least PHP 5.6.0 to run, but this server currently provides PHP %s</p>',PHP_VERSION);
14
+if (!version_compare(PHP_VERSION, '5.6.0', 'ge')) {
15
+    echo sprintf('<p>Sorry, YAWIK requires at least PHP 5.6.0 to run, but this server currently provides PHP %s</p>', PHP_VERSION);
16 16
     echo '<p>Please ask your servers\' administrator to install the proper PHP version.</p>';
17 17
     exit;
18 18
 }
19 19
 
20 20
 if (php_sapi_name() == 'cli-server') {
21 21
     $parseUrl = parse_url(substr($_SERVER["REQUEST_URI"], 1));
22
-    $route = isset($parseUrl['path']) ? $parseUrl['path']:null;
23
-    if (is_file(__DIR__ . '/' . $route)) {
24
-        if(substr($route, -4) == ".php"){
25
-            require __DIR__ . '/' . $route;     // Include requested script files
22
+    $route = isset($parseUrl['path']) ? $parseUrl['path'] : null;
23
+    if (is_file(__DIR__.'/'.$route)) {
24
+        if (substr($route, -4) == ".php") {
25
+            require __DIR__.'/'.$route; // Include requested script files
26 26
             exit;
27 27
         }
28
-        return false;           // Serve file as is
28
+        return false; // Serve file as is
29 29
     } else {                    // Fallback to index.php
30
-        $_GET["q"] = $route;    // Try to emulate the behaviour of a .htaccess here.
30
+        $_GET["q"] = $route; // Try to emulate the behaviour of a .htaccess here.
31 31
     }
32 32
 }
33 33
 
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
 } else {
48 48
     echo '<p>Could not initialize autoloading. This happens, if the dependencies are not installed yet.</p>';
49 49
     echo '<p>Please try to install the dependencies via: </p>';
50
-    echo '<code>cd '. realpath('.') .'<br>./install.sh</code>';
51
-    echo '<p>exit at ' . __FILE__ . ' in line ' . __LINE__ .'</p>';
50
+    echo '<code>cd '.realpath('.').'<br>./install.sh</code>';
51
+    echo '<p>exit at '.__FILE__.' in line '.__LINE__.'</p>';
52 52
     exit;
53 53
 }
54 54
 
Please login to merge, or discard this patch.