@@ -31,10 +31,10 @@ |
||
31 | 31 | |
32 | 32 | public function configureDi(Di $di) |
33 | 33 | { |
34 | - $di->instanceManager()->addSharedInstance($this->configurationReader, get_class($this->configurationReader)); |
|
35 | - $di->instanceManager()->addSharedInstance($this->classConfigurationReader, get_class($this->classConfigurationReader)); |
|
36 | - $di->instanceManager()->addSharedInstance($this->environmentConfigurationReader, get_class($this->environmentConfigurationReader)); |
|
37 | - $di->instanceManager()->addSharedInstance($this, get_class($this)); |
|
34 | + $di->instanceManager()->addSharedInstance($this->configurationReader, get_class($this->configurationReader)); |
|
35 | + $di->instanceManager()->addSharedInstance($this->classConfigurationReader, get_class($this->classConfigurationReader)); |
|
36 | + $di->instanceManager()->addSharedInstance($this->environmentConfigurationReader, get_class($this->environmentConfigurationReader)); |
|
37 | + $di->instanceManager()->addSharedInstance($this, get_class($this)); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | public function configureObject(ConfigurableObjectInterface $obj) |
@@ -12,7 +12,7 @@ |
||
12 | 12 | |
13 | 13 | foreach ($classes as $class) { |
14 | 14 | |
15 | - $variablePrefix = 'MAGIUM_' . str_replace('\\', '_', strtoupper($class)) . '_'; |
|
15 | + $variablePrefix = 'MAGIUM_'.str_replace('\\', '_', strtoupper($class)).'_'; |
|
16 | 16 | |
17 | 17 | // Fixes https://github.com/magium/Magium/issues/114 |
18 | 18 | $props = array_merge($_SERVER, $_ENV); |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | && $tokens[$i][0] == T_STRING |
151 | 151 | ) { |
152 | 152 | |
153 | - $class = $namespace . $tokens[$i][1]; |
|
153 | + $class = $namespace.$tokens[$i][1]; |
|
154 | 154 | $this->logger->debug(sprintf('Extracted %s from %s', $class, $file)); |
155 | 155 | return $class; |
156 | 156 | } else if ($tokens[$i - 2][0] == T_NAMESPACE |
@@ -158,10 +158,10 @@ discard block |
||
158 | 158 | && $tokens[$i][0] == T_STRING) { |
159 | 159 | |
160 | 160 | $plus = 0; |
161 | - while ($tokens[$i+$plus] != ';') { |
|
162 | - $token = $tokens[$i+$plus]; |
|
161 | + while ($tokens[$i + $plus] != ';') { |
|
162 | + $token = $tokens[$i + $plus]; |
|
163 | 163 | if ($token[0] == T_STRING) { |
164 | - $namespace .= $token[1] . '\\'; |
|
164 | + $namespace .= $token[1].'\\'; |
|
165 | 165 | } |
166 | 166 | $plus++; |
167 | 167 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | |
24 | 24 | public function evaluate($string) |
25 | 25 | { |
26 | - $string = '<?php ' . $string; |
|
26 | + $string = '<?php '.$string; |
|
27 | 27 | $comparison1 = $comparison2 = ''; |
28 | 28 | $operator = null; |
29 | 29 | $tokens = token_get_all($string); |
@@ -44,9 +44,9 @@ discard block |
||
44 | 44 | $isVendor = array_pop($testParts) == 'vendor'; |
45 | 45 | |
46 | 46 | if ($isVendor) { |
47 | - $path = realpath(__DIR__ . '/../../../../..'); // Get out of the Magium directories |
|
47 | + $path = realpath(__DIR__.'/../../../../..'); // Get out of the Magium directories |
|
48 | 48 | } else { |
49 | - $path = realpath(__DIR__ . '/../../..'); |
|
49 | + $path = realpath(__DIR__.'/../../..'); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | $count = 0; |
@@ -76,8 +76,8 @@ discard block |
||
76 | 76 | $classes = $this->introspectClass($config); |
77 | 77 | |
78 | 78 | foreach ($classes as $class) { |
79 | - $configurationFile = $class . '.php'; |
|
80 | - $configurationFile = $configurationDir . DIRECTORY_SEPARATOR . str_replace('\\', DIRECTORY_SEPARATOR, $configurationFile); |
|
79 | + $configurationFile = $class.'.php'; |
|
80 | + $configurationFile = $configurationDir.DIRECTORY_SEPARATOR.str_replace('\\', DIRECTORY_SEPARATOR, $configurationFile); |
|
81 | 81 | |
82 | 82 | if (file_exists($configurationFile)) { |
83 | 83 | include $configurationFile; |
@@ -24,7 +24,7 @@ |
||
24 | 24 | $reflectionClass = $class; |
25 | 25 | } |
26 | 26 | |
27 | - foreach ($originalReflectionClass->getInterfaceNames() as $name){ |
|
27 | + foreach ($originalReflectionClass->getInterfaceNames() as $name) { |
|
28 | 28 | $this->addClass($name); |
29 | 29 | $interfaces[] = $name; |
30 | 30 | $reflectionInterface = new \ReflectionClass($name); |
@@ -34,7 +34,7 @@ |
||
34 | 34 | } |
35 | 35 | try { |
36 | 36 | $assertion->assert(); |
37 | - $this->logger->logAssertionSuccess( $assertion, $extra ); |
|
37 | + $this->logger->logAssertionSuccess($assertion, $extra); |
|
38 | 38 | } catch (\Exception $e) { |
39 | 39 | $this->logger->logAssertionFailure($e, $assertion, $extra); |
40 | 40 | $this->testCase->fail($e->getMessage()); |
@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | public function interpolate($string) |
24 | 24 | { |
25 | - $this->logger->info('Interpolating string: ' . $string); |
|
25 | + $this->logger->info('Interpolating string: '.$string); |
|
26 | 26 | $matches = null; |
27 | 27 | // Finding {{$product->setEntityId(123)->load()}} type methods |
28 | 28 | if (preg_match('/\{\{(?:\$)([^{]+)\}\}/', $string, $matches)) { |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | } |
197 | 197 | } |
198 | 198 | |
199 | - public static function resolveClass( $class, $prefix = null) |
|
199 | + public static function resolveClass($class, $prefix = null) |
|
200 | 200 | { |
201 | 201 | $origClass = $class; |
202 | 202 | if ($prefix !== null) { |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | } |
211 | 211 | |
212 | 212 | foreach (self::$baseNamespaces as $namespace) { |
213 | - $fqClass = $namespace . '\\' . $class; |
|
213 | + $fqClass = $namespace.'\\'.$class; |
|
214 | 214 | try { |
215 | 215 | if (class_exists($fqClass)) { |
216 | 216 | return $fqClass; |
@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | try { |
498 | 498 | $this->byXpath(sprintf('//%s[contains(., "%s")]', $node, addslashes($text))); |
499 | 499 | } catch (\Exception $e) { |
500 | - $this->fail('The body did not contain the text: ' . $text); |
|
500 | + $this->fail('The body did not contain the text: '.$text); |
|
501 | 501 | } |
502 | 502 | } |
503 | 503 | |
@@ -507,7 +507,7 @@ discard block |
||
507 | 507 | $this->webdriver->byXpath(sprintf('//body[contains(., "%s")]', $text)); |
508 | 508 | // If the element is not found then an exception will be thrown |
509 | 509 | } catch (\Exception $e) { |
510 | - $this->fail('The body did not contain the text: ' . $text); |
|
510 | + $this->fail('The body did not contain the text: '.$text); |
|
511 | 511 | } |
512 | 512 | |
513 | 513 | } |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | { |
517 | 517 | try { |
518 | 518 | $this->webdriver->byXpath(sprintf('//body[contains(., "%s")]', $text)); |
519 | - $this->fail('The page contains the words: ' . $text); |
|
519 | + $this->fail('The page contains the words: '.$text); |
|
520 | 520 | } catch (NoSuchElementException $e) { |
521 | 521 | // Exception thrown is a success |
522 | 522 | } |
@@ -556,7 +556,7 @@ discard block |
||
556 | 556 | { |
557 | 557 | |
558 | 558 | if ($parentElementSelector !== null) { |
559 | - $xpathTemplate = $parentElementSelector . $xpathTemplate; |
|
559 | + $xpathTemplate = $parentElementSelector.$xpathTemplate; |
|
560 | 560 | } |
561 | 561 | if ($specificNodeType !== null) { |
562 | 562 | return $this->byXpath(sprintf($xpathTemplate, $specificNodeType, $this->getTranslator()->translatePlaceholders($text))); |
@@ -569,7 +569,7 @@ discard block |
||
569 | 569 | } |
570 | 570 | } |
571 | 571 | // This is here for consistency with the other by* methods |
572 | - WebDriverException::throwException(7, 'Could not find element with text: ' . $this->getTranslator()->translatePlaceholders($text), []); |
|
572 | + WebDriverException::throwException(7, 'Could not find element with text: '.$this->getTranslator()->translatePlaceholders($text), []); |
|
573 | 573 | } |
574 | 574 | |
575 | 575 | /** |