Passed
Push — master ( df2682...2600cb )
by Sebastian
04:55
created
example/index.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,9 +16,9 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
src/Localization/Event.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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])) {
Please login to merge, or discard this patch.
src/Localization/Generator.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -258,8 +258,7 @@
 block discarded – undo
258 258
         if(empty($tokens))
259 259
         {
260 260
             $content = '/* No strings found. */';
261
-        }
262
-        else
261
+        } else
263 262
         {
264 263
             $content =
265 264
             '/**'.PHP_EOL.
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -143,14 +143,14 @@  discard block
 block discarded – undo
143 143
         $this->writeCacheKey();
144 144
     }
145 145
     
146
-   /**
147
-    * Retrieves a list of all localization client 
148
-    * files that are written to disk. This includes
149
-    * the locale files and the libraries required
150
-    * to make it work clientside.
151
-    * 
152
-    * @return string[]
153
-    */
146
+    /**
147
+     * Retrieves a list of all localization client 
148
+     * files that are written to disk. This includes
149
+     * the locale files and the libraries required
150
+     * to make it work clientside.
151
+     * 
152
+     * @return string[]
153
+     */
154 154
     public function getFilesList() : array
155 155
     {
156 156
         $files = array();
@@ -328,11 +328,11 @@  discard block
 block discarded – undo
328 328
         return self::$systemKey;
329 329
     }
330 330
 
331
-   /**
332
-    * Generates the cache key file, which is used to determine
333
-    * automatically whether the client libraries need to be 
334
-    * refreshed.
335
-    */
331
+    /**
332
+     * Generates the cache key file, which is used to determine
333
+     * automatically whether the client libraries need to be 
334
+     * refreshed.
335
+     */
336 336
     protected function writeCacheKey() : void
337 337
     {
338 338
         $this->cacheKey = self::getSystemKey();
Please login to merge, or discard this patch.
src/Localization/Parser/Token/PHP.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@
 block discarded – undo
17 17
             if(isset($this->parentToken)) {
18 18
                 $this->line = $this->parentToken->getLine();
19 19
             }
20
-        }
21
-        else
20
+        } else
22 21
         {
23 22
             $this->token = token_name($this->definition[0]);
24 23
             $this->value = $this->definition[1];
Please login to merge, or discard this patch.
src/Localization/Editor/Filters.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@  discard block
 block discarded – undo
50 50
             foreach($defaults as $name => $val) {
51 51
                 $this->setValue($name, $val);
52 52
             }
53
-        }
54
-        else if($this->request->getBool($this->vars['filter'])) 
53
+        } else if($this->request->getBool($this->vars['filter'])) 
55 54
         {
56 55
             $this->parseSearchTerms($this->request->getParam($this->vars['search']));
57 56
             
@@ -72,8 +71,7 @@  discard block
 block discarded – undo
72 71
                 ->setEnum('', 'client', 'server')
73 72
                 ->get('')
74 73
             );
75
-        }
76
-        else
74
+        } else
77 75
         {
78 76
             $this->parseSearchTerms($this->getValue($this->vars['search']));
79 77
         }
Please login to merge, or discard this patch.
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -23,25 +23,25 @@  discard block
 block discarded – undo
23 23
  */
24 24
 class Localization_Editor_Filters
