Completed
Push — develop ( 9659b8...659b85 )
by Mathias
13:02
created
module/Core/src/Core/Factory/Controller/LazyControllerFactory.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -36,47 +36,47 @@  discard block
 block discarded – undo
36 36
         RepositoryService::class => 'repositories',
37 37
 	];
38 38
 	
39
-	public function canCreate( ContainerInterface $container, $requestedName )
39
+	public function canCreate(ContainerInterface $container, $requestedName)
40 40
 	{
41
-		return strstr( $requestedName,'\Controller') !== false;
41
+		return strstr($requestedName, '\Controller') !== false;
42 42
 	}
43 43
 
44
-	public function __invoke( ContainerInterface $container, $requestedName, array $options = null )
44
+	public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
45 45
 	{
46 46
         $className = $this->getClassName($requestedName);
47 47
 		$class = new \ReflectionClass($className);
48 48
 
49
-		if( $constructor = $class->getConstructor() )
49
+		if ($constructor = $class->getConstructor())
50 50
 		{
51
-			if( $params = $constructor->getParameters() )
51
+			if ($params = $constructor->getParameters())
52 52
 			{
53 53
 				$constructorArgs = [];
54
-				foreach( $params as $p )
54
+				foreach ($params as $p)
55 55
 				{
56 56
 					$serviceName = '';
57
-					if( $p->getClass() ) {
57
+					if ($p->getClass()) {
58 58
 						$serviceName = $p->getClass()->getName();
59 59
 						if (array_key_exists($serviceName, $this->aliases)) {
60 60
 							$serviceName = $this->aliases[$serviceName];
61 61
 						}
62 62
 					}
63
-					else{
64
-						if( $p->getName() == 'config' ){
63
+					else {
64
+						if ($p->getName() == 'config') {
65 65
                             $serviceName = 'config';
66 66
                         }
67 67
 					}
68 68
 
69
-					if(!$container->has($serviceName)){
69
+					if (!$container->has($serviceName)) {
70 70
 					    throw new ServiceNotCreatedException(sprintf(
71 71
 					        'Can\'t create constructor argument "%s" for service "%s"',
72
-                            $p->getName(),$requestedName
72
+                            $p->getName(), $requestedName
73 73
                         ));
74 74
                     }
75 75
                     try {
76 76
                         $constructorArgs[] = $container->get($serviceName);
77 77
                     }
78 78
                     catch (\Exception $x) {
79
-                        echo __CLASS__ . " couldn't create an instance of {$p->getName()} to satisfy the constructor for $requestedName.";
79
+                        echo __CLASS__." couldn't create an instance of {$p->getName()} to satisfy the constructor for $requestedName.";
80 80
                         exit;
81 81
                     }
82 82
 				}
@@ -95,10 +95,10 @@  discard block
 block discarded – undo
95 95
      */
96 96
     private function getClassName($requestedName)
97 97
     {
98
-        $exp = explode('/',$requestedName);
98
+        $exp = explode('/', $requestedName);
99 99
 
100
-        $className = array_shift($exp).'\\Controller\\'.implode('\\',$exp).'Controller';
101
-        if(!class_exists($className)){
100
+        $className = array_shift($exp).'\\Controller\\'.implode('\\', $exp).'Controller';
101
+        if (!class_exists($className)) {
102 102
             throw new ServiceNotCreatedException(
103 103
                 sprintf(
104 104
                     'Can\'t find correct controller class for "%s"',
Please login to merge, or discard this patch.
module/Behat/src/JobContext.php 1 patch
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
 	{
59 59
 		$repo = static::$jobRepo;
60 60
 		$results = $repo->findBy(['user' => $user]);
61
-		foreach($results as $result){
62
-			$repo->remove($result,true);
61
+		foreach ($results as $result) {
62
+			$repo->remove($result, true);
63 63
 		}
64 64
 	}
65 65
 	
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	public function beforeScenario(BeforeScenarioScope $scope)
72 72
 	{
73 73
 		$this->select2Context = $scope->getEnvironment()->getContext(Select2Context::class);
74
-		if(is_null(static::$jobRepo)){
74
+		if (is_null(static::$jobRepo)) {
75 75
 			$this->gatherContexts($scope);
76 76
 			static::$jobRepo = $this->getJobRepository();
77 77
 		}
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	 */
91 91
 	public function iGoToCreateJob()
92 92
 	{
93
-	    $url = $this->buildUrl('lang/jobs/manage',['action' => 'edit']);
93
+	    $url = $this->buildUrl('lang/jobs/manage', ['action' => 'edit']);
94 94
 		$this->visit($url);
95 95
 	}
96 96
 	
@@ -110,11 +110,11 @@  discard block
 block discarded – undo
110 110
 	public function iGoToEditJobWithTitle($jobTitle)
111 111
 	{
112 112
 		$job = $this->getJobRepository()->findOneBy(['title' => $jobTitle]);
113
-		if(!$job instanceof Job){
114
-			throw new \Exception(sprintf('Job with title "%s" is not found',$jobTitle));
113
+		if (!$job instanceof Job) {
114
+			throw new \Exception(sprintf('Job with title "%s" is not found', $jobTitle));
115 115
 		}
116 116
 		$this->currentJob = $job;
117
-		$url = $this->buildUrl('lang/jobs/manage',[
117
+		$url = $this->buildUrl('lang/jobs/manage', [
118 118
 		    'id' => $job->getId()
119 119
         ]);
120 120
 		$this->visit($url);
@@ -140,8 +140,8 @@  discard block
 block discarded – undo
140 140
 
141 141
 		$jobRepository = $this->getJobRepository();
142 142
 		$results = $jobRepository->getUserJobs($user->getId());
143
-		foreach($results as $job){
144
-			$jobRepository->remove($job,true);
143
+		foreach ($results as $job) {
144
+			$jobRepository->remove($job, true);
145 145
 		}
146 146
 		$this->currentJob = null;
147 147
 	}
@@ -150,16 +150,16 @@  discard block
 block discarded – undo
150 150
 	 * @When I fill job location search with :search and choose :choice
151 151
 	 *
152 152
 	 */
153
-	public function iFillJobLocationAndChoose($search,$choice)
153
+	public function iFillJobLocationAndChoose($search, $choice)
154 154
 	{
155 155
 		$select2 = $this->select2Context;
156
-		$select2->iFillInSelect2FieldWith('jobBase[geoLocation]',$search,$choice);
156
+		$select2->iFillInSelect2FieldWith('jobBase[geoLocation]', $search, $choice);
157 157
 	}
158 158
 	
159 159
 	/**
160 160
 	 * @When I choose :value from :field
161 161
 	 */
162
-	public function iJobClassificationSelect($value,$field)
162
+	public function iJobClassificationSelect($value, $field)
163 163
 	{
164 164
 		$field = Inflector::camelize($field);
165 165
 		
@@ -175,18 +175,18 @@  discard block
 block discarded – undo
175 175
 			'employmentTypes'    => "select#classifications-employmentTypes",
176 176
 		];
177 177
 		
178
-		if(!isset($mapSelect2[$field])){
178
+		if (!isset($mapSelect2[$field])) {
179 179
 			throw new \Exception('Undefined field selection value "'.$field.'"');
180 180
 		}
181 181
 		
182 182
 		$multipleField = $mapMultiple[$field];
183 183
 		$page = $this->minkContext->getSession()->getPage();
184
-		$element = $page->find('css',$mapMultiple[$field]);
185
-		if(!is_null($element) && $element->getAttribute('multiple')=='multiple'){
186
-			$this->minkContext->selectOption($value,$multipleField);
187
-		}else{
184
+		$element = $page->find('css', $mapMultiple[$field]);
185
+		if (!is_null($element) && $element->getAttribute('multiple') == 'multiple') {
186
+			$this->minkContext->selectOption($value, $multipleField);
187
+		} else {
188 188
 			$locator = $mapSelect2[$field];
189
-			$this->select2Context->iFillInSelect2Field($locator,$value);
189
+			$this->select2Context->iFillInSelect2Field($locator, $value);
190 190
 		}
191 191
 	}
192 192
 	
@@ -210,20 +210,20 @@  discard block
 block discarded – undo
210 210
 	 * @When I have a :status job with the following:
211 211
 	 * @param TableNode $fields
212 212
 	 */
213
-	public function iHaveAJobWithTheFollowing($status,TableNode $fields)
213
+	public function iHaveAJobWithTheFollowing($status, TableNode $fields)
214 214
 	{
215
-		$this->buildJob($status,$fields->getRowsHash());
215
+		$this->buildJob($status, $fields->getRowsHash());
216 216
 	}
217 217
 
218
-	public function buildJob($status, $definitions,$organization = null)
218
+	public function buildJob($status, $definitions, $organization = null)
219 219
     {
220 220
         $normalizedField = [
221 221
             'template' => 'modern',
222 222
         ];
223
-        foreach($definitions as $field => $value){
223
+        foreach ($definitions as $field => $value) {
224 224
             $field = Inflector::camelize($field);
225
-            if($field == 'professions' || $field == 'industries'){
226
-                $value = explode(',',$value);
225
+            if ($field == 'professions' || $field == 'industries') {
226
+                $value = explode(',', $value);
227 227
             }
228 228
             $normalizedField[$field] = $value;
229 229
         }
@@ -232,49 +232,49 @@  discard block
 block discarded – undo
232 232
         $job = $jobRepo->findOneBy([
233 233
             'title' => $normalizedField['title']
234 234
         ]);
235
-        if(!$job instanceof Job){
235
+        if (!$job instanceof Job) {
236 236
             $job = new Job();
237 237
             $job->setTitle($normalizedField['title']);
238 238
         }
239 239
 
240
-        if(isset($normalizedField['user'])){
240
+        if (isset($normalizedField['user'])) {
241 241
             /* @var $userRepo UserRepository */
242 242
             $userRepo = $this->getRepository('Auth\Entity\User');
243 243
             $user = $userRepo->findOneBy(['login' => $normalizedField['user']]);
244
-            if(is_null($organization)){
244
+            if (is_null($organization)) {
245 245
                 $organization = $user->getOrganization()->getOrganization();
246 246
             }
247
-            if($user instanceof User){
247
+            if ($user instanceof User) {
248 248
                 $job->setUser($user);
249 249
                 $job->setOrganization($organization);
250
-            }else{
250
+            } else {
251 251
                 throw new \Exception('There is no user with this login:"'.$normalizedField['user'.'"']);
252 252
             }
253 253
         }
254 254
 
255
-        if($status == 'draft'){
255
+        if ($status == 'draft') {
256 256
             $job->setIsDraft(true);
257
-        }elseif($status == 'published'){
257
+        }elseif ($status == 'published') {
258 258
             $job->setIsDraft(false);
259 259
             $job->setDatePublishStart(new \DateTime());
260 260
         }
261 261
         $job->setStatus(Status::ACTIVE);
262 262
 
263
-        if(isset($normalizedField['location'])){
264
-            $this->setLocation($job,$normalizedField['location']);
263
+        if (isset($normalizedField['location'])) {
264
+            $this->setLocation($job, $normalizedField['location']);
265 265
         }
266
-        if(isset($normalizedField['professions'])){
267
-            $this->addProfessions($job,$normalizedField['professions']);
266
+        if (isset($normalizedField['professions'])) {
267
+            $this->addProfessions($job, $normalizedField['professions']);
268 268
         }
269 269
 
270
-        if(isset($normalizedField['industries'])){
271
-            $this->addIndustries($job,$normalizedField['industries']);
270
+        if (isset($normalizedField['industries'])) {
271
+            $this->addIndustries($job, $normalizedField['industries']);
272 272
         }
273
-        if(isset($normalizedField['employmentTypes'])){
273
+        if (isset($normalizedField['employmentTypes'])) {
274 274
             $types = $this->getCategories([$normalizedField['employmentTypes']]);
275 275
             $type = array_shift($types);
276 276
             $values = $job->getClassifications()->getEmploymentTypes()->getValues();
277
-            if(!is_array($values) || !in_array($type,$values)){
277
+            if (!is_array($values) || !in_array($type, $values)) {
278 278
                 $job->getClassifications()->getEmploymentTypes()->getItems()->add($type);
279 279
             }
280 280
         }
@@ -294,18 +294,18 @@  discard block
 block discarded – undo
294 294
 		$location->fromString($serialized);
295 295
 		
296 296
 		$locations = $job->getLocations();
297
-		if(count($locations)){
297
+		if (count($locations)) {
298 298
 			$locations->clear();
299 299
 		}
300 300
 		$job->getLocations()->add($location);
301 301
 	}
302 302
 	
303
-	private function addProfessions(Job &$job,$terms)
303
+	private function addProfessions(Job &$job, $terms)
304 304
 	{
305 305
 		$professions = $this->getCategories($terms);
306
-		foreach($professions as $profession){
306
+		foreach ($professions as $profession) {
307 307
 			$values = $job->getClassifications()->getProfessions()->getValues();
308
-			if(!is_array($values) || !in_array($profession,$values)){
308
+			if (!is_array($values) || !in_array($profession, $values)) {
309 309
 				$job->getClassifications()->getProfessions()->getItems()->add($profession);
310 310
 			}
311 311
 		}
@@ -314,9 +314,9 @@  discard block
 block discarded – undo
314 314
 	private function addIndustries(Job &$job, $terms)
315 315
 	{
316 316
 		$industries = $this->getCategories($terms);
317
-		foreach($industries as $industry){
317
+		foreach ($industries as $industry) {
318 318
 			$values = $job->getClassifications()->getIndustries()->getValues();
319
-			if(!is_array($values) || !in_array($industry,$values)){
319
+			if (!is_array($values) || !in_array($industry, $values)) {
320 320
 				$job->getClassifications()->getIndustries()->getItems()->add($industry);
321 321
 			}
322 322
 		}
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
 		
352 352
 		$job = $repo->findDraft($user);
353 353
 		
354
-		if(is_null($job)){
354
+		if (is_null($job)) {
355 355
 			$job = new Job();
356 356
 			$job
357 357
 				->setUser($user)
Please login to merge, or discard this patch.
Organizations/src/Organizations/Repository/Filter/PaginationQuery.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      *
34 34
      * @var String
35 35
      */
36
-    protected $repositoryName="Organizations/Organization";
36
+    protected $repositoryName = "Organizations/Organization";
37 37
     
38 38
     /**
39 39
      * Sortable fields
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
          */
92 92
         $auth = $this->authService;
93 93
         $user = $auth->getUser();
94
-        $ignored = [null,'guest',UserInterface::ROLE_USER];
95
-        if(!in_array($user->getRole(),$ignored)){
94
+        $ignored = [null, 'guest', UserInterface::ROLE_USER];
95
+        if (!in_array($user->getRole(), $ignored)) {
96 96
             $queryBuilder->field('permissions.view')->equals($user->getId());
97 97
         }
98 98
 
99
-        if (isset($params['q']) && $params['q'] && $params['q'] != 'en/organizations/profile' ) {
99
+        if (isset($params['q']) && $params['q'] && $params['q'] != 'en/organizations/profile') {
100 100
             $queryBuilder->text($params['q'])->language('none');
101 101
         }
102 102
 
@@ -106,14 +106,14 @@  discard block
 block discarded – undo
106 106
 
107 107
         $queryBuilder->sort($this->filterSort($value['sort']));
108 108
 
109
-        if(isset($params['type']) && $params['type'] === 'profile'){
109
+        if (isset($params['type']) && $params['type'] === 'profile') {
110 110
             //@TODO: we should use aggregate query here
111 111
             $queryBuilder->field('profileSetting')
112
-                ->in([Organization::PROFILE_ALWAYS_ENABLE,Organization::PROFILE_ACTIVE_JOBS])
112
+                ->in([Organization::PROFILE_ALWAYS_ENABLE, Organization::PROFILE_ACTIVE_JOBS])
113 113
             ;
114 114
 
115 115
             $filters = $this->getOrganizationProfileFilters($queryBuilder);
116
-            if(count($filters) > 0){
116
+            if (count($filters) > 0) {
117 117
                 $queryBuilder->field('id')->notIn($filters);
118 118
             }
119 119
 
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
         $results = $queryBuilder->getQuery()->execute();
134 134
 
135 135
         $filters = [];
136
-        foreach($results->toArray() as $organization){
137
-            if($organization->getProfileSetting()==Organization::PROFILE_ACTIVE_JOBS){
136
+        foreach ($results->toArray() as $organization) {
137
+            if ($organization->getProfileSetting() == Organization::PROFILE_ACTIVE_JOBS) {
138 138
                 $qb = $jobRepository->createQueryBuilder();
139 139
                 $qb
140 140
                     ->field('organization')->equals($organization->getId())
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                     ->field('isDraft')->notEqual(true)
143 143
                 ;
144 144
                 $count = $qb->getQuery()->execute()->count();
145
-                if($count == 0){
145
+                if ($count == 0) {
146 146
                     $filters[] = $organization->getId();
147 147
                 }
148 148
             }
Please login to merge, or discard this patch.
src/Organizations/Repository/Filter/PaginationQueryFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         /* @TODO: $jobRepository should be removed when using aggregation query in filtering profile */
38 38
         $authService = $container->get('AuthenticationService');
39 39
         $jobRepository = $container->get('Core/RepositoryService')->get('Jobs/Job');
40
-        $filter = new PaginationQuery($jobRepository,$authService);
40
+        $filter = new PaginationQuery($jobRepository, $authService);
41 41
         return $filter;
42 42
     }
43 43
 }
Please login to merge, or discard this patch.
src/Organizations/Factory/Controller/ProfileControllerFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,6 +33,6 @@
 block discarded – undo
33 33
         $translator = $container->get('translator');
34 34
         $imageFileCacheManager = $container->get('Organizations\ImageFileCache\Manager');
35 35
         $options = $container->get('Jobs/JobboardSearchOptions');
36
-        return new ProfileController($repo,$jobRepository,$translator,$imageFileCacheManager,['count' => $options->getPerPage()]);
36
+        return new ProfileController($repo, $jobRepository, $translator, $imageFileCacheManager, ['count' => $options->getPerPage()]);
37 37
     }
38 38
 }
Please login to merge, or discard this patch.
module/Core/src/Core/Controller/FileController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         $response      = $this->getResponse();
74 74
 
75 75
         try {
76
-            $repository = $this->repositories->get($module . '/' . $entityName);
76
+            $repository = $this->repositories->get($module.'/'.$entityName);
77 77
         } catch (\Exception $e) {
78 78
             $response->setStatusCode(404);
79 79
             $this->getEvent()->setParam('exception', $e);
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         
108 108
         $this->acl($file);
109 109
 
110
-        $headers=$response->getHeaders();
110
+        $headers = $response->getHeaders();
111 111
 
112 112
         $headers->addHeaderline('Content-Type', $file->getType())
113 113
             ->addHeaderline('Content-Length', $file->getLength());
Please login to merge, or discard this patch.
module/Core/src/Core/Factory/Controller/FileControllerFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,6 +26,6 @@
 block discarded – undo
26 26
         $repositories = $container->get('repositories');
27 27
         $coreFileEvents = $container->get('Core/File/Events');
28 28
 
29
-        return new FileController($repositories,$coreFileEvents);
29
+        return new FileController($repositories, $coreFileEvents);
30 30
     }
31 31
 }
Please login to merge, or discard this patch.
module/Behat/src/OrganizationContext.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -103,9 +103,9 @@  discard block
 block discarded – undo
103 103
 	public function iHaveOrganization($name)
104 104
     {
105 105
         $user = $this->getUserContext()->getCurrentUser();
106
-        $organization = $this->findOrganizationByName($name,false);
106
+        $organization = $this->findOrganizationByName($name, false);
107 107
         $repo = $this->getRepository('Organizations/Organization');
108
-        if(!$organization instanceof Organization){
108
+        if (!$organization instanceof Organization) {
109 109
 
110 110
             $organization = new Organization();
111 111
             $organizationName = new OrganizationName($name);
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $organization->setParent($parent);
119 119
         $organization->setProfileSetting(Organization::PROFILE_ALWAYS_ENABLE);
120 120
         $permissions = $organization->getPermissions();
121
-        $permissions->grant($user,Permissions::PERMISSION_ALL);
121
+        $permissions->grant($user, Permissions::PERMISSION_ALL);
122 122
 
123 123
         $repo->store($organization);
124 124
         $repo->getDocumentManager()->refresh($organization);
@@ -128,19 +128,19 @@  discard block
 block discarded – undo
128 128
     /**
129 129
      * @Given organization :name have jobs:
130 130
      */
131
-    public function organizationHavePublishedJob($name,TableNode $table)
131
+    public function organizationHavePublishedJob($name, TableNode $table)
132 132
     {
133 133
         $user = $this->getUserContext()->getCurrentUser();
134
-        if(is_null($user)){
134
+        if (is_null($user)) {
135 135
             throw new FailedExpectationException('Need to login first');
136 136
         }
137 137
 
138 138
         $organization = $this->findOrganizationByName($name);
139
-        foreach($table->getColumnsHash() as $index=>$definitions){
139
+        foreach ($table->getColumnsHash() as $index=>$definitions) {
140 140
             $definitions['user'] = $user->getLogin();
141
-            $status = isset($definitions['status']) ? $definitions['status']:'draft';
141
+            $status = isset($definitions['status']) ? $definitions['status'] : 'draft';
142 142
             unset($definitions['status']);
143
-            $this->jobContext->buildJob($status,$definitions,$organization);
143
+            $this->jobContext->buildJob($status, $definitions, $organization);
144 144
         }
145 145
     }
146 146
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      * @param $name
150 150
      * @param $setting
151 151
      */
152
-    public function profileSetting($name,$setting)
152
+    public function profileSetting($name, $setting)
153 153
     {
154 154
         $repo = $this->getRepository('Organizations/Organization');
155 155
         $organization = $this->findOrganizationByName($name);
@@ -169,12 +169,12 @@  discard block
 block discarded – undo
169 169
         $contact = $organization->getContact();
170 170
 
171 171
         $definitions = $table->getRowsHash();
172
-        foreach($definitions as $name=>$value){
172
+        foreach ($definitions as $name=>$value) {
173 173
             $field = Inflector::camelize($name);
174 174
             $method = 'set'.$field;
175
-            $callback = array($contact,$method);
176
-            if(is_callable($callback)){
177
-                call_user_func_array($callback,[$value]);
175
+            $callback = array($contact, $method);
176
+            if (is_callable($callback)) {
177
+                call_user_func_array($callback, [$value]);
178 178
             }
179 179
         }
180 180
         $this->getRepository('Organizations/Organization')->store($organization);
@@ -186,14 +186,14 @@  discard block
 block discarded – undo
186 186
      * @param string $name
187 187
      * @throws FailedExpectationException
188 188
      */
189
-    public function iGoToOrganizationProfilePage($name=null)
189
+    public function iGoToOrganizationProfilePage($name = null)
190 190
     {
191
-        if(is_null($name)){
191
+        if (is_null($name)) {
192 192
             $organization = $this->getUserContext()->getCurrentUser()->getOrganization()->getOrganization();
193
-        }else{
193
+        } else {
194 194
             $organization = $this->findOrganizationByName($name);
195 195
         }
196
-        $url = $this->buildUrl('lang/organizations/profileDetail',[
196
+        $url = $this->buildUrl('lang/organizations/profileDetail', [
197 197
             'id' => $organization->getId()
198 198
         ]);
199 199
 
@@ -210,10 +210,10 @@  discard block
 block discarded – undo
210 210
         /* @var OrganizationRepository $repo */
211 211
         $repo = $this->getRepository('Organizations/Organization');
212 212
         $result = $repo->findByName($name);
213
-        $organization = count($result) > 0 ? $result[0]:null;
214
-        if(!$organization instanceof Organization && $throwException){
213
+        $organization = count($result) > 0 ? $result[0] : null;
214
+        if (!$organization instanceof Organization && $throwException) {
215 215
             throw new FailedExpectationException(
216
-                sprintf('Organization %s is not found.',$name)
216
+                sprintf('Organization %s is not found.', $name)
217 217
             );
218 218
         }
219 219
         return $organization;
@@ -232,8 +232,8 @@  discard block
 block discarded – undo
232 232
         $jobRepo = $this->getRepository('Jobs/Job');
233 233
         $result = $jobRepo->findByOrganization($org->getId());
234 234
 
235
-        foreach($result as $job){
236
-            $jobRepo->remove($job,true);
235
+        foreach ($result as $job) {
236
+            $jobRepo->remove($job, true);
237 237
         }
238 238
     }
239 239
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
     {
245 245
         $user = $this->getUserContext()->getCurrentUser();
246 246
         $organization = $user->getOrganization()->getOrganization();
247
-        $url = $this->buildUrl('lang/organizations/edit',['id' => $organization->getId()]);
247
+        $url = $this->buildUrl('lang/organizations/edit', ['id' => $organization->getId()]);
248 248
         $this->visit($url);
249 249
     }
250 250
 
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
     public function iAttachLogoFromFile($file)
256 256
     {
257 257
         $elementId = 'organizationLogo-original';
258
-        $this->minkContext->attachFileToField($elementId,$file);
258
+        $this->minkContext->attachFileToField($elementId, $file);
259 259
     }
260 260
 
261 261
     /**
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
     public function iRemoveLogoFromOrganization()
265 265
     {
266 266
         $elementId = '#organizationLogo-original-delete';
267
-        $element = $this->minkContext->getSession()->getPage()->find('css',$elementId);
267
+        $element = $this->minkContext->getSession()->getPage()->find('css', $elementId);
268 268
         $element->click();
269 269
     }
270 270
 }
Please login to merge, or discard this patch.
module/Jobs/src/Jobs/Listener/MailSender.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         $this->options = array_merge($this->options, $options);
63 63
     }
64 64
 
65
-    public function attach(EventManagerInterface $events, $priority=1)
65
+    public function attach(EventManagerInterface $events, $priority = 1)
66 66
     {
67 67
         $this->listeners[] = $events->attach(JobEvent::EVENT_JOB_CREATED, array($this, 'onJobCreated'));
68 68
         $this->listeners[] = $events->attach(JobEvent::EVENT_JOB_ACCEPTED, array($this, 'onJobAccepted'));
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
         if ($adminMail) {
153 153
             $mail->setTo($this->options['adminEmail']);
154 154
         } else {
155
-            if (! ($user = $job->getUser()) ) { return; }
155
+            if (!($user = $job->getUser())) { return; }
156 156
             $userInfo  = $user->getInfo();
157 157
             $userEmail = $userInfo->getEmail();
158 158
             $userName  = $userInfo->getDisplayName(/*emailIfEmpty*/ false);
Please login to merge, or discard this patch.