@@ -18,7 +18,7 @@ |
||
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | - * @param $method |
|
| 21 | + * @param string $method |
|
| 22 | 22 | * @return \Magium\Magento\Actions\Checkout\PaymentMethods\PaymentMethodInterface |
| 23 | 23 | */ |
| 24 | 24 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | // If we are passed just the class name we will prepend it with Magium\Magento\Actions\Checkout\PaymentMethods |
| 29 | 29 | if (strpos($method, '\\') === false) { |
| 30 | - $method = 'Magium\Magento\Actions\Checkout\PaymentMethods\\' . $method; |
|
| 30 | + $method = 'Magium\Magento\Actions\Checkout\PaymentMethods\\'.$method; |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | if (is_subclass_of($method, 'Magium\Magento\Actions\Checkout\PaymentMethods\PaymentMethodInterface')) { |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | |
| 70 | 70 | // If we are passed just the class name we will prepend it with Magium\Magento\Actions\Checkout\PaymentMethods |
| 71 | 71 | if (strpos($method, '\\') === false) { |
| 72 | - $method = 'Magium\Magento\Actions\Checkout\ShippingMethods\\' . $method; |
|
| 72 | + $method = 'Magium\Magento\Actions\Checkout\ShippingMethods\\'.$method; |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | if (is_subclass_of($method, 'Magium\Magento\Actions\Checkout\ShippingMethods\ShippingMethodInterface')) { |
@@ -86,12 +86,12 @@ discard block |
||
| 86 | 86 | if ($reflection->isSubclassOf('Magium\Magento\Themes\NavigableThemeInterface')) { |
| 87 | 87 | // Not entirely sure of hardcoding the various interface types. May make this configurable |
| 88 | 88 | parent::switchThemeConfiguration($fullyQualifiedClassName); |
| 89 | - $this->setTypePreference('Magium\Magento\Themes\AbstractThemeConfiguration',$fullyQualifiedClassName); |
|
| 90 | - $this->setTypePreference('Magium\Magento\Themes\NavigableThemeInterface',$fullyQualifiedClassName); |
|
| 91 | - $this->setTypePreference('Magium\Themes\BaseThemeInterface',$fullyQualifiedClassName); |
|
| 89 | + $this->setTypePreference('Magium\Magento\Themes\AbstractThemeConfiguration', $fullyQualifiedClassName); |
|
| 90 | + $this->setTypePreference('Magium\Magento\Themes\NavigableThemeInterface', $fullyQualifiedClassName); |
|
| 91 | + $this->setTypePreference('Magium\Themes\BaseThemeInterface', $fullyQualifiedClassName); |
|
| 92 | 92 | |
| 93 | - $this->setTypePreference('Magium\Magento\Themes\Customer\AbstractThemeConfiguration',$this->getTheme()->getCustomerThemeClass()); |
|
| 94 | - $this->setTypePreference('Magium\Magento\Themes\OnePageCheckout\AbstractThemeConfiguration',$this->getTheme()->getCheckoutThemeClass()); |
|
| 93 | + $this->setTypePreference('Magium\Magento\Themes\Customer\AbstractThemeConfiguration', $this->getTheme()->getCustomerThemeClass()); |
|
| 94 | + $this->setTypePreference('Magium\Magento\Themes\OnePageCheckout\AbstractThemeConfiguration', $this->getTheme()->getCheckoutThemeClass()); |
|
| 95 | 95 | |
| 96 | 96 | |
| 97 | 97 | } else { |
@@ -23,7 +23,6 @@ |
||
| 23 | 23 | ]; |
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | - * @param string $active |
|
| 27 | 26 | */ |
| 28 | 27 | public function setEnabled($enabled) |
| 29 | 28 | { |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | const NAME = 'Cash On Delivery Payment'; |
| 9 | 9 | const ACTION = 'Admin\Configuration\PaymentMethods\CashOnDelivery'; |
| 10 | 10 | |
| 11 | - protected $section = 'Payment Methods/' . self::NAME; |
|
| 11 | + protected $section = 'Payment Methods/'.self::NAME; |
|
| 12 | 12 | |
| 13 | 13 | protected $settings = [ |
| 14 | 14 | 'payment_cashondelivery_active' => 0, |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | * * Tab/Section::name=Text Of Setting (will ensure that the correct section is navigated to, uses setting name (exact), not ID) |
| 58 | 58 | * * name=Text Of Setting (will not navigate, uses setting name (exact) not ID) |
| 59 | 59 | * |
| 60 | - * @param $identifier |
|
| 60 | + * @param string $identifier |
|
| 61 | 61 | * @param $value |
| 62 | 62 | * @throws \Magium\InvalidInstructionException |
| 63 | 63 | */ |
@@ -77,7 +77,7 @@ |
||
| 77 | 77 | $xpath = ''; |
| 78 | 78 | if (count($xpath) === 2) { |
| 79 | 79 | $nav = explode('/', $parts[0]); |
| 80 | - $xpath = $this->themeConfiguration->getSystemConfigSectionDisplayCheckXpath($nav[1]) . '/descendant::'; |
|
| 80 | + $xpath = $this->themeConfiguration->getSystemConfigSectionDisplayCheckXpath($nav[1]).'/descendant::'; |
|
| 81 | 81 | } |
| 82 | 82 | $xpath .= $this->themeConfiguration->getSystemConfigSettingLabelXpath($matches[1]); |
| 83 | 83 | $labelElement = $this->webDriver->byXpath($xpath); |
@@ -96,7 +96,6 @@ |
||
| 96 | 96 | /** |
| 97 | 97 | * Adds as configurable product to the cart from the product page. |
| 98 | 98 | * |
| 99 | - * @param array $options |
|
| 100 | 99 | */ |
| 101 | 100 | |
| 102 | 101 | public function addConfigurableItemToCartFromProductPage($categoryNavigationPath = null) |
@@ -43,6 +43,9 @@ |
||
| 43 | 43 | return $this->messages; |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | + /** |
|
| 47 | + * @param string $message |
|
| 48 | + */ |
|
| 46 | 49 | public function addMessage($message) |
| 47 | 50 | { |
| 48 | 51 | $this->messages[] = $message; |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * @param $nodePath |
| 30 | - * @return WebDriverElement |
|
| 30 | + * @return null|\Facebook\WebDriver\Remote\RemoteWebElement |
|
| 31 | 31 | */ |
| 32 | 32 | |
| 33 | 33 | public function getNode($nodePath) |
@@ -58,8 +58,8 @@ discard block |
||
| 58 | 58 | $previousExpandXpath = ''; |
| 59 | 59 | $element = null; |
| 60 | 60 | foreach ($parts as $part) { |
| 61 | - $xpath .= '/' . $this->theme->getXTreeChildXpath($part); |
|
| 62 | - if(!$this->webDriver->elementExists($xpath, WebDriver::BY_XPATH)) { |
|
| 61 | + $xpath .= '/'.$this->theme->getXTreeChildXpath($part); |
|
| 62 | + if (!$this->webDriver->elementExists($xpath, WebDriver::BY_XPATH)) { |
|
| 63 | 63 | if ($previousExpandXpath) { |
| 64 | 64 | $this->testCase->assertElementExists($previousExpandXpath, WebDriver::BY_XPATH); |
| 65 | 65 | $this->webDriver->byXpath($previousExpandXpath)->click(); |
@@ -70,9 +70,9 @@ discard block |
||
| 70 | 70 | $this->testCase->assertElementExists($xpath, WebDriver::BY_XPATH); |
| 71 | 71 | $element = $this->webDriver->byXpath($xpath); |
| 72 | 72 | if (!$element->isDisplayed()) { |
| 73 | - throw new ElementNotVisibleException('Node element is not visible and cannot be made visible: ' . $part); |
|
| 73 | + throw new ElementNotVisibleException('Node element is not visible and cannot be made visible: '.$part); |
|
| 74 | 74 | } |
| 75 | - $previousExpandXpath = $xpath . $this->theme->getXTreeChildNodeExpandPrefixXpath(); |
|
| 75 | + $previousExpandXpath = $xpath.$this->theme->getXTreeChildNodeExpandPrefixXpath(); |
|
| 76 | 76 | $xpath .= $this->theme->getXTreeChildNodePrefixXpath(); |
| 77 | 77 | } |
| 78 | 78 | $this->node = $element; |
@@ -80,6 +80,9 @@ |
||
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | |
| 83 | + /** |
|
| 84 | + * @param string $type |
|
| 85 | + */ |
|
| 83 | 86 | public function addFilterType($type) |
| 84 | 87 | { |
| 85 | 88 | $type = $this->filterTypeName($type); |
@@ -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 | } |
@@ -25,6 +25,10 @@ |
||
| 25 | 25 | return $this->products; |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | + /** |
|
| 29 | + * @param integer $count |
|
| 30 | + * @param string $attribute |
|
| 31 | + */ |
|
| 28 | 32 | protected function getByXpath($type, $count, $attribute = null, $getElement = false) |
| 29 | 33 | { |
| 30 | 34 | $xpath = $this->getElementXpath($type, $count); |
@@ -192,7 +192,7 @@ |
||
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | /** |
| 195 | - * @param string $billingFastName |
|
| 195 | + * @param string $billingLastName |
|
| 196 | 196 | */ |
| 197 | 197 | public function setBillingLastName($billingLastName) |
| 198 | 198 | { |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | { |
| 13 | 13 | const IDENTITY = 'Customer'; |
| 14 | 14 | |
| 15 | - public $emailAddress = '[email protected]'; |
|
| 15 | + public $emailAddress = '[email protected]'; |
|
| 16 | 16 | |
| 17 | 17 | public $billingFirstName = 'Kevin'; |
| 18 | 18 | public $billingLastName = 'Schroeder'; |