@@ -72,7 +72,7 @@ |
||
| 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); |
@@ -65,11 +65,11 @@ |
||
| 65 | 65 | $type = $mailServiceOptions->getTransportClass(); |
| 66 | 66 | if (MailService::TRANSPORT_SMTP == $type) { |
| 67 | 67 | return new Smtp($mailServiceOptions); |
| 68 | - }elseif(MailService::TRANSPORT_FILE == $type){ |
|
| 68 | + } elseif(MailService::TRANSPORT_FILE == $type){ |
|
| 69 | 69 | $fileOptions = new FileOptions(); |
| 70 | 70 | $fileOptions->setPath($mailServiceOptions->getPath()); |
| 71 | 71 | return new FileTransport($fileOptions); |
| 72 | - }elseif(MailService::TRANSPORT_SENDMAIL == $type){ |
|
| 72 | + } elseif(MailService::TRANSPORT_SENDMAIL == $type){ |
|
| 73 | 73 | return new Sendmail(); |
| 74 | 74 | } |
| 75 | 75 | |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | $element = $page->find('css',$mapMultiple[$field]); |
| 185 | 185 | if(!is_null($element) && $element->getAttribute('multiple')=='multiple'){ |
| 186 | 186 | $this->minkContext->selectOption($value,$multipleField); |
| 187 | - }else{ |
|
| 187 | + } else{ |
|
| 188 | 188 | $locator = $mapSelect2[$field]; |
| 189 | 189 | $this->select2Context->iFillInSelect2Field($locator,$value); |
| 190 | 190 | } |
@@ -247,14 +247,14 @@ discard block |
||
| 247 | 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 | 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 | } |
@@ -59,8 +59,7 @@ discard block |
||
| 59 | 59 | if (array_key_exists($serviceName, $this->aliases)) { |
| 60 | 60 | $serviceName = $this->aliases[$serviceName]; |
| 61 | 61 | } |
| 62 | - } |
|
| 63 | - else{ |
|
| 62 | + } else{ |
|
| 64 | 63 | if( $p->getName() == 'config' ){ |
| 65 | 64 | $serviceName = 'config'; |
| 66 | 65 | } |
@@ -74,8 +73,7 @@ discard block |
||
| 74 | 73 | } |
| 75 | 74 | try { |
| 76 | 75 | $constructorArgs[] = $container->get($serviceName); |
| 77 | - } |
|
| 78 | - catch (\Exception $x) { |
|
| 76 | + } catch (\Exception $x) { |
|
| 79 | 77 | echo __CLASS__ . " couldn't create an instance of {$p->getName()} to satisfy the constructor for $requestedName."; |
| 80 | 78 | exit; |
| 81 | 79 | } |
@@ -190,7 +190,7 @@ |
||
| 190 | 190 | { |
| 191 | 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 | 196 | $url = $this->buildUrl('lang/organizations/profileDetail',[ |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | $result = true; |
| 83 | 83 | try{ |
| 84 | 84 | $repo->store($user); |
| 85 | - }catch (\Exception $e){ |
|
| 85 | + } catch (\Exception $e){ |
|
| 86 | 86 | throw $e; |
| 87 | 87 | } |
| 88 | 88 | return $result; |
@@ -120,7 +120,7 @@ |
||
| 120 | 120 | ]; |
| 121 | 121 | $userOk = $this->plugin('Install/UserCreator',$options)->process($data['username'], $data['password'], $data['email']); |
| 122 | 122 | $ok = $this->plugin('Install/ConfigCreator')->process($data['db_conn'], $data['email']); |
| 123 | - }catch (\Exception $exception){ |
|
| 123 | + } catch (\Exception $exception){ |
|
| 124 | 124 | /* @TODO: provide a way to handle global error message */ |
| 125 | 125 | return $this->createJsonResponse([ |
| 126 | 126 | 'ok' => false, |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | $this->error(self::NO_CONNECTION); |
| 82 | 82 | |
| 83 | 83 | return false; |
| 84 | - }catch (\Exception $e){ |
|
| 84 | + } catch (\Exception $e){ |
|
| 85 | 85 | $this->databaseError = $e->getMessage(); |
| 86 | 86 | $this->error(self::NO_CONNECTION); |
| 87 | 87 | return false; |
@@ -66,8 +66,7 @@ |
||
| 66 | 66 | if (null !== $result) { |
| 67 | 67 | try { $dependencies->add($result); } |
| 68 | 68 | /* silently ignore all invalid results */ |
| 69 | - catch (\UnexpectedValueException $e) {} |
|
| 70 | - catch (\InvalidArgumentException $e) {} |
|
| 69 | + catch (\UnexpectedValueException $e) {} catch (\InvalidArgumentException $e) {} |
|
| 71 | 70 | } |
| 72 | 71 | } |
| 73 | 72 | |