@@ -43,13 +43,13 @@ discard block |
||
43 | 43 | $file_path = $base_path.$this->multilingual_parameters['translations']; |
44 | 44 | $yaml = file_get_contents($file_path); |
45 | 45 | $yaml_parse_array_check = Yaml::parse($yaml); |
46 | - if(is_array($yaml_parse_array_check)) { |
|
46 | + if (is_array($yaml_parse_array_check)) { |
|
47 | 47 | $this->translations = $yaml_parse_array_check; |
48 | 48 | } |
49 | 49 | } |
50 | 50 | |
51 | 51 | public function initializeMultilanguage() { |
52 | - if(isset($this->multilingual_parameters['language'])&&isset($this->multilingual_parameters['translations'])) { |
|
52 | + if (isset($this->multilingual_parameters['language'])&&isset($this->multilingual_parameters['translations'])) { |
|
53 | 53 | $this->parseTranslationFile(); |
54 | 54 | } |
55 | 55 | } |
@@ -63,14 +63,14 @@ discard block |
||
63 | 63 | |
64 | 64 | public function localizeTarget($target) { |
65 | 65 | $translations = $this->multilingual_parameters['translations']; |
66 | - if(isset($this->translations[$target][$this->multilingual_parameters['language']])){ |
|
66 | + if (isset($this->translations[$target][$this->multilingual_parameters['language']])) { |
|
67 | 67 | $target = $this->translations[$target][$this->multilingual_parameters['language']]; |
68 | 68 | return $target; |
69 | 69 | } |
70 | 70 | elseif (isset($this->translations[$target])) { |
71 | 71 | return $target; |
72 | 72 | } |
73 | - else throw new \Exception ("The text '$target'' is not defined in '$translations' translation file."); |
|
73 | + else throw new \Exception("The text '$target'' is not defined in '$translations' translation file."); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | public function localizeField($field) { |
81 | 81 | $re = "/(?:[-])(en)(?:[-])/"; |
82 | 82 | $language = "-".$this->multilingual_parameters['language']."-"; |
83 | - $field = preg_replace($re, $language,$field); |
|
83 | + $field = preg_replace($re, $language, $field); |
|
84 | 84 | return $field; |
85 | 85 | } |
86 | 86 | |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | * |
170 | 170 | * @When /^I wait for localized text "([^"]*)" to appear with max time "([^"]+)"(?: seconds)?$/ |
171 | 171 | */ |
172 | - public function iWaitForLocalizedTextToAppearWithMaxTime($target, $maxExecutionTime){ |
|
172 | + public function iWaitForLocalizedTextToAppearWithMaxTime($target, $maxExecutionTime) { |
|
173 | 173 | $target = $this->localizeTarget($target); |
174 | 174 | $this->iWaitForTextToAppearWithMaxTime($target, $maxExecutionTime); |
175 | 175 | } |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | * @Given I click localized :link in the :rowText row |
194 | 194 | * @Then I (should )see the localized :link in the :rowText row |
195 | 195 | */ |
196 | - public function assertLocalizedClickInTableRow($link, $rowText){ |
|
196 | + public function assertLocalizedClickInTableRow($link, $rowText) { |
|
197 | 197 | $link = $this->localizeTarget($link); |
198 | 198 | $page = $this->getSession()->getPage(); |
199 | 199 | if ($link_element = $this->getTableRow($page, $rowText)->findLink($link)) { |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | * |
223 | 223 | * @When /^I click on the localized text "([^"]*)" in the "(?P<region>[^"]*)"(?:| region)$/ |
224 | 224 | */ |
225 | - public function iClickOnTheLocalizedTextInRegion($text, $region){ |
|
225 | + public function iClickOnTheLocalizedTextInRegion($text, $region) { |
|
226 | 226 | $text = $this->localizeTarget($text); |
227 | 227 | $this->iClickOnTheTextInRegion($text, $region); |
228 | 228 | } |