Passed
Push — master ( 7e3913...f58fec )
by Sebastian
05:25
created
src/Localization/Scanner/StringHash.php 1 patch
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -15,19 +15,19 @@  discard block
 block discarded – undo
15 15
  */
16 16
 class Localization_Scanner_StringHash
17 17
 {
18
-   /**
19
-    * @var Localization_Scanner_StringsCollection
20
-    */
18
+    /**
19
+     * @var Localization_Scanner_StringsCollection
20
+     */
21 21
     protected $collection;
22 22
     
23
-   /**
24
-    * @var string
25
-    */
23
+    /**
24
+     * @var string
25
+     */
26 26
     protected $hash;
27 27
     
28
-   /**
29
-    * @var Localization_Scanner_StringInfo[]
30
-    */
28
+    /**
29
+     * @var Localization_Scanner_StringInfo[]
30
+     */
31 31
     protected $strings = array();
32 32
 
33 33
     /**
@@ -60,10 +60,10 @@  discard block
 block discarded – undo
60 60
         return $entries;
61 61
     }
62 62
     
63
-   /**
64
-    * Retrieves all individual string locations where this text was found.
65
-    * @return Localization_Scanner_StringInfo[]
66
-    */
63
+    /**
64
+     * Retrieves all individual string locations where this text was found.
65
+     * @return Localization_Scanner_StringInfo[]
66
+     */
67 67
     public function getStrings() : array
68 68
     {
69 69
         return $this->strings;
@@ -123,10 +123,10 @@  discard block
 block discarded – undo
123 123
         return count($this->strings);
124 124
     }
125 125
     
126
-   /**
127
-    * Retrieves the translated text, if any.
128
-    * @return string
129
-    */
126
+    /**
127
+     * Retrieves the translated text, if any.
128
+     * @return string
129
+     */
130 130
     public function getTranslatedText() : string
131 131
     {
132 132
         $translator = Localization::getTranslator();
@@ -139,10 +139,10 @@  discard block
 block discarded – undo
139 139
         return '';
140 140
     }
141 141
     
142
-   /**
143
-    * Retrieves a list of all file names, with relative paths.
144
-    * @return string[]
145
-    */
142
+    /**
143
+     * Retrieves a list of all file names, with relative paths.
144
+     * @return string[]
145
+     */
146 146
     public function getFiles() : array
147 147
     {
148 148
         $files = array();
@@ -164,10 +164,10 @@  discard block
 block discarded – undo
164 164
         return $files;
165 165
     }
166 166
     
167
-   /**
168
-    * Retrieves a list of all file names this string is used in.
169
-    * @return string[]
170
-    */
167
+    /**
168
+     * Retrieves a list of all file names this string is used in.
169
+     * @return string[]
170
+     */
171 171
     public function getFileNames() : array
172 172
     {
173 173
         $files = $this->getFiles();
@@ -182,13 +182,13 @@  discard block
 block discarded – undo
182 182
         return array_unique($result);
183 183
     }
184 184
     
185
-   /**
186
-    * Retrieves a text comprised of all strings that are relevant
187
-    * for a full text search, imploded together. Used in the search
188
-    * function to find matching strings.
189
-    * 
190
-    * @return string
191
-    */
185
+    /**
186
+     * Retrieves a text comprised of all strings that are relevant
187
+     * for a full text search, imploded together. Used in the search
188
+     * function to find matching strings.
189
+     * 
190
+     * @return string
191
+     */
192 192
     public function getSearchString() : string
193 193
     {
194 194
         $parts = array($this->getTranslatedText(), $this->getTextAsString());
Please login to merge, or discard this patch.
src/Localization/Parser/Token.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@  discard block
 block discarded – undo
8 8
 
9 9
 abstract class Localization_Parser_Token
10 10
 {
11
-   /**
12
-    * @var array|string
13
-    */
11
+    /**
12
+     * @var array|string
13
+     */
14 14
     protected $definition;
15 15
     
16
-   /**
17
-    * @var Localization_Parser_Token|NULL
18
-    */
16
+    /**
17
+     * @var Localization_Parser_Token|NULL
18
+     */
19 19
     protected $parentToken;
20 20
 
21 21
     /**
@@ -98,6 +98,6 @@  discard block
 block discarded – undo
98 98
             'value' => $this->getValue(),
99 99
             'line' => $this->getLine(),
100 100
             'isEncapsedString' => ConvertHelper::bool2string($this->isEncapsedString())
101
-         );
101
+            );
102 102
     }
103 103
 }
Please login to merge, or discard this patch.
src/Localization/Source/Folder.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -23,24 +23,24 @@
 block discarded – undo
23 23
  */
24 24
 class Localization_Source_Folder extends Localization_Source
25 25
 {
26
-   /**
27
-    * The folder under which all translatable files are kept.
28
-    * @var string
29
-    */
26
+    /**
27
+     * The folder under which all translatable files are kept.
28
+     * @var string
29
+     */
30 30
     protected $sourcesFolder;
31 31
     
32
-   /**
33
-    * @var string
34
-    */
32
+    /**
33
+     * @var string
34
+     */
35 35
     protected $id;
36 36
 
37
-   /**
38
-    * @param string $alias An alias for this source, to recognize it by.
39
-    * @param string $label The human-readable label, used in the editor.
40
-    * @param string $group A human-readable group label to group several sources by. Used in the editor.
41
-    * @param string $storageFolder The folder in which to store the localization files.
42
-    * @param string $sourcesFolder The folder in which to analyze files to find translatable strings.
43
-    */
37
+    /**
38
+     * @param string $alias An alias for this source, to recognize it by.
39
+     * @param string $label The human-readable label, used in the editor.
40
+     * @param string $group A human-readable group label to group several sources by. Used in the editor.
41
+     * @param string $storageFolder The folder in which to store the localization files.
42
+     * @param string $sourcesFolder The folder in which to analyze files to find translatable strings.
43
+     */
44 44
     public function __construct(string $alias, string $label, string $group, string $storageFolder, string $sourcesFolder)
45 45
     {
46 46
         parent::__construct($alias, $label, $group, $storageFolder);
Please login to merge, or discard this patch.
src/Localization/Source.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -27,27 +27,27 @@
 block discarded – undo
27 27
  */
28 28
 abstract class Localization_Source
29 29
 {
30
-   /**
31
-    * Human-readable label for the source.
32
-    * @var string
33
-    */
30
+    /**
31
+     * Human-readable label for the source.
32
+     * @var string
33
+     */
34 34
     protected $label;
35 35
     
36
-   /**
37
-    * Human-readable group name to categorize the source.
38
-    * @var string
39
-    */
36
+    /**
37
+     * Human-readable group name to categorize the source.
38
+     * @var string
39
+     */
40 40
     protected $group;
41 41
     
42
-   /**
43
-    * The folder in which the localization files are stored
44
-    * @var string
45
-    */
42
+    /**
43
+     * The folder in which the localization files are stored
44
+     * @var string
45
+     */
46 46
     protected $storageFolder;
47 47
     
48
-   /**
49
-    * @var string
50
-    */
48
+    /**
49
+     * @var string
50
+     */
51 51
     protected $alias;
52 52
 
53 53
     public function __construct(string $alias, string $label, string $group, string $storageFolder)
Please login to merge, or discard this patch.
src/Localization/Editor.php 1 patch
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -36,54 +36,54 @@  discard block
 block discarded – undo
36 36
     const ERROR_LOCAL_PATH_NOT_FOUND = 40002;
37 37
     const ERROR_STRING_HASH_WITHOUT_TEXT = 40003;
38 38
 
39
-   /**
40
-    * @var string
41
-    */
39
+    /**
40
+     * @var string
41
+     */
42 42
     protected $installPath;
43 43
     
44
-   /**
45
-    * @var Localization_Source[]
46
-    */
44
+    /**
45
+     * @var Localization_Source[]
46
+     */
47 47
     protected $sources;
48 48
     
49
-   /**
50
-    * @var Request
51
-    */
49
+    /**
50
+     * @var Request
51
+     */
52 52
     protected $request;
53 53
     
54
-   /**
55
-    * @var Localization_Source
56
-    */
54
+    /**
55
+     * @var Localization_Source
56
+     */
57 57
     protected $activeSource;
58 58
     
59
-   /**
60
-    * @var Localization_Scanner
61
-    */
59
+    /**
60
+     * @var Localization_Scanner
61
+     */
62 62
     protected $scanner;
63 63
     
64
-   /**
65
-    * @var Localization_Locale[]
66
-    */
64
+    /**
65
+     * @var Localization_Locale[]
66
+     */
67 67
     protected $appLocales = array();
68 68
     
69
-   /**
70
-    * @var Localization_Locale
71
-    */
69
+    /**
70
+     * @var Localization_Locale
71
+     */
72 72
     protected $activeAppLocale;
73 73
     
74
-   /**
75
-    * @var Localization_Editor_Filters
76
-    */
74
+    /**
75
+     * @var Localization_Editor_Filters
76
+     */
77 77
     protected $filters;
78 78
 
79
-   /**
80
-    * @var array<string,string>
81
-    */
79
+    /**
80
+     * @var array<string,string>
81
+     */
82 82
     protected $requestParams = array();
83 83
     
84
-   /**
85
-    * @var string
86
-    */
84
+    /**
85
+     * @var string
86
+     */
87 87
     protected $varPrefix = 'applocalize_';
88 88
 
89 89
     /**
@@ -124,15 +124,15 @@  discard block
 block discarded – undo
124 124
         return $this->request;
125 125
     }
126 126
     
127
-   /**
128
-    * Adds a request parameter that will be persisted in all URLs
129
-    * within the editor. This can be used when integrating the
130
-    * editor in an existing page that needs specific request params.
131
-    * 
132
-    * @param string $name
133
-    * @param string $value
134
-    * @return Localization_Editor
135
-    */
127
+    /**
128
+     * Adds a request parameter that will be persisted in all URLs
129
+     * within the editor. This can be used when integrating the
130
+     * editor in an existing page that needs specific request params.
131
+     * 
132
+     * @param string $name
133
+     * @param string $value
134
+     * @return Localization_Editor
135
+     */
136 136
     public function addRequestParam(string $name, string $value) : Localization_Editor
137 137
     {
138 138
         $this->requestParams[$name] = $value;
@@ -486,13 +486,13 @@  discard block
 block discarded – undo
486 486
         );
487 487
     }
488 488
     
489
-   /**
490
-    * Sets the application name shown in the main navigation
491
-    * in the user interface.
492
-    * 
493
-    * @param string $name
494
-    * @return Localization_Editor
495
-    */
489
+    /**
490
+     * Sets the application name shown in the main navigation
491
+     * in the user interface.
492
+     * 
493
+     * @param string $name
494
+     * @return Localization_Editor
495
+     */
496 496
     public function setAppName(string $name) : Localization_Editor
497 497
     {
498 498
         $this->setOption('appname', $name);
@@ -522,15 +522,15 @@  discard block
 block discarded – undo
522 522
         return $this;
523 523
     }
524 524
     
525
-   /**
526
-    * Sets an URL that the translators can use to go back to
527
-    * the main application, for example if it is integrated into
528
-    * an existing application.
529
-    * 
530
-    * @param string $url The URL to use for the link
531
-    * @param string $label Label of the link
532
-    * @return Localization_Editor
533
-    */
525
+    /**
526
+     * Sets an URL that the translators can use to go back to
527
+     * the main application, for example if it is integrated into
528
+     * an existing application.
529
+     * 
530
+     * @param string $url The URL to use for the link
531
+     * @param string $label Label of the link
532
+     * @return Localization_Editor
533
+     */
534 534
     public function setBackURL(string $url, string $label) : Localization_Editor
535 535
     {
536 536
         $this->setOption('back-url', $url);
Please login to merge, or discard this patch.