@@ -17,7 +17,7 @@ |
||
17 | 17 | AbstractThemeConfiguration $themeConfiguration |
18 | 18 | ) |
19 | 19 | { |
20 | - $this->themeConfiguration = $themeConfiguration; |
|
20 | + $this->themeConfiguration = $themeConfiguration; |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | public function assert() |
@@ -15,7 +15,7 @@ |
||
15 | 15 | AbstractThemeConfiguration $themeConfiguration |
16 | 16 | ) |
17 | 17 | { |
18 | - $this->themeConfiguration = $themeConfiguration; |
|
18 | + $this->themeConfiguration = $themeConfiguration; |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | public function assert() |
@@ -48,9 +48,9 @@ |
||
48 | 48 | $test->setCategoryPath($input->getArgument('category')); |
49 | 49 | $test->run(); |
50 | 50 | $products = $test->getProductNames(); |
51 | - $output->writeln('Found ' . count($products) . ' products in ' . $input->getArgument('category')); |
|
51 | + $output->writeln('Found '.count($products).' products in '.$input->getArgument('category')); |
|
52 | 52 | foreach ($products as $product) { |
53 | - $output->writeln("\t" . trim($product)); |
|
53 | + $output->writeln("\t".trim($product)); |
|
54 | 54 | } |
55 | 55 | } |
56 | 56 |
@@ -12,11 +12,11 @@ |
||
12 | 12 | $origClass = $class; |
13 | 13 | |
14 | 14 | if (!class_exists($class)) { |
15 | - $class = $origClass . '\ThemeConfiguration'; |
|
15 | + $class = $origClass.'\ThemeConfiguration'; |
|
16 | 16 | if (!class_exists($class)) { |
17 | - $class = 'Magium\Magento\Themes\\' . $origClass . '\ThemeConfiguration'; |
|
17 | + $class = 'Magium\Magento\Themes\\'.$origClass.'\ThemeConfiguration'; |
|
18 | 18 | if (!class_exists($class)) { |
19 | - throw new NotFoundException('Could not resolve the theme class for: ' . $origClass); |
|
19 | + throw new NotFoundException('Could not resolve the theme class for: '.$origClass); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | } |
@@ -32,7 +32,7 @@ |
||
32 | 32 | public function extract() |
33 | 33 | { |
34 | 34 | if (!$this->webDriver->elementExists($this->theme->getAddToCartXpath(), 'byXpath')) { |
35 | - throw new NoSuchElementException('Could not find the simple add to cart element with the Xpath: ' . $this->theme->getAddToCartXpath()); |
|
35 | + throw new NoSuchElementException('Could not find the simple add to cart element with the Xpath: '.$this->theme->getAddToCartXpath()); |
|
36 | 36 | }; |
37 | 37 | |
38 | 38 | $elements = $this->webDriver->findElements(WebDriverBy::xpath($this->theme->getAddToCartXpath())); |
@@ -17,7 +17,7 @@ |
||
17 | 17 | /** |
18 | 18 | * @var AbstractThemeConfiguration |
19 | 19 | */ |
20 | - protected $theme; // Here for code completion assistance |
|
20 | + protected $theme; // Here for code completion assistance |
|
21 | 21 | |
22 | 22 | public function __construct(WebDriver $webDriver, AbstractTestCase $testCase, AbstractThemeConfiguration $theme) |
23 | 23 | { |
@@ -55,11 +55,11 @@ discard block |
||
55 | 55 | { |
56 | 56 | $returnType = $type; |
57 | 57 | if (strpos($type, '\\') === false) { |
58 | - $returnType = $this->baseNamespace . '\\' . $type; |
|
58 | + $returnType = $this->baseNamespace.'\\'.$type; |
|
59 | 59 | if (!class_exists($returnType)) { |
60 | 60 | $returnType = $type; |
61 | 61 | if (!class_exists($returnType)) { |
62 | - throw new InvalidFilterException('Filter type must exist: ' . $returnType); |
|
62 | + throw new InvalidFilterException('Filter type must exist: '.$returnType); |
|
63 | 63 | } |
64 | 64 | } |
65 | 65 | } |
@@ -69,12 +69,12 @@ discard block |
||
69 | 69 | |
70 | 70 | protected function validateFilterType($returnType) |
71 | 71 | { |
72 | - if ($returnType == $this->baseNamespace . '\AbstractFilterType') { |
|
72 | + if ($returnType == $this->baseNamespace.'\AbstractFilterType') { |
|
73 | 73 | return true; |
74 | 74 | } |
75 | 75 | $reflection = new \ReflectionClass($returnType); |
76 | - if (!$reflection->isSubclassOf($this->baseNamespace . '\AbstractFilterType')) { |
|
77 | - throw new InvalidFilterException('Filter type must extend AbstractFilterType: ' . $returnType); |
|
76 | + if (!$reflection->isSubclassOf($this->baseNamespace.'\AbstractFilterType')) { |
|
77 | + throw new InvalidFilterException('Filter type must extend AbstractFilterType: '.$returnType); |
|
78 | 78 | } |
79 | 79 | return true; |
80 | 80 | } |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | return $this->filterValues[$filterKey]; |
132 | 132 | } |
133 | 133 | |
134 | - throw new MissingFilterException('Could not find the filter: ' . $filter); |
|
134 | + throw new MissingFilterException('Could not find the filter: '.$filter); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | public function extract() |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | break; |
168 | 168 | } |
169 | 169 | } else { |
170 | - throw new InvalidFilterException('Filter type does not extend AbstractFilterType: ' . $type); |
|
170 | + throw new InvalidFilterException('Filter type does not extend AbstractFilterType: '.$type); |
|
171 | 171 | } |
172 | 172 | } |
173 | 173 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | return $value; |
52 | 52 | } |
53 | 53 | } |
54 | - throw new MissingValueException('Could not find the value for option: ' . $text); |
|
54 | + throw new MissingValueException('Could not find the value for option: '.$text); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | throw new UnparseableValueException('Unable to determine the link'); |
110 | 110 | } |
111 | 111 | |
112 | - $linkElementXpath = $this->theme->getLayeredNavigationFilterLinkXpath($this->title) . sprintf('[@href="%s"]', $linkUrl); |
|
112 | + $linkElementXpath = $this->theme->getLayeredNavigationFilterLinkXpath($this->title).sprintf('[@href="%s"]', $linkUrl); |
|
113 | 113 | $linkElement = $this->webDriver->byXpath($linkElementXpath); |
114 | 114 | |
115 | 115 | $value = new FilterValue($linkElement, $text, $linkUrl, $count); |
@@ -44,8 +44,8 @@ |
||
44 | 44 | /* @var $elements \DOMElement[] */ |
45 | 45 | $returnElements = []; |
46 | 46 | foreach ($elements as $element) { |
47 | - $elementDocument = new \DOMDocument(); |
|
48 | - $html =$element->C14N(); |
|
47 | + $elementDocument = new \DOMDocument(); |
|
48 | + $html = $element->C14N(); |
|
49 | 49 | $elementDocument->loadXML($html); |
50 | 50 | $elementXpath = new \DOMXPath($elementDocument); |
51 | 51 | $titleElements = $elementXpath->query(sprintf('//*[@%s]', $this->theme->getLayeredNavigationSwatchTitleAttribute())); |