Completed
Push — develop ( 52cbfe...110a85 )
by
unknown
16:24
created
module/Core/src/Core/Options/MailServiceOptions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         return $this;
88 88
     }
89 89
 
90
-    public function getUsername(){
90
+    public function getUsername() {
91 91
         return $this->connectionConfig['username'];
92 92
     }
93 93
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         return $this;
99 99
     }
100 100
 
101
-    public function getPassword(){
101
+    public function getPassword() {
102 102
         return $this->connectionConfig['password'];
103 103
     }
104 104
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         return $this;
110 110
     }
111 111
 
112
-    public function getSsl(){
112
+    public function getSsl() {
113 113
         return $this->connectionConfig['ssl'];
114 114
     }
115 115
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         return $this;
119 119
     }
120 120
 
121
-    public function getTransportClass(){
121
+    public function getTransportClass() {
122 122
         return $this->transportClass;
123 123
     }
124 124
 }
125 125
\ No newline at end of file
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Entity/Decorator/JsonLdProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $dateStart = $this->job->getDatePublishStart();
53 53
         $dateStart = $dateStart ? $dateStart->format('Y-m-d') : null;
54 54
 
55
-        $array=[
55
+        $array = [
56 56
             '@context'=>'http://schema.org/',
57 57
             '@type' => 'JobPosting',
58 58
             'title' => $this->job->getTitle(),
@@ -84,9 +84,9 @@  discard block
 block discarded – undo
84 84
      *
85 85
      * @return array
86 86
      */
87
-    private function getLocations($locations){
88
-        $array=[];
89
-        foreach($locations as $location){ /* @var \Core\Entity\LocationInterface $location */
87
+    private function getLocations($locations) {
88
+        $array = [];
89
+        foreach ($locations as $location) { /* @var \Core\Entity\LocationInterface $location */
90 90
             array_push(
91 91
                 $array,
92 92
                 [
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
      */
113 113
     private function getDescription(TemplateValuesInterface $values) {
114 114
 
115
-        $description=sprintf(
115
+        $description = sprintf(
116 116
             "<p>%s</p>".
117 117
             "<h1>%s</h1>".
118 118
             "<h3>Requirements</h3><p>%s</p>".
Please login to merge, or discard this patch.
config/config.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -13,12 +13,12 @@  discard block
 block discarded – undo
13 13
 $env = getenv('APPLICATION_ENV') ?: 'production';
14 14
 
15 15
 $coreModules = include 'common.modules.php';
16
-if (!file_exists(__DIR__ . '/autoload/yawik.config.global.php')) {
17
-    $modules = array_merge($coreModules,[
16
+if (!file_exists(__DIR__.'/autoload/yawik.config.global.php')) {
17
+    $modules = array_merge($coreModules, [
18 18
         'Install',
19 19
     ]);
20 20
 } else {
21
-    $modules = array_merge($coreModules,[
21
+    $modules = array_merge($coreModules, [
22 22
         'Core',
23 23
         'Auth',
24 24
         'Cv',
@@ -35,12 +35,12 @@  discard block
 block discarded – undo
35 35
         // kann und über Server-Variablen oder ähnlichen steuern kann
36 36
         $allModules = False;
37 37
     }
38
-    foreach (glob(__DIR__ . '/autoload/*.module.php') as $moduleFile) {
38
+    foreach (glob(__DIR__.'/autoload/*.module.php') as $moduleFile) {
39 39
         $addModules = require $moduleFile;
40 40
         foreach ($addModules as $addModule) {
41 41
             if (strpos($addModule, '-') === 0) {
42
-                $remove = substr($addModule,1);
43
-                $modules = array_filter($modules, function ($elem) use ($remove) { return strcasecmp($elem,$remove); });
42
+                $remove = substr($addModule, 1);
43
+                $modules = array_filter($modules, function($elem) use ($remove) { return strcasecmp($elem, $remove); });
44 44
             }
45 45
             else {
46 46
                 if (!in_array($addModule, $modules)) {
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     ),
94 94
 );
95 95
 
96
-$envConfigFile = __DIR__ . '/config.' . $env . '.php';
96
+$envConfigFile = __DIR__.'/config.'.$env.'.php';
97 97
 if (file_exists($envConfigFile)) {
98 98
     if (is_readable($envConfigFile)) {
99 99
         $envConfig = include $envConfigFile;
Please login to merge, or discard this patch.
module/Install/src/Tracy.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public function register(array $config)
28 28
     {
29
-    	try{
29
+    	try {
30 30
 		    // enable logging of all error types globally
31 31
 		    Debugger::enable($config['mode'], $config['log'], $config['email']);
32 32
 		    Debugger::$strictMode = $config['strict'];
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 		    /** @var \Tracy\Logger $logger */
36 36
 		    $logger = Debugger::getLogger();
37 37
 		    $logger->emailSnooze = $config['email_snooze'];
38
-	    }catch (\Exception $e){
38
+	    } catch (\Exception $e) {
39 39
     		throw $e;
40 40
 	    }
41 41
      
Please login to merge, or discard this patch.
module/Install/src/Factory/Controller/LazyControllerFactory.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -28,25 +28,25 @@  discard block
 block discarded – undo
28 28
 		Translator::class => 'translator',
29 29
 	];
30 30
 	
31
-	public function canCreate( ContainerInterface $container, $requestedName )
31
+	public function canCreate(ContainerInterface $container, $requestedName)
32 32
 	{
33
-		list( $module, ) = explode( '\\', __NAMESPACE__, 2 );
34
-		return strstr( $requestedName, $module . '\Controller') !== false;
33
+		list($module,) = explode('\\', __NAMESPACE__, 2);
34
+		return strstr($requestedName, $module.'\Controller') !== false;
35 35
 	}
36 36
 	
37
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
37
+	public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
38 38
 	{
39 39
 		$class = new \ReflectionClass($requestedName);
40 40
 		$parentLocator = $container;
41
-		if( $constructor = $class->getConstructor() )
41
+		if ($constructor = $class->getConstructor())
42 42
 		{
43
-			if( $params = $constructor->getParameters() )
43
+			if ($params = $constructor->getParameters())
44 44
 			{
45 45
 				$parameter_instances = [];
46
-				foreach( $params as $p )
46
+				foreach ($params as $p)
47 47
 				{
48 48
 					
49
-					if( $p->getClass() ) {
49
+					if ($p->getClass()) {
50 50
 						$cn = $p->getClass()->getName();
51 51
 						if (array_key_exists($cn, $this->aliases)) {
52 52
 							$cn = $this->aliases[$cn];
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
 							exit;
62 62
 						}
63 63
 					}
64
-					else{
65
-						if( $p->isArray() && $p->getName() == 'config' )
64
+					else {
65
+						if ($p->isArray() && $p->getName() == 'config')
66 66
 							$parameter_instances[] = $parentLocator->get('config');
67 67
 					}
68 68
 					
Please login to merge, or discard this patch.
module/Install/src/Controller/Index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@
 block discarded – undo
136 136
 	    parent::attachDefaultListeners();
137 137
 	
138 138
 	    $events = $this->getEventManager();
139
-	    $events->attach( MvcEvent::EVENT_DISPATCH, array( $this, 'preDispatch' ), 100 );
139
+	    $events->attach(MvcEvent::EVENT_DISPATCH, array($this, 'preDispatch'), 100);
140 140
     }
141 141
 
142 142
     /**
Please login to merge, or discard this patch.
module/Behat/src/JobContext.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -57,8 +57,8 @@  discard block
 block discarded – undo
57 57
 	{
58 58
 		$repo = static::$jobRepo;
59 59
 		$results = $repo->findBy(['user' => $user]);
60
-		foreach($results as $result){
61
-			$repo->remove($result,true);
60
+		foreach ($results as $result) {
61
+			$repo->remove($result, true);
62 62
 		}
63 63
 	}
64 64
 	
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	public function beforeScenario(BeforeScenarioScope $scope)
71 71
 	{
72 72
 		$this->select2Context = $scope->getEnvironment()->getContext(Select2Context::class);
73
-		if(is_null(static::$jobRepo)){
73
+		if (is_null(static::$jobRepo)) {
74 74
 			$this->gatherContexts($scope);
75 75
 			static::$jobRepo = $this->getJobRepository();
76 76
 		}
@@ -108,8 +108,8 @@  discard block
 block discarded – undo
108 108
 	public function iGoToEditJobWithTitle($jobTitle)
109 109
 	{
110 110
 		$job = $this->getJobRepository()->findOneBy(['title' => $jobTitle]);
111
-		if(!$job instanceof Job){
112
-			throw new \Exception(sprintf('Job with title "%s" is not found',$jobTitle));
111
+		if (!$job instanceof Job) {
112
+			throw new \Exception(sprintf('Job with title "%s" is not found', $jobTitle));
113 113
 		}
114 114
 		$this->currentJob = $job;
115 115
 		$url = '/en/jobs/edit?id='.$job->getId();
@@ -135,8 +135,8 @@  discard block
 block discarded – undo
135 135
 		$user = $this->getCurrentUser();
136 136
 		$jobRepository = $this->getJobRepository();
137 137
 		$results = $jobRepository->getUserJobs($user->getId());
138
-		foreach($results as $job){
139
-			$jobRepository->remove($job,true);
138
+		foreach ($results as $job) {
139
+			$jobRepository->remove($job, true);
140 140
 		}
141 141
 		$this->currentJob = null;
142 142
 	}
@@ -145,16 +145,16 @@  discard block
 block discarded – undo
145 145
 	 * @When I fill job location search with :search and choose :choice
146 146
 	 *
147 147
 	 */
148
-	public function iFillJobLocationAndChoose($search,$choice)
148
+	public function iFillJobLocationAndChoose($search, $choice)
149 149
 	{
150 150
 		$select2 = $this->select2Context;
151
-		$select2->iFillInSelect2FieldWith('jobBase[geoLocation]',$search,$choice);
151
+		$select2->iFillInSelect2FieldWith('jobBase[geoLocation]', $search, $choice);
152 152
 	}
153 153
 	
154 154
 	/**
155 155
 	 * @When I choose :value from :field
156 156
 	 */
157
-	public function iJobClassificationSelect($value,$field)
157
+	public function iJobClassificationSelect($value, $field)
158 158
 	{
159 159
 		$field = Inflector::camelize($field);
160 160
 		
@@ -170,18 +170,18 @@  discard block
 block discarded – undo
170 170
 			'employmentTypes'    => "select#classifications-employmentTypes",
171 171
 		];
172 172
 		
173
-		if(!isset($mapSelect2[$field])){
173
+		if (!isset($mapSelect2[$field])) {
174 174
 			throw new \Exception('Undefined field selection value "'.$field.'"');
175 175
 		}
176 176
 		
177 177
 		$multipleField = $mapMultiple[$field];
178 178
 		$page = $this->minkContext->getSession()->getPage();
179
-		$element = $page->find('css',$mapMultiple[$field]);
180
-		if(!is_null($element) && $element->getAttribute('multiple')=='multiple'){
181
-			$this->minkContext->selectOption($value,$multipleField);
182
-		}else{
179
+		$element = $page->find('css', $mapMultiple[$field]);
180
+		if (!is_null($element) && $element->getAttribute('multiple') == 'multiple') {
181
+			$this->minkContext->selectOption($value, $multipleField);
182
+		} else {
183 183
 			$locator = $mapSelect2[$field];
184
-			$this->select2Context->iFillInSelect2Field($locator,$value);
184
+			$this->select2Context->iFillInSelect2Field($locator, $value);
185 185
 		}
186 186
 	}
187 187
 	
@@ -205,62 +205,62 @@  discard block
 block discarded – undo
205 205
 	 * @When I have a :status job with the following:
206 206
 	 * @param TableNode $fields
207 207
 	 */
208
-	public function iHaveAJobWithTheFollowing($status,TableNode $fields)
208
+	public function iHaveAJobWithTheFollowing($status, TableNode $fields)
209 209
 	{
210 210
 		$normalizedField = [
211 211
 			'template' => 'modern',
212 212
 		];
213
-		foreach($fields->getRowsHash() as $field => $value){
213
+		foreach ($fields->getRowsHash() as $field => $value) {
214 214
 			$field = Inflector::camelize($field);
215
-			if($field == 'professions' || $field == 'industries'){
216
-				$value = explode(',',$value);
215
+			if ($field == 'professions' || $field == 'industries') {
216
+				$value = explode(',', $value);
217 217
 			}
218 218
 			$normalizedField[$field] = $value;
219 219
 		}
220 220
 		$jobRepo = $this->getJobRepository();
221 221
 		$job = $jobRepo->findOneBy(['title' => $normalizedField['title']]);
222
-		if(!$job instanceof Job){
222
+		if (!$job instanceof Job) {
223 223
 			$job = new Job();
224 224
 			$job->setTitle($normalizedField['title']);
225 225
 		}
226
-		if(isset($normalizedField['user'])){
226
+		if (isset($normalizedField['user'])) {
227 227
 			/* @var $userRepo UserRepository */
228 228
 			$userRepo = $this->getRepository('Auth\Entity\User');
229 229
 			$user = $userRepo->findOneBy(['login' => $normalizedField['user']]);
230
-			if($user instanceof User){
230
+			if ($user instanceof User) {
231 231
 				$job->setUser($user);
232 232
 				$job->setOrganization($user->getOrganization()->getOrganization());
233
-			}else{
233
+			} else {
234 234
 				throw new \Exception('There is no user with this login:"'.$normalizedField['user'.'"']);
235 235
 			}
236 236
 		}
237 237
 		
238
-		if($status == 'draft'){
238
+		if ($status == 'draft') {
239 239
 			$job->setIsDraft(true);
240
-		}elseif($status == 'published'){
240
+		}elseif ($status == 'published') {
241 241
 			$job->setIsDraft(false);
242 242
 			$job->setDatePublishStart(new \DateTime());
243 243
 		}
244 244
 		$job->setStatus(Status::ACTIVE);
245 245
 		
246
-		if(isset($normalizedField['professions'])){
247
-			$this->addProfessions($job,$normalizedField['professions']);
246
+		if (isset($normalizedField['professions'])) {
247
+			$this->addProfessions($job, $normalizedField['professions']);
248 248
 		}
249 249
 		
250
-		if(isset($normalizedField['industries'])){
251
-			$this->addIndustries($job,$normalizedField['industries']);
250
+		if (isset($normalizedField['industries'])) {
251
+			$this->addIndustries($job, $normalizedField['industries']);
252 252
 		}
253 253
 		
254
-		if(isset($normalizedField['location'])){
255
-			$this->setLocation($job,$normalizedField['location']);
254
+		if (isset($normalizedField['location'])) {
255
+			$this->setLocation($job, $normalizedField['location']);
256 256
 		}
257
-		if(isset($normalizedField['employmentTypes'])){
257
+		if (isset($normalizedField['employmentTypes'])) {
258 258
 			$types = $this->getCategories([$normalizedField['employmentTypes']]);
259 259
 			$type = array_shift($types);
260 260
 			
261 261
 			$job->getClassifications()->getEmploymentTypes()->getItems()->add($type);
262 262
 		}
263
-		if(isset($normalizedField['companyName'])){
263
+		if (isset($normalizedField['companyName'])) {
264 264
 			$job->setCompany($normalizedField['companyName']);
265 265
 		}
266 266
 		
@@ -278,16 +278,16 @@  discard block
 block discarded – undo
278 278
 		$location->fromString($serialized);
279 279
 		
280 280
 		$locations = $job->getLocations();
281
-		if(count($locations)){
281
+		if (count($locations)) {
282 282
 			$locations->clear();
283 283
 		}
284 284
 		$job->getLocations()->add($location);
285 285
 	}
286 286
 	
287
-	private function addProfessions(Job $job,$terms)
287
+	private function addProfessions(Job $job, $terms)
288 288
 	{
289 289
 		$professions = $this->getCategories($terms);
290
-		foreach($professions as $profession){
290
+		foreach ($professions as $profession) {
291 291
 			$job->getClassifications()->getProfessions()->getItems()->add($profession);
292 292
 		}
293 293
 	}
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 	private function addIndustries(Job $job, $terms)
296 296
 	{
297 297
 		$industries = $this->getCategories($terms);
298
-		foreach($industries as $industry){
298
+		foreach ($industries as $industry) {
299 299
 			$job->getClassifications()->getIndustries()->getItems()->add($industry);
300 300
 		}
301 301
 	}
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
 		
329 329
 		$job = $repo->findDraft($user);
330 330
 		
331
-		if(is_null($job)){
331
+		if (is_null($job)) {
332 332
 			$job = new Job();
333 333
 			$job
334 334
 				->setUser($user)
Please login to merge, or discard this patch.
module/Behat/src/Select2Context.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
 	 * @param $field
46 46
 	 * @param $value
47 47
 	 */
48
-	public function iFillInSelect2FieldWith($field,$search,$choice=null)
48
+	public function iFillInSelect2FieldWith($field, $search, $choice = null)
49 49
 	{
50 50
 		$page = $this->getSession()->getPage();
51 51
 		$this->openField($page, $field);
52
-		$this->fillSearchField($page,$field,$search);
52
+		$this->fillSearchField($page, $field, $search);
53 53
 		$this->selectValue($page, $field, $choice);
54 54
 	}
55 55
 	
@@ -67,12 +67,12 @@  discard block
 block discarded – undo
67 67
 		if ('Behat\Mink\Driver\Selenium2Driver' === get_class($driver)) {
68 68
 			// Can't use `$this->getSession()->getPage()->find()` because of https://github.com/minkphp/MinkSelenium2Driver/issues/188
69 69
 			
70
-			$element = $page->find('css','.select2-container--open .select2-search__field');
70
+			$element = $page->find('css', '.select2-container--open .select2-search__field');
71 71
 			$xpath = $element->getXpath();
72 72
 			$select2Input = $this->getSession()
73 73
 				->getDriver()
74 74
 				->getWebDriverSession()
75
-				->element('xpath',$xpath)
75
+				->element('xpath', $xpath)
76 76
 				//->element('xpath', "//html/descendant-or-self::*[@class and contains(concat(' ', normalize-space(@class), ' '), ' select2-search__field ')]")
77 77
 			;
78 78
 			if (!$select2Input) {
@@ -100,14 +100,14 @@  discard block
 block discarded – undo
100 100
 	 * @param int             $time
101 101
 	 * @throws \Exception
102 102
 	 */
103
-	private function selectValue(DocumentElement $page, $field, $value, $time=5)
103
+	private function selectValue(DocumentElement $page, $field, $value, $time = 5)
104 104
 	{
105 105
 		$this->waitForLoadingResults($time);
106 106
 		
107 107
 		$chosenResults = $page->findAll('css', '.select2-results li');
108 108
 		foreach ($chosenResults as $result) {
109 109
 			$text = $result->getText();
110
-			if (false!==strpos($text,$value)) {
110
+			if (false !== strpos($text, $value)) {
111 111
 				$result->click();
112 112
 				return;
113 113
 			}
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
 	
119 119
 	private function openField(DocumentElement $page, $field)
120 120
 	{
121
-		$inputField = $page->find('css',$field);
122
-		if(!$inputField){
121
+		$inputField = $page->find('css', $field);
122
+		if (!$inputField) {
123 123
 			$fieldName = sprintf('select[name="%s"] + .select2-container', $field);
124 124
 			$inputField = $page->find('css', $fieldName);
125 125
 		}
Please login to merge, or discard this patch.
module/Behat/src/ApplicationContext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 		/* @var $repo JobRepository */
36 36
 		$repo = $this->getRepository('Jobs/Job');
37 37
 		$job = $repo->findOneBy(['title' => $title]);
38
-		if(!$job instanceof Job){
38
+		if (!$job instanceof Job) {
39 39
 			throw new \Exception('There is no job titled: "'.$title.'"');
40 40
 		}
41 41
 		$job->setApplyId($job->getId());
Please login to merge, or discard this patch.