@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | $html = $this->webDriver->byXpath('//body')->getAttribute('innerHTML'); |
110 | 110 | $doc = new \DOMDocument(); |
111 | 111 | libxml_use_internal_errors(true); |
112 | - $doc->loadHTML('<html><body>' . $html . '</body></html>'); |
|
112 | + $doc->loadHTML('<html><body>'.$html.'</body></html>'); |
|
113 | 113 | $xpath = new \DOMXPath($doc); |
114 | 114 | |
115 | 115 | $baseMatches = $this->getBaseMatches($xpath, $baseChild); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | } |
122 | 122 | |
123 | 123 | if (!count($finalMatches)) { |
124 | - throw new UnableToExtractMenuXpathException('Could not extract menu Xpaths for the category path: ' . $this->path); |
|
124 | + throw new UnableToExtractMenuXpathException('Could not extract menu Xpaths for the category path: '.$this->path); |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | $this->baseXpath = $finalMatches[0]['baseNodePath']; |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | { |
180 | 180 | $baseMatches = []; |
181 | 181 | foreach ($this->baseSearchOrder as $base) { |
182 | - $baseQuery = '//' . $base; |
|
182 | + $baseQuery = '//'.$base; |
|
183 | 183 | $nodeList = $xpath->query($baseQuery); |
184 | 184 | foreach ($nodeList as $index => $node) { |
185 | 185 | /* @var $node \DOMElement */ |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | if ($element->isDisplayed()) { |
191 | 191 | foreach ($this->childSearchOrder as $order) { |
192 | 192 | $childQueryXpath = sprintf($order, $baseChild); |
193 | - $childQuery = $path . '/descendant::' . $childQueryXpath; |
|
193 | + $childQuery = $path.'/descendant::'.$childQueryXpath; |
|
194 | 194 | $childNodeList = $xpath->query($childQuery); |
195 | 195 | if ($childNodeList instanceof \DOMNodeList) { |
196 | 196 | foreach ($childNodeList as $node) { |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | * We re-run the test method each time because Dec 01 01:01:01 could match only the first 01. So we |
44 | 44 | * have to be a bit greedy here. |
45 | 45 | */ |
46 | - $fn = 'test' . ucfirst($term); |
|
46 | + $fn = 'test'.ucfirst($term); |
|
47 | 47 | if ($this->$fn($part) && $matchedParts[$term] === null) { |
48 | 48 | $matchedParts[$term] = $key; |
49 | 49 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | } |
68 | 68 | $foundDate = ''; |
69 | 69 | for ($i = (int)$min; $i <= (int)$max; $i++) { |
70 | - $foundDate .= ' ' . $parts[$i]; |
|
70 | + $foundDate .= ' '.$parts[$i]; |
|
71 | 71 | } |
72 | 72 | $parse = date_parse(trim($foundDate)); |
73 | 73 | if (isset($parse['error_count']) && $parse['error_count'] == 0) { |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | return true; |
114 | 114 | } |
115 | 115 | $parse = date_parse($part); |
116 | - if (!empty($parse) && $parse['day'] !== false && $parse['error_count'] == 0 ) { |
|
116 | + if (!empty($parse) && $parse['day'] !== false && $parse['error_count'] == 0) { |
|
117 | 117 | return true; |
118 | 118 | } else if (preg_match('/^\d{1,2}[\/\\-]\d{1,2}[\/\\-]\d{1,2}$/', $part)) { |
119 | 119 | return true; |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | return true; |
128 | 128 | } |
129 | 129 | $parse = date_parse($part); |
130 | - if (!empty($parse) && $parse['month'] !== false && $parse['error_count'] == 0 ) { |
|
130 | + if (!empty($parse) && $parse['month'] !== false && $parse['error_count'] == 0) { |
|
131 | 131 | return true; |
132 | 132 | } else if (preg_match('/^\d{1,2}[\/\\-]\d{1,2}[\/\\-]\d{1,2}$/', $part)) { |
133 | 133 | return true; |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | if (!empty($parse) && $parse['year'] !== false && $parse['error_count'] == 0) { |
142 | 142 | return true; |
143 | 143 | // DateTime parses 2015 as 20:15:00, so this is to account for the unique condition. |
144 | - } else if (strlen($part) ==4 ) { |
|
144 | + } else if (strlen($part) == 4) { |
|
145 | 145 | if ($parse['second'] === 0 && $parse['hour'] == substr($part, 0, 2) && $parse['minute'] == substr($part, 2, 2)) { |
146 | 146 | return true; |
147 | 147 | } |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | return false; |
163 | 163 | } |
164 | 164 | $parse = date_parse($part); |
165 | - if (!empty($parse) && $parse['hour'] !== false && $parse['error_count'] == 0 ) { |
|
165 | + if (!empty($parse) && $parse['hour'] !== false && $parse['error_count'] == 0) { |
|
166 | 166 | return true; |
167 | 167 | } |
168 | 168 | return false; |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | return false; |
180 | 180 | } |
181 | 181 | $parse = date_parse($part); |
182 | - if (!empty($parse) && $parse['minute'] !== false && $parse['error_count'] == 0 ) { |
|
182 | + if (!empty($parse) && $parse['minute'] !== false && $parse['error_count'] == 0) { |
|
183 | 183 | return true; |
184 | 184 | |
185 | 185 | } |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | return false; |
198 | 198 | } |
199 | 199 | $parse = date_parse($part); |
200 | - if (!empty($parse) && $parse['second'] !== false && $parse['error_count'] == 0 ) { |
|
200 | + if (!empty($parse) && $parse['second'] !== false && $parse['error_count'] == 0) { |
|
201 | 201 | return true; |
202 | 202 | } |
203 | 203 | return false; |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | $xpath = sprintf('//a[concat(" ",normalize-space(.)," ") = " %s "]|//*[concat(" ",normalize-space(.)," ") = " %s "]/ancestor::a', $part, $part); |
53 | 53 | $elements = $this->webDriver->findElements(WebDriverBy::xpath($xpath)); |
54 | 54 | $action = false; |
55 | - $this->testCase->assertNotCount(0, $elements, 'Did not find 1 or more elements with the Xpath: ' . $xpath); |
|
55 | + $this->testCase->assertNotCount(0, $elements, 'Did not find 1 or more elements with the Xpath: '.$xpath); |
|
56 | 56 | foreach ($elements as $element) { |
57 | 57 | // Sometimes responsive templates have multiple nav menus. So we iterate over the results to find a visible element. |
58 | 58 | if (!$element->isDisplayed()) { |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $action = true; |
67 | 67 | break; // If either of these options work we don't need to iterate over the remain elements |
68 | 68 | } |
69 | - $this->testCase->assertTrue($action, 'No action was taken. Elements not visible? Xpath: ' . $xpath); |
|
69 | + $this->testCase->assertTrue($action, 'No action was taken. Elements not visible? Xpath: '.$xpath); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | // We will have already clicked it previously |
@@ -28,12 +28,12 @@ |
||
28 | 28 | |
29 | 29 | foreach ($assets as $asset) { |
30 | 30 | if (strpos($asset['name'], $this->url) !== false) { |
31 | - $this->testCase->assertEquals(0, $asset['duration'], 'Asset was not cached: ' . $asset['name']); |
|
31 | + $this->testCase->assertEquals(0, $asset['duration'], 'Asset was not cached: '.$asset['name']); |
|
32 | 32 | $foundAsset = true; |
33 | 33 | } |
34 | 34 | } |
35 | 35 | |
36 | - $this->testCase->assertTrue($foundAsset, 'Unable to find asset: ' . $this->url); |
|
36 | + $this->testCase->assertTrue($foundAsset, 'Unable to find asset: '.$this->url); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | } |
40 | 40 | \ No newline at end of file |
@@ -13,7 +13,7 @@ |
||
13 | 13 | { |
14 | 14 | $log = $this->webDriver->manage()->getLog('browser'); |
15 | 15 | foreach ($log as $l) { |
16 | - $this->logger->err('Message found: ' . serialize($l)); |
|
16 | + $this->logger->err('Message found: '.serialize($l)); |
|
17 | 17 | } |
18 | 18 | $this->testCase->assertCount(0, $log); |
19 | 19 | } |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | public function setById($id, $value) |
31 | 31 | { |
32 | - $this->set('id:' . $id, $value); |
|
32 | + $this->set('id:'.$id, $value); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | public function set($name, $value) |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | } else { |
42 | 42 | $element = $this->webDriver->byXpath(sprintf('//label[.="%s"]', $name)); |
43 | 43 | if (!$element->getAttribute('for')) { |
44 | - throw new NotFoundException('Unable to find the "for" attribute for a label with the text: ' . $name); |
|
44 | + throw new NotFoundException('Unable to find the "for" attribute for a label with the text: '.$name); |
|
45 | 45 | } |
46 | 46 | $formElement = $this->webDriver->byId($element->getAttribute('for')); |
47 | 47 | } |
@@ -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 | } |