@@ -19,6 +19,9 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | protected $remainingRows; |
| 21 | 21 | |
| 22 | + /** |
|
| 23 | + * @return string |
|
| 24 | + */ |
|
| 22 | 25 | abstract function getBaseXpath(); |
| 23 | 26 | |
| 24 | 27 | public function extract() |
@@ -90,7 +93,7 @@ discard block |
||
| 90 | 93 | |
| 91 | 94 | |
| 92 | 95 | /** |
| 93 | - * @return mixed |
|
| 96 | + * @return string |
|
| 94 | 97 | */ |
| 95 | 98 | public function getName() |
| 96 | 99 | { |
@@ -98,7 +101,7 @@ discard block |
||
| 98 | 101 | } |
| 99 | 102 | |
| 100 | 103 | /** |
| 101 | - * @return mixed |
|
| 104 | + * @return string |
|
| 102 | 105 | */ |
| 103 | 106 | public function getBusiness() |
| 104 | 107 | { |
@@ -106,7 +109,7 @@ discard block |
||
| 106 | 109 | } |
| 107 | 110 | |
| 108 | 111 | /** |
| 109 | - * @return mixed |
|
| 112 | + * @return string |
|
| 110 | 113 | */ |
| 111 | 114 | public function getStreet1() |
| 112 | 115 | { |
@@ -114,7 +117,7 @@ discard block |
||
| 114 | 117 | } |
| 115 | 118 | |
| 116 | 119 | /** |
| 117 | - * @return mixed |
|
| 120 | + * @return string |
|
| 118 | 121 | */ |
| 119 | 122 | public function getStreet2() |
| 120 | 123 | { |
@@ -122,7 +125,7 @@ discard block |
||
| 122 | 125 | } |
| 123 | 126 | |
| 124 | 127 | /** |
| 125 | - * @return mixed |
|
| 128 | + * @return string |
|
| 126 | 129 | */ |
| 127 | 130 | public function getCity() |
| 128 | 131 | { |
@@ -130,7 +133,7 @@ discard block |
||
| 130 | 133 | } |
| 131 | 134 | |
| 132 | 135 | /** |
| 133 | - * @return mixed |
|
| 136 | + * @return string |
|
| 134 | 137 | */ |
| 135 | 138 | public function getRegion() |
| 136 | 139 | { |
@@ -138,7 +141,7 @@ discard block |
||
| 138 | 141 | } |
| 139 | 142 | |
| 140 | 143 | /** |
| 141 | - * @return mixed |
|
| 144 | + * @return string |
|
| 142 | 145 | */ |
| 143 | 146 | public function getPostCode() |
| 144 | 147 | { |
@@ -146,7 +149,7 @@ discard block |
||
| 146 | 149 | } |
| 147 | 150 | |
| 148 | 151 | /** |
| 149 | - * @return mixed |
|
| 152 | + * @return string |
|
| 150 | 153 | */ |
| 151 | 154 | public function getCountry() |
| 152 | 155 | { |
@@ -154,7 +157,7 @@ discard block |
||
| 154 | 157 | } |
| 155 | 158 | |
| 156 | 159 | /** |
| 157 | - * @return mixed |
|
| 160 | + * @return string |
|
| 158 | 161 | */ |
| 159 | 162 | public function getPhone() |
| 160 | 163 | { |
@@ -162,7 +165,7 @@ discard block |
||
| 162 | 165 | } |
| 163 | 166 | |
| 164 | 167 | /** |
| 165 | - * @return mixed |
|
| 168 | + * @return string |
|
| 166 | 169 | */ |
| 167 | 170 | public function getFax() |
| 168 | 171 | { |
@@ -31,10 +31,10 @@ discard block |
||
| 31 | 31 | $this->name = trim(array_pop($rows)); |
| 32 | 32 | while (count($rows) > 0) { |
| 33 | 33 | $row = array_shift($rows); |
| 34 | - if (strpos($row, 'T: ') ===0) { |
|
| 34 | + if (strpos($row, 'T: ') === 0) { |
|
| 35 | 35 | $this->phone = trim(substr($row, 3)); |
| 36 | 36 | continue; |
| 37 | - } else if (strpos($row, 'F: ') ===0) { |
|
| 37 | + } else if (strpos($row, 'F: ') === 0) { |
|
| 38 | 38 | $this->fax = trim(substr($row, 3)); |
| 39 | 39 | continue; |
| 40 | 40 | } |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $this->street1 = trim(array_shift($rows)); |
| 60 | 60 | $this->business = trim(array_shift($rows)); |
| 61 | 61 | //Easy |
| 62 | - }else if (count($rows) == 1) { |
|
| 62 | + } else if (count($rows) == 1) { |
|
| 63 | 63 | $this->street1 = trim(array_shift($rows)); |
| 64 | 64 | |
| 65 | 65 | // Not so easy |
@@ -70,8 +70,8 @@ discard block |
||
| 70 | 70 | $this->street1 = $stOrBus; |
| 71 | 71 | $this->business = trim(array_shift($rows)); |
| 72 | 72 | } else { |
| 73 | - $this->street1 =trim(array_shift($rows)); |
|
| 74 | - $this->street2 = $stOrBus; |
|
| 73 | + $this->street1 = trim(array_shift($rows)); |
|
| 74 | + $this->street2 = $stOrBus; |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | } |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | $this->street1 = trim(array_shift($rows)); |
| 60 | 60 | $this->business = trim(array_shift($rows)); |
| 61 | 61 | //Easy |
| 62 | - }else if (count($rows) == 1) { |
|
| 62 | + } else if (count($rows) == 1) { |
|
| 63 | 63 | $this->street1 = trim(array_shift($rows)); |
| 64 | 64 | |
| 65 | 65 | // Not so easy |
@@ -45,11 +45,17 @@ |
||
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | |
| 48 | + /** |
|
| 49 | + * @param string $name |
|
| 50 | + */ |
|
| 48 | 51 | public function setTestName($name) |
| 49 | 52 | { |
| 50 | 53 | $this->testName = $name; |
| 51 | 54 | } |
| 52 | 55 | |
| 56 | + /** |
|
| 57 | + * @param string $status |
|
| 58 | + */ |
|
| 53 | 59 | public function setTestStatus($status) |
| 54 | 60 | { |
| 55 | 61 | $this->status = $status; |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Exception; |
| 6 | 6 | use Magium\Assertions\AbstractAssertion; |
| 7 | -use Magium\Assertions\AbstractSelectorAssertion; |
|
| 8 | 7 | use Magium\Util\Phpunit\MasterListener; |
| 9 | 8 | use Magium\Util\Phpunit\MasterListenerAware; |
| 10 | 9 | use PHPUnit_Framework_AssertionFailedError; |
@@ -91,6 +91,9 @@ |
||
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | |
| 94 | + /** |
|
| 95 | + * @param string $textDomain |
|
| 96 | + */ |
|
| 94 | 97 | protected function translatePart($translate, $result, $textDomain, $locale) |
| 95 | 98 | { |
| 96 | 99 | $newResult = parent::translate($result, $textDomain, $locale); |
@@ -28,6 +28,10 @@ discard block |
||
| 28 | 28 | protected $logger; |
| 29 | 29 | |
| 30 | 30 | |
| 31 | + /** |
|
| 32 | + * @param string $by |
|
| 33 | + * @param string $selector |
|
| 34 | + */ |
|
| 31 | 35 | public function logFind($by, $selector) |
| 32 | 36 | { |
| 33 | 37 | if ($this->logger instanceof Logger) { |
@@ -94,6 +98,9 @@ discard block |
||
| 94 | 98 | return $element; |
| 95 | 99 | } |
| 96 | 100 | |
| 101 | + /** |
|
| 102 | + * @param string $selector |
|
| 103 | + */ |
|
| 97 | 104 | public function elementExists($selector, $by = 'byId') |
| 98 | 105 | { |
| 99 | 106 | try { |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use Facebook\WebDriver\Exception\WebDriverException; |
| 6 | 6 | use Facebook\WebDriver\Remote\HttpCommandExecutor; |
| 7 | -use Facebook\WebDriver\Remote\RemoteExecuteMethod; |
|
| 8 | 7 | use Facebook\WebDriver\Remote\RemoteWebDriver; |
| 9 | 8 | use Facebook\WebDriver\WebDriverBy; |
| 10 | 9 | use Facebook\WebDriver\WebDriverElement; |
@@ -24,6 +24,9 @@ |
||
| 24 | 24 | $this->by = $by; |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | + /** |
|
| 28 | + * @param string $name |
|
| 29 | + */ |
|
| 27 | 30 | public function __call($name, $arguments) |
| 28 | 31 | { |
| 29 | 32 | if (strpos($name, '::') > 0) { |
@@ -1,3 +1,3 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -$this->baseUrl = 'http://magento19.loc//'; |
|
| 4 | 3 | \ No newline at end of file |
| 4 | +$this->baseUrl = 'http://magento19.loc//'; |
|
| 5 | 5 | \ No newline at end of file |
@@ -2,4 +2,4 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Magium\Extractors\Navigation; |
| 4 | 4 | |
| 5 | -class UnableToExtractMenuXpathException extends \Exception{} |
|
| 6 | 5 | \ No newline at end of file |
| 6 | +class UnableToExtractMenuXpathException extends \Exception {} |
|
| 7 | 7 | \ No newline at end of file |
@@ -2,4 +2,4 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Magium\Extractors\Navigation; |
| 4 | 4 | |
| 5 | -class MissingNavigationSchemeException extends \Exception{} |
|
| 6 | 5 | \ No newline at end of file |
| 6 | +class MissingNavigationSchemeException extends \Exception {} |
|
| 7 | 7 | \ No newline at end of file |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | return true; |
| 114 | 114 | } |
| 115 | 115 | $parse = date_parse($part); |
| 116 | - if ($parse && $parse['day'] !== false && $parse['error_count'] == 0 ) { |
|
| 116 | + if ($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 ($parse && $parse['month'] !== false && $parse['error_count'] == 0 ) { |
|
| 130 | + if ($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 ($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 ($parse && $parse['hour'] !== false && $parse['error_count'] == 0 ) { |
|
| 165 | + if ($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 ($parse && $parse['minute'] !== false && $parse['error_count'] == 0 ) { |
|
| 182 | + if ($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 ($parse && $parse['second'] !== false && $parse['error_count'] == 0 ) { |
|
| 200 | + if ($parse && $parse['second'] !== false && $parse['error_count'] == 0) { |
|
| 201 | 201 | return true; |
| 202 | 202 | } |
| 203 | 203 | return false; |
@@ -53,7 +53,9 @@ |
||
| 53 | 53 | $max = false; |
| 54 | 54 | $min = PHP_INT_MAX; |
| 55 | 55 | foreach ($matchedParts as $part) { |
| 56 | - if ($part === null) continue; |
|
| 56 | + if ($part === null) { |
|
| 57 | + continue; |
|
| 58 | + } |
|
| 57 | 59 | if ($part >= $max) { |
| 58 | 60 | $max = $part; |
| 59 | 61 | } |