Passed
Push — master ( 3c5a70...df2682 )
by Sebastian
04:15
created
src/Localization/Writer.php 1 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/Editor.php 1 patch
Indentation   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -41,53 +41,53 @@  discard block
 block discarded – undo
41 41
     const VARIABLE_WARNINGS = 'warnings';
42 42
 
43 43
     /**
44
-    * @var string
45
-    */
44
+     * @var string
45
+     */
46 46
     protected $installPath;
47 47
     
48
-   /**
49
-    * @var Localization_Source[]
50
-    */
48
+    /**
49
+     * @var Localization_Source[]
50
+     */
51 51
     protected $sources;
52 52
     
53
-   /**
54
-    * @var Request
55
-    */
53
+    /**
54
+     * @var Request
55
+     */
56 56
     protected $request;
57 57
     
58
-   /**
59
-    * @var Localization_Source
60
-    */
58
+    /**
59
+     * @var Localization_Source
60
+     */
61 61
     protected $activeSource;
62 62
     
63
-   /**
64
-    * @var Localization_Scanner
65
-    */
63
+    /**
64
+     * @var Localization_Scanner
65
+     */
66 66
     protected $scanner;
67 67
     
68
-   /**
69
-    * @var Localization_Locale[]
70
-    */
68
+    /**
69
+     * @var Localization_Locale[]
70
+     */
71 71
     protected array $appLocales = array();
72 72
     
73
-   /**
74
-    * @var Localization_Locale
75
-    */
73
+    /**
74
+     * @var Localization_Locale
75
+     */
76 76
     protected $activeAppLocale;
77 77
     
78
-   /**
79
-    * @var Localization_Editor_Filters
80
-    */
78
+    /**
79
+     * @var Localization_Editor_Filters
80
+     */
81 81
     protected $filters;
82 82
 
83
-   /**
84
-    * @var array<string,string>
85
-    */
83
+    /**
84
+     * @var array<string,string>
85
+     */
86 86
     protected $requestParams = array();
87 87
     
88
-   /**
89
-    * @var string
90
-    */
88
+    /**
89
+     * @var string
90
+     */
91 91
     protected $varPrefix = 'applocalize_';
92 92
 
93 93
     /**
@@ -128,15 +128,15 @@  discard block
 block discarded – undo
128 128
         return $this->request;
129 129
     }
130 130
     
131
-   /**
132
-    * Adds a request parameter that will be persisted in all URLs
133
-    * within the editor. This can be used when integrating the
134
-    * editor in an existing page that needs specific request params.
135
-    * 
136
-    * @param string $name
137
-    * @param string $value
138
-    * @return Localization_Editor
139
-    */
131
+    /**
132
+     * Adds a request parameter that will be persisted in all URLs
133
+     * within the editor. This can be used when integrating the
134
+     * editor in an existing page that needs specific request params.
135
+     * 
136
+     * @param string $name
137
+     * @param string $value
138
+     * @return Localization_Editor
139
+     */
140 140
     public function addRequestParam(string $name, string $value) : Localization_Editor
141 141
     {
142 142
         $this->requestParams[$name] = $value;
@@ -500,13 +500,13 @@  discard block
 block discarded – undo
500 500
         );
501 501
     }
502 502
     
503
-   /**
504
-    * Sets the application name shown in the main navigation
505
-    * in the user interface.
506
-    * 
507
-    * @param string $name
508
-    * @return Localization_Editor
509
-    */
503
+    /**
504
+     * Sets the application name shown in the main navigation
505
+     * in the user interface.
506
+     * 
507
+     * @param string $name
508
+     * @return Localization_Editor
509
+     */
510 510
     public function setAppName(string $name) : Localization_Editor
511 511
     {
512 512
         $this->setOption('appname', $name);
@@ -536,15 +536,15 @@  discard block
 block discarded – undo
536 536
         return $this;
537 537
     }
538 538
     
539
-   /**
540
-    * Sets an URL that the translators can use to go back to
541
-    * the main application, for example if it is integrated into
542
-    * an existing application.
543
-    * 
544
-    * @param string $url The URL to use for the link
545
-    * @param string $label Label of the link
546
-    * @return Localization_Editor
547
-    */
539
+    /**
540
+     * Sets an URL that the translators can use to go back to
541
+     * the main application, for example if it is integrated into
542
+     * an existing application.
543
+     * 
544
+     * @param string $url The URL to use for the link
545
+     * @param string $label Label of the link
546
+     * @return Localization_Editor
547
+     */
548 548
     public function setBackURL(string $url, string $label) : Localization_Editor
549 549
     {
550 550
         $this->setOption('back-url', $url);
Please login to merge, or discard this patch.