@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $collector = new DefaultPropertyCollector(); |
38 | 38 | $class = $input->getArgument('class'); |
39 | 39 | if (!class_exists($class)) { |
40 | - throw new NotFoundException('Could not find the class: ' . $class); |
|
40 | + throw new NotFoundException('Could not find the class: '.$class); |
|
41 | 41 | } |
42 | 42 | if (!is_subclass_of($class, 'Magium\AbstractConfigurableElement')) { |
43 | 43 | throw new \InvalidArgumentException('Class must be a sub-class of Magium\AbstractConfigurableElement'); |
@@ -58,9 +58,9 @@ discard block |
||
58 | 58 | foreach ($print as $property) { |
59 | 59 | $output->writeln(''); |
60 | 60 | $output->writeln($property->getName()); |
61 | - $output->writeln("\tDefault Value: " . $property->getDefaultValue()); |
|
61 | + $output->writeln("\tDefault Value: ".$property->getDefaultValue()); |
|
62 | 62 | if ($property->getDescription()) { |
63 | - $output->writeln("\t" . $property->getDescription()); |
|
63 | + $output->writeln("\t".$property->getDescription()); |
|
64 | 64 | } |
65 | 65 | } |
66 | 66 | } |
@@ -20,7 +20,7 @@ |
||
20 | 20 | |
21 | 21 | protected function configure() |
22 | 22 | { |
23 | - $this->setName('api:' . $this->getApiName()); |
|
23 | + $this->setName('api:'.$this->getApiName()); |
|
24 | 24 | $this->setDescription($this->getApiDescription()); |
25 | 25 | } |
26 | 26 |
@@ -32,22 +32,22 @@ |
||
32 | 32 | { |
33 | 33 | $path = $this->path; |
34 | 34 | if ($path && $path[0] != '/' && $path[1] != ':') { |
35 | - $path = getcwd() . '/' . $path; |
|
35 | + $path = getcwd().'/'.$path; |
|
36 | 36 | } |
37 | 37 | $calcPath = $path; |
38 | 38 | $path = realpath($path); |
39 | 39 | if ($path === false) { |
40 | - throw new NotFoundException('Path not found: ' . $calcPath); |
|
40 | + throw new NotFoundException('Path not found: '.$calcPath); |
|
41 | 41 | } |
42 | 42 | if (!is_writable($path)) { |
43 | - throw new NotAccessibleException('Could not write to path: ' . $calcPath); |
|
43 | + throw new NotAccessibleException('Could not write to path: '.$calcPath); |
|
44 | 44 | } |
45 | - $fullPath = $path . '/magium.json'; |
|
45 | + $fullPath = $path.'/magium.json'; |
|
46 | 46 | if (file_exists($fullPath)) { |
47 | - throw new ExistsException('The file exists already. Will not overwrite: ' . $fullPath); |
|
47 | + throw new ExistsException('The file exists already. Will not overwrite: '.$fullPath); |
|
48 | 48 | } |
49 | 49 | file_put_contents($fullPath, '{}'); |
50 | - $output->writeln('Created empty JSON configuration file: ' . realpath($fullPath)); |
|
50 | + $output->writeln('Created empty JSON configuration file: '.realpath($fullPath)); |
|
51 | 51 | |
52 | 52 | } |
53 | 53 |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | public static function addDirectory($dir, $namespace) |
18 | 18 | { |
19 | 19 | if ($dir != realpath($dir)) { |
20 | - throw new InvalidConfigurationException('Path not found. Please ensure that you pass the realpath() in: ' . $dir); |
|
20 | + throw new InvalidConfigurationException('Path not found. Please ensure that you pass the realpath() in: '.$dir); |
|
21 | 21 | } |
22 | 22 | self::$dirs[$dir] = $namespace; |
23 | 23 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | 'Set if you want the namespace output escaped (useful for copy and paste)' |
76 | 76 | ); |
77 | 77 | |
78 | - self::addDirectory(realpath(__DIR__ . '/../..'), 'Magium'); |
|
78 | + self::addDirectory(realpath(__DIR__.'/../..'), 'Magium'); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | protected function execute(InputInterface $input, OutputInterface $output) |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | sort($paths); |
100 | 100 | $filter = $input->getArgument('filter'); |
101 | - if (count($paths) > 0 ) { |
|
101 | + if (count($paths) > 0) { |
|
102 | 102 | $output->writeln('Classes found: '); |
103 | 103 | $escape = $input->getOption('escape'); |
104 | 104 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $path = str_replace('\\', '\\\\', $path); |
108 | 108 | } |
109 | 109 | if ($filter && stripos($path, $filter) !== false) { |
110 | - $output->writeln("\t" . $path); |
|
110 | + $output->writeln("\t".$path); |
|
111 | 111 | } |
112 | 112 | } |
113 | 113 | } else { |
@@ -33,11 +33,11 @@ discard block |
||
33 | 33 | |
34 | 34 | protected function execute(InputInterface $input, OutputInterface $output) |
35 | 35 | { |
36 | - if (!file_exists($this->path . '/magium.json')) { |
|
36 | + if (!file_exists($this->path.'/magium.json')) { |
|
37 | 37 | throw new NotFoundException('Configuration file not found. Please execute magium:init.'); |
38 | 38 | } |
39 | 39 | $reader = new \Zend\Config\Reader\Json(); |
40 | - $config = new Config($reader->fromFile($this->path . '/magium.json'), true); |
|
40 | + $config = new Config($reader->fromFile($this->path.'/magium.json'), true); |
|
41 | 41 | |
42 | 42 | $name = $input->getArgument('name'); |
43 | 43 | $value = $input->getArgument('value'); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $config->config->$name = $value; |
53 | 53 | |
54 | 54 | $writer = new Json(); |
55 | - $writer->toFile($this->path . '/magium.json', $config); |
|
55 | + $writer->toFile($this->path.'/magium.json', $config); |
|
56 | 56 | $output->writeln(sprintf('Wrote value for "%s" to %s/magium.json', $name, $this->path)); |
57 | 57 | } |
58 | 58 |
@@ -180,12 +180,12 @@ |
||
180 | 180 | |
181 | 181 | $count = 0; |
182 | 182 | |
183 | - $path = realpath(__DIR__ . '/../'); |
|
183 | + $path = realpath(__DIR__.'/../'); |
|
184 | 184 | |
185 | 185 | while ($count++ < 5) { |
186 | 186 | $dir = "{$path}/configuration/"; |
187 | 187 | if (is_dir($dir)) { |
188 | - foreach (glob($dir . '*.php') as $file) { |
|
188 | + foreach (glob($dir.'*.php') as $file) { |
|
189 | 189 | $configArray = array_merge_recursive($configArray, include $file); |
190 | 190 | } |
191 | 191 | break; |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | } |
195 | 195 | } |
196 | 196 | |
197 | - public static function resolveClass( $class, $prefix = null) |
|
197 | + public static function resolveClass($class, $prefix = null) |
|
198 | 198 | { |
199 | 199 | $origClass = $class; |
200 | 200 | if ($prefix !== null) { |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | } |
209 | 209 | |
210 | 210 | foreach (self::$baseNamespaces as $namespace) { |
211 | - $fqClass = $namespace . '\\' . $class; |
|
211 | + $fqClass = $namespace.'\\'.$class; |
|
212 | 212 | if (class_exists($fqClass)) { |
213 | 213 | return $fqClass; |
214 | 214 | } |
@@ -493,7 +493,7 @@ discard block |
||
493 | 493 | try { |
494 | 494 | $this->byXpath(sprintf('//%s[contains(., "%s")]', $node, addslashes($text))); |
495 | 495 | } catch (\Exception $e) { |
496 | - $this->fail('The body did not contain the text: ' . $text); |
|
496 | + $this->fail('The body did not contain the text: '.$text); |
|
497 | 497 | } |
498 | 498 | } |
499 | 499 | |
@@ -503,7 +503,7 @@ discard block |
||
503 | 503 | $this->webdriver->byXpath(sprintf('//body[contains(., "%s")]', $text)); |
504 | 504 | // If the element is not found then an exception will be thrown |
505 | 505 | } catch (\Exception $e) { |
506 | - $this->fail('The body did not contain the text: ' . $text); |
|
506 | + $this->fail('The body did not contain the text: '.$text); |
|
507 | 507 | } |
508 | 508 | |
509 | 509 | } |
@@ -512,7 +512,7 @@ discard block |
||
512 | 512 | { |
513 | 513 | try { |
514 | 514 | $this->webdriver->byXpath(sprintf('//body[contains(., "%s")]', $text)); |
515 | - $this->fail('The page contains the words: ' . $text); |
|
515 | + $this->fail('The page contains the words: '.$text); |
|
516 | 516 | } catch (NoSuchElementException $e) { |
517 | 517 | // Exception thrown is a success |
518 | 518 | } |
@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | { |
553 | 553 | |
554 | 554 | if ($parentElementSelector !== null) { |
555 | - $xpathTemplate = $parentElementSelector . $xpathTemplate; |
|
555 | + $xpathTemplate = $parentElementSelector.$xpathTemplate; |
|
556 | 556 | } |
557 | 557 | if ($specificNodeType !== null) { |
558 | 558 | return $this->byXpath(sprintf($xpathTemplate, $specificNodeType, $this->getTranslator()->translatePlaceholders($text))); |
@@ -565,7 +565,7 @@ discard block |
||
565 | 565 | } |
566 | 566 | } |
567 | 567 | // This is here for consistency with the other by* methods |
568 | - WebDriverException::throwException(7, 'Could not find element with text: ' . $this->getTranslator()->translatePlaceholders($text), []); |
|
568 | + WebDriverException::throwException(7, 'Could not find element with text: '.$this->getTranslator()->translatePlaceholders($text), []); |
|
569 | 569 | } |
570 | 570 | |
571 | 571 | /** |
@@ -33,7 +33,7 @@ |
||
33 | 33 | |
34 | 34 | $this->logger->debug( |
35 | 35 | sprintf( |
36 | - 'Executing: ' . $command_name |
|
36 | + 'Executing: '.$command_name |
|
37 | 37 | ), |
38 | 38 | $extra |
39 | 39 | ); |
@@ -33,7 +33,7 @@ |
||
33 | 33 | $payload = ['payload' => json_encode($payload)]; |
34 | 34 | } |
35 | 35 | |
36 | - $url = 'http://' . $this->apiConfiguration->getApiHostname() . $url; |
|
36 | + $url = 'http://'.$this->apiConfiguration->getApiHostname().$url; |
|
37 | 37 | |
38 | 38 | $factory = new Factory(); |
39 | 39 | $requestSigner = $factory->newRequestSigner(); |