25 25
 {
26
-   /**
27
-    * @var Localization_Editor
28
-    */
26
+    /**
27
+     * @var Localization_Editor
28
+     */
29 29
     protected $editor;
30 30
     
31
-   /**
32
-    * @var Request
33
-    */
31
+    /**
32
+     * @var Request
33
+     */
34 34
     
35 35
     protected $request; 
36 36
      
37
-   /**
38
-    * @var string
39
-    */
37
+    /**
38
+     * @var string
39
+     */
40 40
     protected $sessionName = 'localize_filters';
41 41
     
42
-   /**
43
-    * @var string[]
44
-    */
42
+    /**
43
+     * @var string[]
44
+     */
45 45
     protected $vars = array(
46 46
         'resetfilter' => '',
47 47
         'filter' => '',
@@ -204,13 +204,13 @@  discard block
 block discarded – undo
204 204
             <form class="form-inline">
205 205
             	<div class="form-hiddens">
206 206
             		<?php 
207
-    					$params = $this->editor->getRequestParams();
208
-    					foreach($params as $name => $value) {
209
-    					    ?>
207
+                        $params = $this->editor->getRequestParams();
208
+                        foreach($params as $name => $value) {
209
+                            ?>
210 210
     					    	<input type="hidden" name="<?php echo $name ?>" value="<?php echo $value ?>">
211 211
     					    <?php 
212
-    					}
213
-					?>
212
+                        }
213
+                    ?>
214 214
             	</div>
215 215
             	<div class="form-row">
216 216
             		<div class="col-auto">
@@ -218,42 +218,42 @@  discard block
 block discarded – undo
218 218
     		        </div>
219 219
                     <div class="col-auto">
220 220
                     	<?php
221
-                    	    echo $this->renderSelect(
222
-                    	       $this->vars['status'],
223
-                    	       array(
224
-                        	       array(
225
-                        	            'value' => '',
226
-                        	            'label' => t('Status...')
227
-                        	       ),
228
-                        	       array(
229
-                        	           'value' => 'untranslated',
230
-                        	           'label' => t('Not translated')
231
-                        	       ),
232
-                        	       array(
233
-                        	           'value' => 'translated',
234
-                        	           'label' => t('Translated')
235
-                        	       )
236
-                    	       )
237
-                    	   );
221
+                            echo $this->renderSelect(
222
+                                $this->vars['status'],
223
+                                array(
224
+                                    array(
225
+                                        'value' => '',
226
+                                        'label' => t('Status...')
227
+                                    ),
228
+                                    array(
229
+                                        'value' => 'untranslated',
230
+                                        'label' => t('Not translated')
231
+                                    ),
232
+                                    array(
233
+                                        'value' => 'translated',
234
+                                        'label' => t('Translated')
235
+                                    )
236
+                                )
237
+                            );
238 238
                     	
239
-                    	   echo $this->renderSelect(
240
-                    	       $this->vars['location'],
241
-                    	       array(
242
-                    	           array(
243
-                    	               'value' => '',
244
-                    	               'label' => t('Location...')
245
-                    	           ),
246
-                    	           array(
247
-                    	               'value' => 'client',
248
-                    	               'label' => t('Clientside')
249
-                    	           ),
250
-                    	           array(
251
-                    	               'value' => 'server',
252
-                    	               'label' => t('Serverside')
253
-                    	           )
254
-                    	       )
255
-                	       );
256
-                    	?>
239
+                            echo $this->renderSelect(
240
+                                $this->vars['location'],
241
+                                array(
242
+                                    array(
243
+                                        'value' => '',
244
+                                        'label' => t('Location...')
245
+                                    ),
246
+                                    array(
247
+                                        'value' => 'client',
248
+                                        'label' => t('Clientside')
249
+                                    ),
250
+                                    array(
251
+                                        'value' => 'server',
252
+                                        'label' => t('Serverside')
253
+                                    )
254
+                                )
255
+                            );
256
+                        ?>
257 257
                     </div>
258 258
                     <div class="col-auto">
259 259
 	    				<button type="submit" name="<?php echo $this->vars['filter'] ?>" value="yes" class="btn btn-primary mb-2" title="<?php pt('Filter the list with the selected criteria.') ?>" data-toggle="tooltip">
@@ -268,9 +268,9 @@  discard block
 block discarded – undo
268 268
             </form>
269 269
             <p>
270 270
             	<small class="text-muted"><?php 
271
-            	   pts('Hint:'); 
272
-            	   pt('Search works in translated and untranslated text, as well as the file name.') 
273
-        	   ?></small>
271
+                    pts('Hint:'); 
272
+                    pt('Search works in translated and untranslated text, as well as the file name.') 
273
+                ?></small>
274 274
             </p>
275 275
 			<br>
276 276
         <?php
Please login to merge, or discard this patch.
src/Localization/Scanner/StringsCollection/Warning.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@
 block discarded – undo
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)
Please login to merge, or discard this patch.
src/Localization/Writer.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -121,8 +121,7 @@
 block discarded – undo
121 121
             $lines[] = '; ';
122 122
             $lines[] = '; 1) Do not to modify the keys (left hand side of the = sign)';
123 123
             $lines[] = '; 2) Save the file as UTF-8 without BOM';
124
-        } 
125
-        else 
124
+        } else 
126 125
         {
127 126
             $lines[] = '; Do NOT edit this file directly! It depends on the main translation file';
128 127
             $lines[] = '; and any changes will be lost. Edit the main file instead.';
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
  */
21 21
 class Localization_Writer
22 22
 {
23
-   /**
24
-    * @var array<string,string>
25
-    */
23
+    /**
24
+     * @var array<string,string>
25
+     */
26 26
     private array $hashes = array();
27 27
 
28 28
     private bool $editable = false;
@@ -138,16 +138,16 @@  discard block
 block discarded – undo
138 138
         return $hashes;
139 139
     }
140 140
     
141
-   /**
142
-    * Sort the strings to ensure they always appear in the same order:
143
-    * first by text, and same strings by their hashes. This is important
144
-    * for strings that have the same translation to avoid them changing
145
-    * order between sorts.
146
-    *
147
-    * @param array $a
148
-    * @param array $b
149
-    * @return int
150
-    */
141
+    /**
142
+     * Sort the strings to ensure they always appear in the same order:
143
+     * first by text, and same strings by their hashes. This is important
144
+     * for strings that have the same translation to avoid them changing
145
+     * order between sorts.
146
+     *
147
+     * @param array $a
148
+     * @param array $b
149
+     * @return int
150
+     */
151 151
     public function callback_sortStrings(array $a, array $b) : int
152 152
     {
153 153
         $result = strnatcasecmp($a['text'], $b['text']);
Please login to merge, or discard this patch.
src/Localization/Parser/Token/Javascript.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@
 block discarded – undo
19 19
             if(isset($this->parentToken)) {
20 20
                 $this->line = $this->parentToken->getLine();
21 21
             }
22
-        }
23
-        else
22
+        } else
24 23
         {
25 24
             $this->token = JTokenizer::getTokenName($this->definition[0]);
26 25
             $this->value = $this->definition[1];
Please login to merge, or discard this patch.
src/Localization/Scanner/StringInfo.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@
 block discarded – undo
12 12
     const SERIALIZED_PROPERTIES = 'properties';
13 13
 
14 14
     /**
15
-    * @var Localization_Scanner_StringsCollection
16
-    */
15
+     * @var Localization_Scanner_StringsCollection
16
+     */
17 17
     protected $collection;
18 18
 
19 19
     /**
Please login to merge, or discard this patch.