Completed
Push — develop ( a5396a...45a0ea )
by Mathias
05:23
created
module/Core/src/Core/Entity/AbstractIdentifiableEntity.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
  *
18 18
  * @author Anthonius Munthi <[email protected]>
19 19
  * @ODM\MappedSuperclass
20
-  */
20
+ */
21 21
 abstract class AbstractIdentifiableEntity extends AbstractEntity implements IdentifiableEntityInterface
22 22
 {
23 23
     use IdentifiableEntityTrait;
Please login to merge, or discard this patch.
module/Core/src/Core/Mail/MailServiceFactory.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -26,41 +26,41 @@
 block discarded – undo
26 26
  */
27 27
 class MailServiceFactory implements FactoryInterface
28 28
 {
29
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
30
-	{
31
-		$config = $container->get('Config');
32
-		$mails = isset($config['mails']) ? $config['mails'] : [];
29
+    public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
30
+    {
31
+        $config = $container->get('Config');
32
+        $mails = isset($config['mails']) ? $config['mails'] : [];
33 33
 		
34
-		/* @var \Auth\Options\ModuleOptions $authOptions */
35
-		$authOptions = $container->get('Auth/Options');
34
+        /* @var \Auth\Options\ModuleOptions $authOptions */
35
+        $authOptions = $container->get('Auth/Options');
36 36
 		
37
-		/* @var \Core\Options\MailServiceOptions $mailServiceOptions */
38
-		$mailServiceOptions = $container->get('Core/MailServiceOptions');
37
+        /* @var \Core\Options\MailServiceOptions $mailServiceOptions */
38
+        $mailServiceOptions = $container->get('Core/MailServiceOptions');
39 39
 		
40
-		$configArray = [
41
-			'from' => [
42
-				'name' => $authOptions->getFromName(),
43
-				'email' => $authOptions->getFromEmail()
44
-			],
45
-		];
40
+        $configArray = [
41
+            'from' => [
42
+                'name' => $authOptions->getFromName(),
43
+                'email' => $authOptions->getFromEmail()
44
+            ],
45
+        ];
46 46
 
47
-		$configArray['transport'] = $this->getTransport($mailServiceOptions);
48
-		$configArray = array_merge($configArray, $mails);
47
+        $configArray['transport'] = $this->getTransport($mailServiceOptions);
48
+        $configArray = array_merge($configArray, $mails);
49 49
 		
50
-		$config = new MailServiceConfig($configArray);
51
-		$service   = new MailService($container,$config->toArray());
52
-		$config->configureServiceManager($service);
53
-		foreach($config->toArray() as $name=>$value){
54
-			$method = 'set'.$name;
55
-			if(method_exists($service,$method)){
56
-				call_user_func([$service,$method],$value);
57
-			}
58
-		}
50
+        $config = new MailServiceConfig($configArray);
51
+        $service   = new MailService($container,$config->toArray());
52
+        $config->configureServiceManager($service);
53
+        foreach($config->toArray() as $name=>$value){
54
+            $method = 'set'.$name;
55
+            if(method_exists($service,$method)){
56
+                call_user_func([$service,$method],$value);
57
+            }
58
+        }
59 59
 		
60
-		return $service;
61
-	}
60
+        return $service;
61
+    }
62 62
 
63
-	public function getTransport(MailServiceOptions $mailServiceOptions)
63
+    public function getTransport(MailServiceOptions $mailServiceOptions)
64 64
     {
65 65
         $type = $mailServiceOptions->getTransportClass();
66 66
         if (MailService::TRANSPORT_SMTP == $type) {
Please login to merge, or discard this patch.
Organizations/src/Organizations/Controller/InviteEmployeeController.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      */
36 36
     private $orgRepo;
37 37
 
38
-	public function __construct(
38
+    public function __construct(
39 39
         OrganizationRepository $orgRepo
40 40
     )
41 41
     {
Please login to merge, or discard this patch.
module/Behat/src/CommonContextTrait.php 1 patch
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -18,43 +18,43 @@  discard block
 block discarded – undo
18 18
 
19 19
 trait CommonContextTrait
20 20
 {
21
-	/**
22
-	 * @var MinkContext
23
-	 */
24
-	protected $minkContext;
21
+    /**
22
+     * @var MinkContext
23
+     */
24
+    protected $minkContext;
25 25
 	
26
-	/**
27
-	 * @var CoreContext
28
-	 */
29
-	protected $coreContext;
26
+    /**
27
+     * @var CoreContext
28
+     */
29
+    protected $coreContext;
30 30
 	
31
-	/**
32
-	 * @var UserContext
33
-	 */
34
-	protected $userContext;
31
+    /**
32
+     * @var UserContext
33
+     */
34
+    protected $userContext;
35 35
 	
36
-	/**
37
-	 * @var SummaryFormContext
38
-	 */
39
-	protected $summaryFormContext;
36
+    /**
37
+     * @var SummaryFormContext
38
+     */
39
+    protected $summaryFormContext;
40 40
 	
41
-	/**
42
-	 * @BeforeScenario
43
-	 *
44
-	 * @param BeforeScenarioScope $scope
45
-	 */
46
-	final public function gatherContexts(BeforeScenarioScope $scope)
47
-	{
48
-		$this->minkContext = $scope->getEnvironment()->getContext(MinkContext::class);
49
-		$this->coreContext = $scope->getEnvironment()->getContext(CoreContext::class);
50
-		$this->userContext = $scope->getEnvironment()->getContext(UserContext::class);
51
-		$this->summaryFormContext = $scope->getEnvironment()->getContext(SummaryFormContext::class);
52
-	}
41
+    /**
42
+     * @BeforeScenario
43
+     *
44
+     * @param BeforeScenarioScope $scope
45
+     */
46
+    final public function gatherContexts(BeforeScenarioScope $scope)
47
+    {
48
+        $this->minkContext = $scope->getEnvironment()->getContext(MinkContext::class);
49
+        $this->coreContext = $scope->getEnvironment()->getContext(CoreContext::class);
50
+        $this->userContext = $scope->getEnvironment()->getContext(UserContext::class);
51
+        $this->summaryFormContext = $scope->getEnvironment()->getContext(SummaryFormContext::class);
52
+    }
53 53
 	
54
-	public function buildUrl($name, array $params=array(), array $options=array())
55
-	{
56
-	    $defaults = ['lang'=>'en'];
57
-	    $params = array_merge($defaults,$params);
54
+    public function buildUrl($name, array $params=array(), array $options=array())
55
+    {
56
+        $defaults = ['lang'=>'en'];
57
+        $params = array_merge($defaults,$params);
58 58
         /* @var Url $urlHelper */
59 59
         $urlHelper = $this
60 60
             ->getService('ViewHelperManager')
@@ -63,36 +63,36 @@  discard block
 block discarded – undo
63 63
         $url = $urlHelper($name,$params,$options);
64 64
 
65 65
         return $this->coreContext->generateUrl($url);
66
-	}
66
+    }
67 67
 	
68
-	public function visit($url)
69
-	{
70
-		$this->coreContext->iVisit($url);
71
-	}
68
+    public function visit($url)
69
+    {
70
+        $this->coreContext->iVisit($url);
71
+    }
72 72
 	
73
-	/**
74
-	 * @param $id
75
-	 * @return mixed|object
76
-	 */
77
-	public function getService($id)
78
-	{
79
-		return $this->coreContext->getServiceManager()->get($id);
80
-	}
73
+    /**
74
+     * @param $id
75
+     * @return mixed|object
76
+     */
77
+    public function getService($id)
78
+    {
79
+        return $this->coreContext->getServiceManager()->get($id);
80
+    }
81 81
 	
82
-	/**
83
-	 * @param $id
84
-	 *
85
-	 * @return RepositoryInterface
86
-	 */
87
-	public function getRepository($id)
88
-	{
89
-		return $this->coreContext->getRepositories()->get($id);
90
-	}
82
+    /**
83
+     * @param $id
84
+     *
85
+     * @return RepositoryInterface
86
+     */
87
+    public function getRepository($id)
88
+    {
89
+        return $this->coreContext->getRepositories()->get($id);
90
+    }
91 91
 
92 92
     /**
93 93
      * @return UserContext
94 94
      */
95
-	public function getUserContext()
95
+    public function getUserContext()
96 96
     {
97 97
         return $this->userContext;
98 98
     }
Please login to merge, or discard this patch.
module/Behat/src/CoreContext.php 1 patch
Indentation   +227 added lines, -227 removed lines patch added patch discarded remove patch
@@ -25,283 +25,283 @@
 block discarded – undo
25 25
 {
26 26
     use CommonContextTrait;
27 27
 
28
-	static protected $application;
28
+    static protected $application;
29 29
 	
30
-	static private $jobCategoryChecked = false;
30
+    static private $jobCategoryChecked = false;
31 31
 	
32
-	/**
33
-	 * @BeforeScenario
34
-	 * @param BeforeScenarioScope $scope
35
-	 */
36
-	public function setupContexts(BeforeScenarioScope $scope)
37
-	{
38
-		if(false === static::$jobCategoryChecked){
39
-			/* @var Categories $catRepo */
40
-			$catRepo = $this->getRepositories()->get('Jobs/Category');
41
-			$all = $catRepo->findAll();
42
-			if(count($all) <= 1){
43
-				$catRepo->createDefaultCategory('professions');
44
-				$catRepo->createDefaultCategory('industries');
45
-				$catRepo->createDefaultCategory('employmentTypes');
46
-			}
47
-			static::$jobCategoryChecked = true;
48
-		}
49
-	}
32
+    /**
33
+     * @BeforeScenario
34
+     * @param BeforeScenarioScope $scope
35
+     */
36
+    public function setupContexts(BeforeScenarioScope $scope)
37
+    {
38
+        if(false === static::$jobCategoryChecked){
39
+            /* @var Categories $catRepo */
40
+            $catRepo = $this->getRepositories()->get('Jobs/Category');
41
+            $all = $catRepo->findAll();
42
+            if(count($all) <= 1){
43
+                $catRepo->createDefaultCategory('professions');
44
+                $catRepo->createDefaultCategory('industries');
45
+                $catRepo->createDefaultCategory('employmentTypes');
46
+            }
47
+            static::$jobCategoryChecked = true;
48
+        }
49
+    }
50 50
 	
51
-	/**
52
-	 * @return Application
53
-	 */
54
-	public function getApplication()
55
-	{
56
-		if(!is_object(static::$application)){
57
-			$configFile = realpath(__DIR__.'/../../../config/config.php');
58
-			$config = include($configFile);
59
-			static::$application = Application::init($config);
60
-		}
61
-		return static::$application;
62
-	}
51
+    /**
52
+     * @return Application
53
+     */
54
+    public function getApplication()
55
+    {
56
+        if(!is_object(static::$application)){
57
+            $configFile = realpath(__DIR__.'/../../../config/config.php');
58
+            $config = include($configFile);
59
+            static::$application = Application::init($config);
60
+        }
61
+        return static::$application;
62
+    }
63 63
 	
64
-	/**
65
-	 * @return \Zend\ServiceManager\ServiceManager
66
-	 */
67
-	public function getServiceManager()
68
-	{
69
-		return $this->getApplication()->getServiceManager();
70
-	}
64
+    /**
65
+     * @return \Zend\ServiceManager\ServiceManager
66
+     */
67
+    public function getServiceManager()
68
+    {
69
+        return $this->getApplication()->getServiceManager();
70
+    }
71 71
 	
72
-	/**
73
-	 * @return \Zend\EventManager\EventManagerInterface
74
-	 */
75
-	public function getEventManager()
76
-	{
77
-		return $this->getApplication()->getEventManager();
78
-	}
72
+    /**
73
+     * @return \Zend\EventManager\EventManagerInterface
74
+     */
75
+    public function getEventManager()
76
+    {
77
+        return $this->getApplication()->getEventManager();
78
+    }
79 79
 	
80
-	/**
81
-	 * @return RepositoryService
82
-	 */
83
-	public function getRepositories()
84
-	{
85
-		return $this->getServiceManager()->get('repositories');
86
-	}
80
+    /**
81
+     * @return RepositoryService
82
+     */
83
+    public function getRepositories()
84
+    {
85
+        return $this->getServiceManager()->get('repositories');
86
+    }
87 87
 	
88
-	/**
89
-	 * @param $name
90
-	 * @param array $params
91
-	 *
92
-	 * @return string
93
-	 */
94
-	public function generateUrl($name)
95
-	{
96
-		return $this->minkContext->locatePath($name);
97
-	}
88
+    /**
89
+     * @param $name
90
+     * @param array $params
91
+     *
92
+     * @return string
93
+     */
94
+    public function generateUrl($name)
95
+    {
96
+        return $this->minkContext->locatePath($name);
97
+    }
98 98
 
99
-	/**
100
-	 * @When /^I hover over the element "([^"]*)"$/
101
-	 */
102
-	public function iHoverOverTheElement($locator)
103
-	{
104
-		$session = $this->minkContext->getSession(); // get the mink session
105
-		$element = $session->getPage()->find('css', $locator); // runs the actual query and returns the element
99
+    /**
100
+     * @When /^I hover over the element "([^"]*)"$/
101
+     */
102
+    public function iHoverOverTheElement($locator)
103
+    {
104
+        $session = $this->minkContext->getSession(); // get the mink session
105
+        $element = $session->getPage()->find('css', $locator); // runs the actual query and returns the element
106 106
 		
107
-		// errors must not pass silently
108
-		if (null === $element) {
109
-			throw new \InvalidArgumentException(sprintf('Could not evaluate CSS selector: "%s"', $locator));
110
-		}
107
+        // errors must not pass silently
108
+        if (null === $element) {
109
+            throw new \InvalidArgumentException(sprintf('Could not evaluate CSS selector: "%s"', $locator));
110
+        }
111 111
 		
112
-		// ok, let's hover it
113
-		$element->mouseOver();
114
-	}
112
+        // ok, let's hover it
113
+        $element->mouseOver();
114
+    }
115 115
 	
116
-	/**
117
-	 * @Given /^I wait for (\d+) seconds$/
118
-	 */
119
-	public function iWaitForSecond($second)
120
-	{
121
-		sleep($second);
122
-	}
116
+    /**
117
+     * @Given /^I wait for (\d+) seconds$/
118
+     */
119
+    public function iWaitForSecond($second)
120
+    {
121
+        sleep($second);
122
+    }
123 123
 	
124
-	/**
125
-	 * @Then /^I wait for the ajax response$/
126
-	 */
127
-	public function iWaitForTheAjaxResponse()
128
-	{
129
-		$this->getSession()->wait(5000, '(0 === jQuery.active)');
130
-	}
124
+    /**
125
+     * @Then /^I wait for the ajax response$/
126
+     */
127
+    public function iWaitForTheAjaxResponse()
128
+    {
129
+        $this->getSession()->wait(5000, '(0 === jQuery.active)');
130
+    }
131 131
 	
132
-	/**
133
-	 * Some forms do not have a Submit button just pass the ID
134
-	 *
135
-	 * @Given /^I submit the form with id "([^"]*)"$/
136
-	 */
137
-	public function iSubmitTheFormWithId($arg)
138
-	{
139
-		$node = $this->minkContext->getSession()->getPage()->find('css', $arg);
140
-		if($node) {
141
-			$this->minkContext->getSession()->executeScript("jQuery('$arg').submit();");
142
-		} else {
143
-			throw new \Exception('Element not found');
144
-		}
145
-	}
132
+    /**
133
+     * Some forms do not have a Submit button just pass the ID
134
+     *
135
+     * @Given /^I submit the form with id "([^"]*)"$/
136
+     */
137
+    public function iSubmitTheFormWithId($arg)
138
+    {
139
+        $node = $this->minkContext->getSession()->getPage()->find('css', $arg);
140
+        if($node) {
141
+            $this->minkContext->getSession()->executeScript("jQuery('$arg').submit();");
142
+        } else {
143
+            throw new \Exception('Element not found');
144
+        }
145
+    }
146 146
 	
147
-	/**
148
-	 * @Then I switch to popup :name
149
-	 *
150
-	 * @param $name
151
-	 */
152
-	public function iSwitchToPopup($name)
153
-	{
154
-		$this->iSetMainWindowName();
155
-		$this->getSession()->switchToWindow($name);
156
-	}
147
+    /**
148
+     * @Then I switch to popup :name
149
+     *
150
+     * @param $name
151
+     */
152
+    public function iSwitchToPopup($name)
153
+    {
154
+        $this->iSetMainWindowName();
155
+        $this->getSession()->switchToWindow($name);
156
+    }
157 157
 	
158
-	/**
159
-	 * @Then I set main window name
160
-	 */
161
-	public function iSetMainWindowName()
162
-	{
163
-		$window_name = 'main_window';
164
-		$script = 'window.name = "' . $window_name . '"';
165
-		$this->getSession()->executeScript($script);
166
-	}
158
+    /**
159
+     * @Then I set main window name
160
+     */
161
+    public function iSetMainWindowName()
162
+    {
163
+        $window_name = 'main_window';
164
+        $script = 'window.name = "' . $window_name . '"';
165
+        $this->getSession()->executeScript($script);
166
+    }
167 167
 	
168
-	/**
169
-	 * @Then I switch back to main window
170
-	 */
171
-	public function iSwitchBackToMainWindow()
172
-	{
173
-		$this->getSession()->switchToWindow('main_window');
174
-	}
168
+    /**
169
+     * @Then I switch back to main window
170
+     */
171
+    public function iSwitchBackToMainWindow()
172
+    {
173
+        $this->getSession()->switchToWindow('main_window');
174
+    }
175 175
 	
176
-	public function iVisit($url)
177
-	{
178
-		$this->minkContext->getSession()->visit($url);
179
-	}
176
+    public function iVisit($url)
177
+    {
178
+        $this->minkContext->getSession()->visit($url);
179
+    }
180 180
 	
181
-	/**
182
-	 * @When I scroll :selector into view
183
-	 *
184
-	 * @param string $selector Allowed selectors: #id, .className, //xpath
185
-	 *
186
-	 * @throws \Exception
187
-	 */
188
-	public function scrollIntoView($selector)
189
-	{
190
-		$locator = substr($selector, 0, 1);
181
+    /**
182
+     * @When I scroll :selector into view
183
+     *
184
+     * @param string $selector Allowed selectors: #id, .className, //xpath
185
+     *
186
+     * @throws \Exception
187
+     */
188
+    public function scrollIntoView($selector)
189
+    {
190
+        $locator = substr($selector, 0, 1);
191 191
 		
192
-		switch ($locator) {
193
-			case '/' : // XPath selector
194
-				$function = <<<JS
192
+        switch ($locator) {
193
+            case '/' : // XPath selector
194
+                $function = <<<JS
195 195
 (function(){
196 196
   var elem = document.evaluate($selector, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
197 197
   elem.scrollIntoView(false);
198 198
 })()
199 199
 JS;
200
-				break;
200
+                break;
201 201
 			
202
-			case '#' : // ID selector
203
-				$selector = substr($selector, 1);
204
-				$function = <<<JS
202
+            case '#' : // ID selector
203
+                $selector = substr($selector, 1);
204
+                $function = <<<JS
205 205
 (function(){
206 206
   var elem = document.getElementById("$selector");
207 207
   elem.scrollIntoView(false);
208 208
 })()
209 209
 JS;
210
-				break;
210
+                break;
211 211
 			
212
-			case '.' : // Class selector
213
-				$selector = substr($selector, 1);
214
-				$function = <<<JS
212
+            case '.' : // Class selector
213
+                $selector = substr($selector, 1);
214
+                $function = <<<JS
215 215
 (function(){
216 216
   var elem = document.getElementsByClassName("$selector");
217 217
   elem[0].scrollIntoView(false);
218 218
 })()
219 219
 JS;
220
-				break;
220
+                break;
221 221
 			
222
-			default:
223
-				throw new \Exception(__METHOD__ . ' Couldn\'t find selector: ' . $selector . ' - Allowed selectors: #id, .className, //xpath');
224
-				break;
225
-		}
222
+            default:
223
+                throw new \Exception(__METHOD__ . ' Couldn\'t find selector: ' . $selector . ' - Allowed selectors: #id, .className, //xpath');
224
+                break;
225
+        }
226 226
 		
227
-		try {
228
-			$this->getSession()->executeScript($function);
229
-		} catch (\Exception $e) {
230
-			throw new \Exception(__METHOD__ . ' failed'. ' Message: for this locator:"'.$selector.'"');
231
-		}
232
-	}
227
+        try {
228
+            $this->getSession()->executeScript($function);
229
+        } catch (\Exception $e) {
230
+            throw new \Exception(__METHOD__ . ' failed'. ' Message: for this locator:"'.$selector.'"');
231
+        }
232
+    }
233 233
 	
234
-	/**
235
-	 * @When I click location selector
236
-	 */
237
-	public function iClickLocationSelector()
238
-	{
239
-		$locator = '#jobBase-geoLocation-span .select2';
240
-		$element = $this->getElement($locator);
241
-		$element->click();
242
-	}
234
+    /**
235
+     * @When I click location selector
236
+     */
237
+    public function iClickLocationSelector()
238
+    {
239
+        $locator = '#jobBase-geoLocation-span .select2';
240
+        $element = $this->getElement($locator);
241
+        $element->click();
242
+    }
243 243
 	
244
-	/**
245
-	 * @param $locator
246
-	 * @param string $selector
247
-	 *
248
-	 * @return \Behat\Mink\Element\NodeElement|mixed|null
249
-	 */
250
-	public function getElement($locator,$selector='css')
251
-	{
252
-		$page = $this->minkContext->getSession()->getPage();
253
-		$element = $page->find('css',$locator);
254
-		return $element;
255
-	}
244
+    /**
245
+     * @param $locator
246
+     * @param string $selector
247
+     *
248
+     * @return \Behat\Mink\Element\NodeElement|mixed|null
249
+     */
250
+    public function getElement($locator,$selector='css')
251
+    {
252
+        $page = $this->minkContext->getSession()->getPage();
253
+        $element = $page->find('css',$locator);
254
+        return $element;
255
+    }
256 256
 	
257
-	/**
258
-	 * @When I fill in location search with :term
259
-	 * @param $term
260
-	 */
261
-	public function iFillInLocationSearch($term)
262
-	{
263
-		$locator = '.select2-container--open .select2-search__field';
264
-		$element = $this->getElement($locator);
265
-		$element->focus();
266
-		$element->setValue($term);
267
-		$this->iWaitForTheAjaxResponse();
268
-	}
257
+    /**
258
+     * @When I fill in location search with :term
259
+     * @param $term
260
+     */
261
+    public function iFillInLocationSearch($term)
262
+    {
263
+        $locator = '.select2-container--open .select2-search__field';
264
+        $element = $this->getElement($locator);
265
+        $element->focus();
266
+        $element->setValue($term);
267
+        $this->iWaitForTheAjaxResponse();
268
+    }
269 269
 	
270
-	public function iClickOn()
271
-	{
270
+    public function iClickOn()
271
+    {
272 272
 	
273
-	}
273
+    }
274 274
 	
275
-	/**
276
-	 * Click some text
277
-	 *
278
-	 * @When /^I click on the text "([^"]*)"$/
279
-	 */
280
-	public function iClickOnTheText($text)
281
-	{
282
-		$session = $this->getSession();
283
-		$element = $session->getPage()->find(
284
-			'xpath',
285
-			$session->getSelectorsHandler()->selectorToXpath('xpath', '*//*[text()="'. $text .'"]')
286
-		);
287
-		if(null === $element){
288
-			$element = $session->getPage()->find(
289
-				'named',
290
-				array('id',$text)
291
-			);
292
-		}
293
-		if (null === $element) {
294
-			throw new \InvalidArgumentException(sprintf('Cannot find text: "%s"', $text));
295
-		}
275
+    /**
276
+     * Click some text
277
+     *
278
+     * @When /^I click on the text "([^"]*)"$/
279
+     */
280
+    public function iClickOnTheText($text)
281
+    {
282
+        $session = $this->getSession();
283
+        $element = $session->getPage()->find(
284
+            'xpath',
285
+            $session->getSelectorsHandler()->selectorToXpath('xpath', '*//*[text()="'. $text .'"]')
286
+        );
287
+        if(null === $element){
288
+            $element = $session->getPage()->find(
289
+                'named',
290
+                array('id',$text)
291
+            );
292
+        }
293
+        if (null === $element) {
294
+            throw new \InvalidArgumentException(sprintf('Cannot find text: "%s"', $text));
295
+        }
296 296
 		
297
-		$element->click();
297
+        $element->click();
298 298
 		
299
-	}
299
+    }
300 300
 
301 301
     /**
302 302
      * @Then /^(?:|I )should see translated text "(?P<text>(?:[^"]|\\")*)"$/
303 303
      */
304
-	public function iShouldSeeText($text)
304
+    public function iShouldSeeText($text)
305 305
     {
306 306
         $translator = $this->getServiceManager()->get('translator');
307 307
         $translated = $translator->translate($text);
Please login to merge, or discard this patch.
module/Behat/src/SettingsContext.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -14,26 +14,26 @@
 block discarded – undo
14 14
 
15 15
 class SettingsContext implements Context
16 16
 {
17
-	use CommonContextTrait;
17
+    use CommonContextTrait;
18 18
 	
19
-	/**
20
-	 * @Given I go to settings page
21
-	 */
22
-	public function iGoToSettingsPage()
23
-	{
24
-		//$this->visit('/settings');
19
+    /**
20
+     * @Given I go to settings page
21
+     */
22
+    public function iGoToSettingsPage()
23
+    {
24
+        //$this->visit('/settings');
25 25
         $url = $this->buildUrl('lang/settings');
26 26
         $this->visit($url);
27
-	}
27
+    }
28 28
 	
29
-	/**
30
-	 * @Given I go to email template settings page
31
-	 */
32
-	public function iGoToEmailTemplatePage()
33
-	{
34
-	    $url = $this->buildUrl('lang/settings',[
35
-	        'module' => 'Applications'
29
+    /**
30
+     * @Given I go to email template settings page
31
+     */
32
+    public function iGoToEmailTemplatePage()
33
+    {
34
+        $url = $this->buildUrl('lang/settings',[
35
+            'module' => 'Applications'
36 36
         ]);
37
-		$this->visit($url);
38
-	}
37
+        $this->visit($url);
38
+    }
39 39
 }
Please login to merge, or discard this patch.
module/Behat/src/ApplicationContext.php 1 patch
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -22,37 +22,37 @@
 block discarded – undo
22 22
  */
23 23
 class ApplicationContext implements Context
24 24
 {
25
-	use CommonContextTrait;
25
+    use CommonContextTrait;
26 26
 	
27
-	/**
28
-	 * @Given I apply for :title job
29
-	 *
30
-	 * @param string $title
31
-	 * @throws \Exception when the titled job not exists
32
-	 */
33
-	public function iApplyAJob($title)
34
-	{
35
-		/* @var $repo JobRepository */
36
-		$repo = $this->getRepository('Jobs/Job');
37
-		$job = $repo->findOneBy(['title' => $title]);
38
-		if(!$job instanceof Job){
39
-			throw new \Exception('There is no job titled: "'.$title.'"');
40
-		}
41
-		$job->setApplyId($job->getId());
42
-		$repo->store($job);
27
+    /**
28
+     * @Given I apply for :title job
29
+     *
30
+     * @param string $title
31
+     * @throws \Exception when the titled job not exists
32
+     */
33
+    public function iApplyAJob($title)
34
+    {
35
+        /* @var $repo JobRepository */
36
+        $repo = $this->getRepository('Jobs/Job');
37
+        $job = $repo->findOneBy(['title' => $title]);
38
+        if(!$job instanceof Job){
39
+            throw new \Exception('There is no job titled: "'.$title.'"');
40
+        }
41
+        $job->setApplyId($job->getId());
42
+        $repo->store($job);
43 43
 
44
-		$url = $this->buildUrl('lang/apply',[
45
-		    'applyId' => $job->getApplyId()
44
+        $url = $this->buildUrl('lang/apply',[
45
+            'applyId' => $job->getApplyId()
46 46
         ]);
47
-		$this->visit($url);
48
-	}
47
+        $this->visit($url);
48
+    }
49 49
 	
50
-	/**
51
-	 * @Given I visit job categories
52
-	 */
53
-	public function visitJobsCategories()
54
-	{
55
-		$url = '/admin/jobs/categories';
56
-		$this->visit($url);
57
-	}
50
+    /**
51
+     * @Given I visit job categories
52
+     */
53
+    public function visitJobsCategories()
54
+    {
55
+        $url = '/admin/jobs/categories';
56
+        $this->visit($url);
57
+    }
58 58
 }
Please login to merge, or discard this patch.
module/Behat/src/CvContext.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -22,23 +22,23 @@
 block discarded – undo
22 22
  */
23 23
 class CvContext implements Context
24 24
 {
25
-	use CommonContextTrait;
25
+    use CommonContextTrait;
26 26
 	
27 27
 	
28
-	/**
29
-	 * @Given I go to manage my resume page
30
-	 */
31
-	public function iGoToManageResumePage()
32
-	{
33
-	    $url = $this->buildUrl('lang/my-cv');
34
-		$this->visit($url);
35
-	}
28
+    /**
29
+     * @Given I go to manage my resume page
30
+     */
31
+    public function iGoToManageResumePage()
32
+    {
33
+        $url = $this->buildUrl('lang/my-cv');
34
+        $this->visit($url);
35
+    }
36 36
 	
37
-	/**
38
-	 * @When I click edit on my personal information
39
-	 */
40
-	public function iClickEditOnPersonalInformations()
41
-	{
42
-		$this->summaryFormContext->iClickEditOnForm('resumePersonalInformations');
43
-	}
37
+    /**
38
+     * @When I click edit on my personal information
39
+     */
40
+    public function iClickEditOnPersonalInformations()
41
+    {
42
+        $this->summaryFormContext->iClickEditOnForm('resumePersonalInformations');
43
+    }
44 44
 }
Please login to merge, or discard this patch.
module/Core/src/Core/Factory/Controller/LazyControllerFactory.php 1 patch
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -27,48 +27,48 @@  discard block
 block discarded – undo
27 27
  */
28 28
 class LazyControllerFactory implements AbstractFactoryInterface
29 29
 {
30
-	protected $aliases = [
31
-		FormElementManager::class => 'FormElementManager',
32
-		ValidatorPluginManager::class => 'ValidatorManager',
33
-		Translator::class => 'translator',
34
-		ModuleManagerInterface::class => 'ModuleManager',
35
-		EventManager::class => 'Core/EventManager',
30
+    protected $aliases = [
31
+        FormElementManager::class => 'FormElementManager',
32
+        ValidatorPluginManager::class => 'ValidatorManager',
33
+        Translator::class => 'translator',
34
+        ModuleManagerInterface::class => 'ModuleManager',
35
+        EventManager::class => 'Core/EventManager',
36 36
         RepositoryService::class => 'repositories',
37
-	];
37
+    ];
38 38
 	
39
-	public function canCreate( ContainerInterface $container, $requestedName )
40
-	{
41
-		return strstr( $requestedName,'\Controller') !== false;
42
-	}
39
+    public function canCreate( ContainerInterface $container, $requestedName )
40
+    {
41
+        return strstr( $requestedName,'\Controller') !== false;
42
+    }
43 43
 
44
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
45
-	{
44
+    public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
45
+    {
46 46
         $className = $this->getClassName($requestedName);
47
-		$class = new \ReflectionClass($className);
47
+        $class = new \ReflectionClass($className);
48 48
 
49
-		if( $constructor = $class->getConstructor() )
50
-		{
51
-			if( $params = $constructor->getParameters() )
52
-			{
53
-				$constructorArgs = [];
54
-				foreach( $params as $p )
55
-				{
56
-					$serviceName = '';
57
-					if( $p->getClass() ) {
58
-						$serviceName = $p->getClass()->getName();
59
-						if (array_key_exists($serviceName, $this->aliases)) {
60
-							$serviceName = $this->aliases[$serviceName];
61
-						}
62
-					}
63
-					else{
64
-						if( $p->getName() == 'config' ){
49
+        if( $constructor = $class->getConstructor() )
50
+        {
51
+            if( $params = $constructor->getParameters() )
52
+            {
53
+                $constructorArgs = [];
54
+                foreach( $params as $p )
55
+                {
56
+                    $serviceName = '';
57
+                    if( $p->getClass() ) {
58
+                        $serviceName = $p->getClass()->getName();
59
+                        if (array_key_exists($serviceName, $this->aliases)) {
60
+                            $serviceName = $this->aliases[$serviceName];
61
+                        }
62
+                    }
63
+                    else{
64
+                        if( $p->getName() == 'config' ){
65 65
                             $serviceName = 'config';
66 66
                         }
67
-					}
67
+                    }
68 68
 
69
-					if(!$container->has($serviceName)){
70
-					    throw new ServiceNotCreatedException(sprintf(
71
-					        'Can\'t create constructor argument "%s" for service "%s"',
69
+                    if(!$container->has($serviceName)){
70
+                        throw new ServiceNotCreatedException(sprintf(
71
+                            'Can\'t create constructor argument "%s" for service "%s"',
72 72
                             $p->getName(),$requestedName
73 73
                         ));
74 74
                     }
@@ -79,13 +79,13 @@  discard block
 block discarded – undo
79 79
                         echo __CLASS__ . " couldn't create an instance of {$p->getName()} to satisfy the constructor for $requestedName.";
80 80
                         exit;
81 81
                     }
82
-				}
83
-				return $class->newInstanceArgs($constructorArgs);
84
-			}
85
-		}
82
+                }
83
+                return $class->newInstanceArgs($constructorArgs);
84
+            }
85
+        }
86 86
 		
87
-		return new $className;
88
-	}
87
+        return new $className;
88
+    }
89 89
 
90 90
     /**
91 91
      * Generate class name
Please login to merge, or discard this patch.