@@ -26,7 +26,7 @@ discard block |
||
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 |
||
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 |
@@ -28,25 +28,25 @@ discard block |
||
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 |
||
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 |
@@ -136,7 +136,7 @@ |
||
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 | /** |
@@ -45,11 +45,11 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | * @param EventManagerInterface $events |
47 | 47 | * @return $this |
48 | 48 | */ |
49 | - public function attach(EventManagerInterface $events, $priority=1) |
|
49 | + public function attach(EventManagerInterface $events, $priority = 1) |
|
50 | 50 | { |
51 | 51 | return $this; |
52 | 52 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $jsonLastError = json_last_error(); |
165 | 165 | if (json_last_error() != JSON_ERROR_NONE) { |
166 | 166 | // not able to decode json |
167 | - $log->info('RestCall Response not Json [errorCode: ' . $jsonLastError . ']: ' . var_export($body, true)); |
|
167 | + $log->info('RestCall Response not Json [errorCode: '.$jsonLastError.']: '.var_export($body, true)); |
|
168 | 168 | } else { |
169 | 169 | // does the provider want to have an own ID for Identification ? |
170 | 170 | $response_referenceUpdate = $decodedBody->referenceUpdate; |
@@ -174,10 +174,10 @@ discard block |
||
174 | 174 | $logInfo = 'RestCall changed externalID [' |
175 | 175 | . var_export($publisher->externalId, true) |
176 | 176 | . ' => ' |
177 | - . var_export($response_externalIdUpdate, true) . '], reference [' |
|
177 | + . var_export($response_externalIdUpdate, true).'], reference [' |
|
178 | 178 | . var_export($publisher->reference, true) |
179 | 179 | . ' => ' |
180 | - . var_export($response_referenceUpdate, true) . ']'; |
|
180 | + . var_export($response_referenceUpdate, true).']'; |
|
181 | 181 | $log->info($logInfo); |
182 | 182 | $publisher->reference = $response_referenceUpdate; |
183 | 183 | $publisher->externalId = $response_externalIdUpdate; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | */ |
37 | 37 | protected $service; |
38 | 38 | |
39 | - public function __invoke( ContainerInterface $container, $requestedName, array $options = null ) |
|
39 | + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) |
|
40 | 40 | { |
41 | 41 | $this->service = $container; |
42 | 42 | return $this; |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $filter->setViewHelperForm($viewHelperForm); |
62 | 62 | } |
63 | 63 | if (!isset($filter)) { |
64 | - throw new \InvalidArgumentException(get_class($element) . ' cannot be used to initialize a template'); |
|
64 | + throw new \InvalidArgumentException(get_class($element).' cannot be used to initialize a template'); |
|
65 | 65 | } |
66 | 66 | $viewManager = $this->service->get('ViewHelperManager'); |
67 | 67 | $basePathHelper = $viewManager->get('basePath'); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | $filter->setImageFileCacheHelper($imageFileCacheHelper); |
72 | 72 | $filter->setServerUrlHelper($serverUrlHelper); |
73 | 73 | |
74 | - if($filter instanceof ViewModelTemplateFilterJob || method_exists($filter,'setJsonLdHelper')){ |
|
74 | + if ($filter instanceof ViewModelTemplateFilterJob || method_exists($filter, 'setJsonLdHelper')) { |
|
75 | 75 | $jsonLdHelper = $viewManager->get(JsonLd::class); |
76 | 76 | $filter->setJsonLdHelper($jsonLdHelper); |
77 | 77 | } |
@@ -47,7 +47,7 @@ |
||
47 | 47 | $params = $viewHelper->get('params'); |
48 | 48 | $serverUrl = $viewHelper->get('serverUrl'); |
49 | 49 | |
50 | - $helper = new JobUrl(); |
|
50 | + $helper = new JobUrl(); |
|
51 | 51 | $helper->setUrlHelper($url) |
52 | 52 | ->setParamsHelper($params) |
53 | 53 | ->setServerUrlHelper($serverUrl); |
@@ -44,7 +44,7 @@ |
||
44 | 44 | $params = $viewHelper->get('params'); |
45 | 45 | $serverUrl = $viewHelper->get('serverUrl'); |
46 | 46 | |
47 | - $helper = new ApplyUrl(); |
|
47 | + $helper = new ApplyUrl(); |
|
48 | 48 | $helper->setUrlHelper($url) |
49 | 49 | ->setTranslateHelper($translate) |
50 | 50 | ->setParamsHelper($params) |
@@ -33,8 +33,8 @@ |
||
33 | 33 | { |
34 | 34 | $auth = $container->get('AuthenticationService'); |
35 | 35 | /* @var RepositoryService $repositoryService */ |
36 | - $repositoryService = $container->get('repositories'); |
|
37 | - $translator = $container->get('translator'); |
|
36 | + $repositoryService = $container->get('repositories'); |
|
37 | + $translator = $container->get('translator'); |
|
38 | 38 | $filterManager = $container->get('FilterManager'); |
39 | 39 | $jobFormEvents = $container->get('Jobs/JobContainer/Events'); |
40 | 40 | $formManager = $container->get('FormElementManager'); |