@@ -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); |
@@ -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 | } |
@@ -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 |
@@ -96,6 +96,9 @@ discard block |
||
96 | 96 | return $classes; |
97 | 97 | } |
98 | 98 | |
99 | + /** |
|
100 | + * @param string $class |
|
101 | + */ |
|
99 | 102 | protected function processClass($class) |
100 | 103 | { |
101 | 104 | try { |
@@ -137,6 +140,9 @@ discard block |
||
137 | 140 | return null; |
138 | 141 | } |
139 | 142 | |
143 | + /** |
|
144 | + * @param string $file |
|
145 | + */ |
|
140 | 146 | protected function getClassNameInFile($file) |
141 | 147 | { |
142 | 148 | $namespace = $class = ''; |
@@ -141,7 +141,9 @@ |
||
141 | 141 | { |
142 | 142 | $namespace = $class = ''; |
143 | 143 | $content = file_get_contents($file); |
144 | - if (!$content) return null; |
|
144 | + if (!$content) { |
|
145 | + return null; |
|
146 | + } |
|
145 | 147 | $tokens = token_get_all($content); |
146 | 148 | $count = count($tokens); |
147 | 149 | for ($i = 2; $i < $count; $i++) { |
@@ -49,10 +49,14 @@ |
||
49 | 49 | |
50 | 50 | if ($operator === null) { |
51 | 51 | $isTrue = in_array($comparison1, $this->reservedTrue); |
52 | - if ($isTrue) return true; |
|
52 | + if ($isTrue) { |
|
53 | + return true; |
|
54 | + } |
|
53 | 55 | |
54 | 56 | $isFalse = in_array($comparison1, $this->reservedFalse); |
55 | - if ($isFalse) return false; |
|
57 | + if ($isFalse) { |
|
58 | + return false; |
|
59 | + } |
|
56 | 60 | |
57 | 61 | return (boolean)$comparison1; |
58 | 62 | } else { |
@@ -60,6 +60,10 @@ discard block |
||
60 | 60 | } |
61 | 61 | |
62 | 62 | |
63 | + /** |
|
64 | + * @param string $by |
|
65 | + * @param string $selector |
|
66 | + */ |
|
63 | 67 | public function logFind($by, $selector) |
64 | 68 | { |
65 | 69 | if ($this->logger instanceof Logger) { |
@@ -136,6 +140,9 @@ discard block |
||
136 | 140 | return $element; |
137 | 141 | } |
138 | 142 | |
143 | + /** |
|
144 | + * @param string $selector |
|
145 | + */ |
|
139 | 146 | public function elementExists($selector, $by = 'byId') |
140 | 147 | { |
141 | 148 | try { |
@@ -71,7 +71,9 @@ |
||
71 | 71 | } |
72 | 72 | } |
73 | 73 | |
74 | - if (!is_dir($configurationDir)) return; |
|
74 | + if (!is_dir($configurationDir)) { |
|
75 | + return; |
|
76 | + } |
|
75 | 77 | |
76 | 78 | $classes = $this->introspectClass($config); |
77 | 79 |
@@ -175,6 +175,9 @@ discard block |
||
175 | 175 | } |
176 | 176 | } |
177 | 177 | |
178 | + /** |
|
179 | + * @param null|string $selector |
|
180 | + */ |
|
178 | 181 | public function assertElementClickable($selector, $by = WebDriver::BY_ID) |
179 | 182 | { |
180 | 183 | $this->elementAssertion($selector, $by, Clickable::ASSERTION); |
@@ -187,6 +190,9 @@ discard block |
||
187 | 190 | |
188 | 191 | } |
189 | 192 | |
193 | + /** |
|
194 | + * @param string $namespace |
|
195 | + */ |
|
190 | 196 | public static function addBaseNamespace($namespace) |
191 | 197 | { |
192 | 198 | if (!in_array($namespace, self::$baseNamespaces)) { |
@@ -194,6 +200,9 @@ discard block |
||
194 | 200 | } |
195 | 201 | } |
196 | 202 | |
203 | + /** |
|
204 | + * @param string $prefix |
|
205 | + */ |
|
197 | 206 | public static function resolveClass( $class, $prefix = null) |
198 | 207 | { |
199 | 208 | $origClass = $class; |
@@ -235,6 +244,9 @@ discard block |
||
235 | 244 | |
236 | 245 | } |
237 | 246 | |
247 | + /** |
|
248 | + * @return string |
|
249 | + */ |
|
238 | 250 | protected function normalizeClassRequest($class) |
239 | 251 | { |
240 | 252 | return str_replace('/', '\\', $class); |
@@ -521,7 +533,7 @@ discard block |
||
521 | 533 | } |
522 | 534 | |
523 | 535 | /** |
524 | - * @param $xpath |
|
536 | + * @param string $xpath |
|
525 | 537 | * @return \Facebook\WebDriver\Remote\RemoteWebElement |
526 | 538 | */ |
527 | 539 | |
@@ -550,6 +562,12 @@ discard block |
||
550 | 562 | return $this->webdriver->byCssSelector($selector); |
551 | 563 | } |
552 | 564 | |
565 | + /** |
|
566 | + * @param string $xpathTemplate |
|
567 | + * @param string $text |
|
568 | + * @param string $specificNodeType |
|
569 | + * @param string $parentElementSelector |
|
570 | + */ |
|
553 | 571 | protected function getElementByTextXpath($xpathTemplate, $text, $specificNodeType = null, $parentElementSelector = null) |
554 | 572 | { |
555 | 573 |