@@ -13,7 +13,7 @@ |
||
13 | 13 | $autoload = realpath($root.'/../vendor/autoload.php'); |
14 | 14 | |
15 | 15 | // we need the autoloader to be present |
16 | - if(!file_exists($autoload)) { |
|
16 | + if (!file_exists($autoload)) { |
|
17 | 17 | die('<b>ERROR:</b> Autoloader not present. Run composer update first.'); |
18 | 18 | } |
19 | 19 |
@@ -16,9 +16,9 @@ |
||
16 | 16 | die('<b>ERROR:</b> Autoloader not present. Run composer update first.'); |
17 | 17 | } |
18 | 18 | |
19 | - /** |
|
20 | - * The composer autoloader |
|
21 | - */ |
|
19 | + /** |
|
20 | + * The composer autoloader |
|
21 | + */ |
|
22 | 22 | require_once $autoload; |
23 | 23 | |
24 | 24 | // the folder in which the localization .ini files are stored |
@@ -13,7 +13,7 @@ |
||
13 | 13 | $autoload = realpath($root.'/../vendor/autoload.php'); |
14 | 14 | |
15 | 15 | // we need the autoloader to be present |
16 | - if(!file_exists($autoload)) { |
|
16 | + if (!file_exists($autoload)) { |
|
17 | 17 | die('<b>ERROR:</b> Autoloader not present. Run composer update first.'); |
18 | 18 | } |
19 | 19 |
@@ -3,7 +3,7 @@ |
||
3 | 3 | $text = t('This text is in the global scope.'); |
4 | 4 | |
5 | 5 | $text2 = t( |
6 | - 'It is possible to write long texts ' . |
|
7 | - 'using text concatenation in the source ' . |
|
6 | + 'It is possible to write long texts '. |
|
7 | + 'using text concatenation in the source '. |
|
8 | 8 | 'code to keep it readable.' |
9 | 9 | ); |
10 | 10 | \ No newline at end of file |
@@ -49,8 +49,8 @@ |
||
49 | 49 | $examples[] = '1.500'; |
50 | 50 | |
51 | 51 | if ($decimalPositions > 0) { |
52 | - $examples[] = '50,' . substr($decimals, 0, $decimalPositions); |
|
53 | - $examples[] = '1.500,' . substr($decimals, 0, $decimalPositions); |
|
52 | + $examples[] = '50,'.substr($decimals, 0, $decimalPositions); |
|
53 | + $examples[] = '1.500,'.substr($decimals, 0, $decimalPositions); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | return $examples; |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | public function excludeFolder(string $folder) : Localization_Source_Folder |
51 | 51 | { |
52 | - if(!in_array($folder, $this->excludes['folders'])) { |
|
52 | + if (!in_array($folder, $this->excludes['folders'])) { |
|
53 | 53 | $this->excludes['folders'][] = $folder; |
54 | 54 | } |
55 | 55 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | |
59 | 59 | public function excludeFolders(array $folders) : Localization_Source_Folder |
60 | 60 | { |
61 | - foreach($folders as $folder) { |
|
61 | + foreach ($folders as $folder) { |
|
62 | 62 | $this->excludeFolder($folder); |
63 | 63 | } |
64 | 64 |
@@ -9,24 +9,24 @@ |
||
9 | 9 | |
10 | 10 | class Localization_Source_Folder extends Localization_Source |
11 | 11 | { |
12 | - /** |
|
13 | - * The folder under which all translatable files are kept. |
|
14 | - * @var string |
|
15 | - */ |
|
12 | + /** |
|
13 | + * The folder under which all translatable files are kept. |
|
14 | + * @var string |
|
15 | + */ |
|
16 | 16 | protected $sourcesFolder; |
17 | 17 | |
18 | - /** |
|
19 | - * @var string |
|
20 | - */ |
|
18 | + /** |
|
19 | + * @var string |
|
20 | + */ |
|
21 | 21 | protected $id; |
22 | 22 | |
23 | - /** |
|
24 | - * @param string $alias An alias for this source, to recognize it by. |
|
25 | - * @param string $label The human-readable label, used in the editor. |
|
26 | - * @param string $group A human-readable group label to group several sources by. Used in the editor. |
|
27 | - * @param string $storageFolder The folder in which to store the localization files. |
|
28 | - * @param string $sourcesFolder The folder in which to analyze files to find translatable strings. |
|
29 | - */ |
|
23 | + /** |
|
24 | + * @param string $alias An alias for this source, to recognize it by. |
|
25 | + * @param string $label The human-readable label, used in the editor. |
|
26 | + * @param string $group A human-readable group label to group several sources by. Used in the editor. |
|
27 | + * @param string $storageFolder The folder in which to store the localization files. |
|
28 | + * @param string $sourcesFolder The folder in which to analyze files to find translatable strings. |
|
29 | + */ |
|
30 | 30 | public function __construct(string $alias, string $label, string $group, string $storageFolder, string $sourcesFolder) |
31 | 31 | { |
32 | 32 | parent::__construct($alias, $label, $group, $storageFolder); |
@@ -20,9 +20,9 @@ discard block |
||
20 | 20 | */ |
21 | 21 | abstract class Localization_Event |
22 | 22 | { |
23 | - /** |
|
24 | - * @var array |
|
25 | - */ |
|
23 | + /** |
|
24 | + * @var array |
|
25 | + */ |
|
26 | 26 | protected $args; |
27 | 27 | |
28 | 28 | public function __construct(array $args) |
@@ -30,13 +30,13 @@ discard block |
||
30 | 30 | $this->args = $args; |
31 | 31 | } |
32 | 32 | |
33 | - /** |
|
34 | - * Fetches the argument at the specified index in the |
|
35 | - * event's arguments list, if it exists. |
|
36 | - * |
|
37 | - * @param int $index Zero-based index number. |
|
38 | - * @return mixed|NULL |
|
39 | - */ |
|
33 | + /** |
|
34 | + * Fetches the argument at the specified index in the |
|
35 | + * event's arguments list, if it exists. |
|
36 | + * |
|
37 | + * @param int $index Zero-based index number. |
|
38 | + * @return mixed|NULL |
|
39 | + */ |
|
40 | 40 | public function getArgument(int $index) |
41 | 41 | { |
42 | 42 | if(isset($this->args[$index])) { |
@@ -39,7 +39,7 @@ |
||
39 | 39 | */ |
40 | 40 | public function getArgument(int $index) |
41 | 41 | { |
42 | - if(isset($this->args[$index])) { |
|
42 | + if (isset($this->args[$index])) { |
|
43 | 43 | return $this->args[$index]; |
44 | 44 | } |
45 | 45 |
@@ -33,14 +33,14 @@ discard block |
||
33 | 33 | */ |
34 | 34 | protected $country; |
35 | 35 | |
36 | - /** |
|
37 | - * @var string |
|
38 | - */ |
|
36 | + /** |
|
37 | + * @var string |
|
38 | + */ |
|
39 | 39 | protected $countryCode; |
40 | 40 | |
41 | - /** |
|
42 | - * @var string |
|
43 | - */ |
|
41 | + /** |
|
42 | + * @var string |
|
43 | + */ |
|
44 | 44 | protected $languageCode; |
45 | 45 | |
46 | 46 | /** |
@@ -69,11 +69,11 @@ discard block |
||
69 | 69 | $this->languageCode = $tokens[0]; |
70 | 70 | } |
71 | 71 | |
72 | - /** |
|
73 | - * Retrieves the two-letter language code of the locale. |
|
74 | - * |
|
75 | - * @return string Language code, e.g. "en", "de" |
|
76 | - */ |
|
72 | + /** |
|
73 | + * Retrieves the two-letter language code of the locale. |
|
74 | + * |
|
75 | + * @return string Language code, e.g. "en", "de" |
|
76 | + */ |
|
77 | 77 | public function getLanguageCode() : string |
78 | 78 | { |
79 | 79 | return $this->languageCode; |
@@ -100,25 +100,25 @@ discard block |
||
100 | 100 | return $this->localeName; |
101 | 101 | } |
102 | 102 | |
103 | - /** |
|
104 | - * Retrieves the shortened version of the locale name, |
|
105 | - * e.g. "en" or "de". |
|
106 | - * |
|
107 | - * @return string |
|
108 | - * @deprecated |
|
109 | - * @see Localization_Locale::getLanguageCode() |
|
110 | - */ |
|
103 | + /** |
|
104 | + * Retrieves the shortened version of the locale name, |
|
105 | + * e.g. "en" or "de". |
|
106 | + * |
|
107 | + * @return string |
|
108 | + * @deprecated |
|
109 | + * @see Localization_Locale::getLanguageCode() |
|
110 | + */ |
|
111 | 111 | public function getShortName() : string |
112 | 112 | { |
113 | 113 | return $this->getLanguageCode(); |
114 | 114 | } |
115 | 115 | |
116 | - /** |
|
117 | - * Retrieves the two-letter country code of |
|
118 | - * the locale. |
|
119 | - * |
|
120 | - * @return string Lowercase code, e.g. "uk" |
|
121 | - */ |
|
116 | + /** |
|
117 | + * Retrieves the two-letter country code of |
|
118 | + * the locale. |
|
119 | + * |
|
120 | + * @return string Lowercase code, e.g. "uk" |
|
121 | + */ |
|
122 | 122 | public function getCountryCode() : string |
123 | 123 | { |
124 | 124 | return $this->countryCode; |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function __construct(string $localeName) |
51 | 51 | { |
52 | - if(!self::isLocaleKnown($localeName)) |
|
52 | + if (!self::isLocaleKnown($localeName)) |
|
53 | 53 | { |
54 | 54 | throw new Localization_Exception( |
55 | 55 | 'Invalid locale', |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | */ |
145 | 145 | public function getLabel() : string |
146 | 146 | { |
147 | - switch($this->localeName) |
|
147 | + switch ($this->localeName) |
|
148 | 148 | { |
149 | 149 | case 'de_DE': |
150 | 150 | return t('German'); |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | } |
170 | 170 | |
171 | 171 | throw new Localization_Exception( |
172 | - 'Label is missing for the locale ' . $this->localeName, |
|
172 | + 'Label is missing for the locale '.$this->localeName, |
|
173 | 173 | null, |
174 | 174 | self::ERROR_LOCALE_LABEL_MISSING |
175 | 175 | ); |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | */ |
182 | 182 | public function getCountry() : Localization_Country |
183 | 183 | { |
184 | - if(!isset($this->country)) { |
|
184 | + if (!isset($this->country)) { |
|
185 | 185 | $this->country = Localization::createCountry($this->countryCode); |
186 | 186 | } |
187 | 187 |
@@ -9,12 +9,12 @@ |
||
9 | 9 | protected function parseDefinition() : void |
10 | 10 | { |
11 | 11 | // some entries are strings, like parenthesises, semicolons and the like. |
12 | - if(is_string($this->definition)) |
|
12 | + if (is_string($this->definition)) |
|
13 | 13 | { |
14 | 14 | $this->token = $this->definition; |
15 | 15 | $this->value = null; |
16 | 16 | |
17 | - if(isset($this->parentToken)) { |
|
17 | + if (isset($this->parentToken)) { |
|
18 | 18 | $this->line = $this->parentToken->getLine(); |
19 | 19 | } |
20 | 20 | } |
@@ -6,9 +6,9 @@ |
||
6 | 6 | |
7 | 7 | class Localization_Scanner_StringsCollection_Warning |
8 | 8 | { |
9 | - /** |
|
10 | - * @var array |
|
11 | - */ |
|
9 | + /** |
|
10 | + * @var array |
|
11 | + */ |
|
12 | 12 | protected $data; |
13 | 13 | |
14 | 14 | public function __construct(array $data) |