Passed
Push — master ( 95ff55...3e8ce7 )
by Sebastian
09:26
created
src/ConvertHelper/QueryParser.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         
47 47
         $result = array();
48 48
         
49
-        foreach($parts as $part)
49
+        foreach ($parts as $part)
50 50
         {
51 51
             $tokens = explode('=', $part);
52 52
             
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
             $trimmed = trim($name);
57 57
             
58
-            if(empty($trimmed))
58
+            if (empty($trimmed))
59 59
             {
60 60
                 continue;
61 61
             }
Please login to merge, or discard this patch.
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -27,16 +27,16 @@
 block discarded – undo
27 27
         
28 28
     }
29 29
     
30
-   /**
31
-    * We parse the query string ourselves, because the PHP implementation
32
-    * of parse_str has limitations that do not apply to query strings. This
33
-    * is due to the fact that parse_str has to create PHP-compatible variable
34
-    * names from the parameters. URL parameters simply allow way more things
35
-    * than PHP variable names.
36
-    * 
37
-    * @param string $queryString
38
-    * @return array<string,string>
39
-    */
30
+    /**
31
+     * We parse the query string ourselves, because the PHP implementation
32
+     * of parse_str has limitations that do not apply to query strings. This
33
+     * is due to the fact that parse_str has to create PHP-compatible variable
34
+     * names from the parameters. URL parameters simply allow way more things
35
+     * than PHP variable names.
36
+     * 
37
+     * @param string $queryString
38
+     * @return array<string,string>
39
+     */
40 40
     public function parse(string $queryString) : array
41 41
     {
42 42
         // allow HTML entities notation
Please login to merge, or discard this patch.
src/ConvertHelper/ControlCharacters.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
    /**
26 26
     * @var string[]
27 27
     */
28
-    protected static $controlChars =  array(
28
+    protected static $controlChars = array(
29 29
         '0000-0008', // control chars
30 30
         '000E-000F', // control chars
31 31
         '0010-001F', // control chars
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public function __construct()
51 51
     {
52 52
         // create the regex from the unicode characters list
53
-        if(!isset(self::$controlCharsRegex))
53
+        if (!isset(self::$controlCharsRegex))
54 54
         {
55 55
             $chars = $this->getCharsAsHex();
56 56
             
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             // in the regular expression.
59 59
             $stack = array();
60 60
             
61
-            foreach($chars as $char) 
61
+            foreach ($chars as $char) 
62 62
             {
63 63
                 $stack[] = '\x{'.$char.'}';
64 64
             }
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         
84 84
         $stack = array();
85 85
         
86
-        foreach(self::$controlChars as $char)
86
+        foreach (self::$controlChars as $char)
87 87
         {
88 88
             $tokens = explode('-', $char);
89 89
             $start = $tokens[0];
@@ -92,24 +92,24 @@  discard block
 block discarded – undo
92 92
             
93 93
             $range = array();
94 94
             
95
-            foreach(self::$hexAlphabet as $number) 
95
+            foreach (self::$hexAlphabet as $number) 
96 96
             {
97 97
                 $range[] = $prefix.$number;
98 98
             }
99 99
             
100 100
             $use = false;
101 101
             
102
-            foreach($range as $number) 
102
+            foreach ($range as $number) 
103 103
             {
104
-                if($number == $start) {
104
+                if ($number == $start) {
105 105
                     $use = true;
106 106
                 }
107 107
                 
108
-                if($use) {
108
+                if ($use) {
109 109
                     $stack[] = $number;
110 110
                 }
111 111
                 
112
-                if($number == $end) {
112
+                if ($number == $end) {
113 113
                     break;
114 114
                 }
115 115
             }
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         $chars = $this->getCharsAsHex();
133 133
         
134 134
         $result = array();
135
-        foreach($chars as $char) {
135
+        foreach ($chars as $char) {
136 136
             $result[] = hex2bin($char);
137 137
         }
138 138
         
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         $chars = $this->getCharsAsHex();
151 151
         
152 152
         $result = array();
153
-        foreach($chars as $char) {
153
+        foreach ($chars as $char) {
154 154
             $result[] = '\u'.strtolower($char);
155 155
         }
156 156
         
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
     */
171 171
     public function stripControlCharacters(string $string) : string
172 172
     {
173
-        if(empty($string)) 
173
+        if (empty($string)) 
174 174
         {
175 175
             return $string;
176 176
         }
@@ -178,13 +178,13 @@  discard block
 block discarded – undo
178 178
         $result = preg_replace(self::$controlCharsRegex, '', $string);
179 179
         
180 180
         // can happen if the text contains invalid UTF8
181
-        if($result === null)
181
+        if ($result === null)
182 182
         {
183 183
             $string = ConvertHelper::string2utf8($string);
184 184
             
185 185
             $result = preg_replace(self::$controlCharsRegex, '', $string);
186 186
             
187
-            if($result === null)
187
+            if ($result === null)
188 188
             {
189 189
                 throw new ConvertHelper_Exception(
190 190
                     'Cannot strip control characters: malformatted string encountered.',
Please login to merge, or discard this patch.
Indentation   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 {
23 23
     public const ERROR_MALFORMATTED_STRING = 53801;
24 24
     
25
-   /**
26
-    * @var string[]
27
-    */
25
+    /**
26
+     * @var string[]
27
+     */
28 28
     protected static $controlChars =  array(
29 29
         '0000-0008', // control chars
30 30
         '000E-000F', // control chars
@@ -32,19 +32,19 @@  discard block
 block discarded – undo
32 32
         '2000-200F', // non-breaking space and co
33 33
     );
34 34
     
35
-   /**
36
-    * @var string|NULL
37
-    */
35
+    /**
36
+     * @var string|NULL
37
+     */
38 38
     protected static $controlCharsRegex;
39 39
 
40
-   /**
41
-    * @var string[]
42
-    */
40
+    /**
41
+     * @var string[]
42
+     */
43 43
     protected static $hexAlphabet = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F');
44 44
     
45
-   /**
46
-    * @var string[]|NULL
47
-    */
45
+    /**
46
+     * @var string[]|NULL
47
+     */
48 48
     protected static $charsAsHex;
49 49
     
50 50
     public function __construct()
@@ -67,13 +67,13 @@  discard block
 block discarded – undo
67 67
         }
68 68
     }
69 69
     
70
-   /**
71
-    * Retrieves the HEX character codes for all control
72
-    * characters that the {@link stripControlCharacters()}
73
-    * method will remove.
74
-    *
75
-    * @return string[]
76
-    */
70
+    /**
71
+     * Retrieves the HEX character codes for all control
72
+     * characters that the {@link stripControlCharacters()}
73
+     * method will remove.
74
+     *
75
+     * @return string[]
76
+     */
77 77
     public function getCharsAsHex() : array
78 78
     {
79 79
         if (isset(self::$charsAsHex))
@@ -120,13 +120,13 @@  discard block
 block discarded – undo
120 120
         return $stack;
121 121
     }
122 122
     
123
-   /**
124
-    * Retrieves an array of all control characters that
125
-    * the {@link stripControlCharacters()} method will
126
-    * remove, as the actual UTF-8 characters.
127
-    *
128
-    * @return string[]
129
-    */
123
+    /**
124
+     * Retrieves an array of all control characters that
125
+     * the {@link stripControlCharacters()} method will
126
+     * remove, as the actual UTF-8 characters.
127
+     *
128
+     * @return string[]
129
+     */
130 130
     public function getCharsAsUTF8() : array
131 131
     {
132 132
         $chars = $this->getCharsAsHex();
@@ -139,12 +139,12 @@  discard block
 block discarded – undo
139 139
         return $result;
140 140
     }
141 141
     
142
-   /**
143
-    * Retrieves all control characters as JSON encoded
144
-    * characters, e.g. "\u200b".
145
-    *
146
-    * @return string[]
147
-    */
142
+    /**
143
+     * Retrieves all control characters as JSON encoded
144
+     * characters, e.g. "\u200b".
145
+     *
146
+     * @return string[]
147
+     */
148 148
     public function getCharsAsJSON() : array
149 149
     {
150 150
         $chars = $this->getCharsAsHex();
@@ -157,17 +157,17 @@  discard block
 block discarded – undo
157 157
         return $result;
158 158
     }
159 159
     
160
-   /**
161
-    * Removes all control characters from the specified string
162
-    * that can cause problems in some cases, like creating
163
-    * valid XML documents. This includes invisible non-breaking
164
-    * spaces.
165
-    *
166
-    * @param string $string
167
-    * @return string
168
-    * @see https://stackoverflow.com/a/8171868/2298192
169
-    * @see https://unicode-table.com/en
170
-    */
160
+    /**
161
+     * Removes all control characters from the specified string
162
+     * that can cause problems in some cases, like creating
163
+     * valid XML documents. This includes invisible non-breaking
164
+     * spaces.
165
+     *
166
+     * @param string $string
167
+     * @return string
168
+     * @see https://stackoverflow.com/a/8171868/2298192
169
+     * @see https://unicode-table.com/en
170
+     */
171 171
     public function stripControlCharacters(string $string) : string
172 172
     {
173 173
         if(empty($string)) 
Please login to merge, or discard this patch.
src/Value/Bool/False.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,14 +22,14 @@
 block discarded – undo
22 22
  */
23 23
 class Value_Bool_False extends Value_Bool
24 24
 {
25
-    public function __construct(bool $value=true)
25
+    public function __construct(bool $value = true)
26 26
     {
27 27
         parent::__construct($value);
28 28
     }
29 29
     
30 30
     public function set(bool $value) : Value_Bool
31 31
     {
32
-        if($value === false)
32
+        if ($value === false)
33 33
         {
34 34
             parent::set($value);
35 35
         }
Please login to merge, or discard this patch.
src/Value/Bool/True.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 {
25 25
     public function set(bool $value) : Value_Bool
26 26
     {
27
-        if($value === true)
27
+        if ($value === true)
28 28
         {
29 29
             parent::set($value);
30 30
         }
Please login to merge, or discard this patch.
src/VariableInfo/Renderer/String/Array.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@
 block discarded – undo
22 22
             if(is_array($val))
23 23
             {
24 24
                 $result[$key] = $this->traverseArray($val, ($level+1));
25
-            }
26
-            else
25
+            } else
27 26
             {
28 27
                 $result[$key] = parseVariable($val)->toString();
29 28
             }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,15 +18,15 @@
 block discarded – undo
18 18
      * @param int $level
19 19
      * @return array<mixed>
20 20
      */
21
-    protected function traverseArray(array $array, int $level=0) : array
21
+    protected function traverseArray(array $array, int $level = 0) : array
22 22
     {
23 23
         $result = array();
24 24
         
25
-        foreach($array as $key => $val)
25
+        foreach ($array as $key => $val)
26 26
         {
27
-            if(is_array($val))
27
+            if (is_array($val))
28 28
             {
29
-                $result[$key] = $this->traverseArray($val, ($level+1));
29
+                $result[$key] = $this->traverseArray($val, ($level + 1));
30 30
             }
31 31
             else
32 32
             {
Please login to merge, or discard this patch.
src/XMLHelper/HTMLLoader.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     */
108 108
     private static function checkFragment(string $fragment) : void
109 109
     {
110
-        if(!stristr($fragment, '<body') && !stristr($fragment, 'doctype'))
110
+        if (!stristr($fragment, '<body') && !stristr($fragment, 'doctype'))
111 111
         {
112 112
             return;
113 113
         }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         
208 208
         // capture all elements except the body tag itself
209 209
         $xml = '';
210
-        foreach($nodes as $child) 
210
+        foreach ($nodes as $child) 
211 211
         {
212 212
             $xml .= $this->dom->saveXML($child);
213 213
         }
Please login to merge, or discard this patch.
Indentation   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -39,19 +39,19 @@  discard block
 block discarded – undo
39 39
 {
40 40
     public const ERROR_STRING_ALREADY_HAS_BODY_TAG = 57001;
41 41
     
42
-   /**
43
-    * @var \DOMElement
44
-    */
42
+    /**
43
+     * @var \DOMElement
44
+     */
45 45
     private $bodyNode;
46 46
     
47
-   /**
48
-    * @var XMLHelper_DOMErrors
49
-    */
47
+    /**
48
+     * @var XMLHelper_DOMErrors
49
+     */
50 50
     private $errors;
51 51
     
52
-   /**
53
-    * @var string
54
-    */
52
+    /**
53
+     * @var string
54
+     */
55 55
     private static $htmlTemplate = 
56 56
     '<!DOCTYPE html>'.
57 57
     '<html>'.
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
         '</body>'.
64 64
     '</html>';
65 65
     
66
-   /**
67
-    * @var \DOMDocument
68
-    */
66
+    /**
67
+     * @var \DOMDocument
68
+     */
69 69
     private $dom;
70 70
 
71 71
     private function __construct(string $html)
@@ -73,13 +73,13 @@  discard block
 block discarded – undo
73 73
         $this->load($html);
74 74
     }
75 75
     
76
-   /**
77
-    * Creates an HTML loader from an HTML fragment (without
78
-    * doctype, head and body elements).
79
-    * 
80
-    * @param string $fragment
81
-    * @return XMLHelper_HTMLLoader
82
-    */
76
+    /**
77
+     * Creates an HTML loader from an HTML fragment (without
78
+     * doctype, head and body elements).
79
+     * 
80
+     * @param string $fragment
81
+     * @return XMLHelper_HTMLLoader
82
+     */
83 83
     public static function loadFragment(string $fragment) : XMLHelper_HTMLLoader
84 84
     {
85 85
         self::checkFragment($fragment);
@@ -90,24 +90,24 @@  discard block
 block discarded – undo
90 90
         return new XMLHelper_HTMLLoader($pseudoHTML);
91 91
     }
92 92
     
93
-   /**
94
-    * Creates an HTML loader from a full HTML document (including
95
-    * doctype, head and body elements).
96
-    * 
97
-    * @param string $html
98
-    * @return XMLHelper_HTMLLoader
99
-    */
93
+    /**
94
+     * Creates an HTML loader from a full HTML document (including
95
+     * doctype, head and body elements).
96
+     * 
97
+     * @param string $html
98
+     * @return XMLHelper_HTMLLoader
99
+     */
100 100
     public static function loadHTML(string $html) : XMLHelper_HTMLLoader
101 101
     {
102 102
         return  new XMLHelper_HTMLLoader($html);
103 103
     }
104 104
 
105
-   /**
106
-    * Verifies that the fragment does not already contain a body element or doctype.
107
-    * 
108
-    * @param string $fragment
109
-    * @throws XMLHelper_Exception
110
-    */
105
+    /**
106
+     * Verifies that the fragment does not already contain a body element or doctype.
107
+     * 
108
+     * @param string $fragment
109
+     * @throws XMLHelper_Exception
110
+     */
111 111
     private static function checkFragment(string $fragment) : void
112 112
     {
113 113
         if(!stristr($fragment, '<body') && !stristr($fragment, 'doctype'))
@@ -145,65 +145,65 @@  discard block
 block discarded – undo
145 145
         return $this->bodyNode;
146 146
     }
147 147
     
148
-   /**
149
-    * Retrieves the document's `<body>` tag node.
150
-    * 
151
-    * @return \DOMDocument
152
-    */
148
+    /**
149
+     * Retrieves the document's `<body>` tag node.
150
+     * 
151
+     * @return \DOMDocument
152
+     */
153 153
     public function getDOM() : \DOMDocument
154 154
     {
155 155
         return $this->dom;
156 156
     }
157 157
     
158
-   /**
159
-    * Retrieves all nodes from the HTML fragment (= child nodes
160
-    * of the `<body>` element).
161
-    * 
162
-    * @return DOMNodeList<DOMNode>
163
-    */
158
+    /**
159
+     * Retrieves all nodes from the HTML fragment (= child nodes
160
+     * of the `<body>` element).
161
+     * 
162
+     * @return DOMNodeList<DOMNode>
163
+     */
164 164
     public function getFragmentNodes() : DOMNodeList
165 165
     {
166 166
         return $this->bodyNode->childNodes;
167 167
     }
168 168
     
169
-   /**
170
-    * Retrieves the LibXML HTML parsing errors collection, which
171
-    * can be used to review any errors that occurred while loading
172
-    * the HTML document.
173
-    * 
174
-    * @return XMLHelper_DOMErrors
175
-    */
169
+    /**
170
+     * Retrieves the LibXML HTML parsing errors collection, which
171
+     * can be used to review any errors that occurred while loading
172
+     * the HTML document.
173
+     * 
174
+     * @return XMLHelper_DOMErrors
175
+     */
176 176
     public function getErrors() : XMLHelper_DOMErrors
177 177
     {
178 178
         return $this->errors;
179 179
     }
180 180
     
181
-   /**
182
-    * Returns a valid HTML string.
183
-    * 
184
-    * @return string
185
-    */
181
+    /**
182
+     * Returns a valid HTML string.
183
+     * 
184
+     * @return string
185
+     */
186 186
     public function toHTML() : string
187 187
     {
188 188
         return $this->dom->saveHTML();
189 189
     }
190 190
     
191
-   /**
192
-    * Returns a valid XML string.
193
-    * 
194
-    * @return string
195
-    */
191
+    /**
192
+     * Returns a valid XML string.
193
+     * 
194
+     * @return string
195
+     */
196 196
     public function toXML() : string
197 197
     {
198 198
         return $this->dom->saveXML();
199 199
     }
200 200
     
201
-   /**
202
-    * Converts the HTML fragment to valid XML (= all
203
-    * child nodes of the `<body>` element).
204
-    * 
205
-    * @return string
206
-    */
201
+    /**
202
+     * Converts the HTML fragment to valid XML (= all
203
+     * child nodes of the `<body>` element).
204
+     * 
205
+     * @return string
206
+     */
207 207
     public function fragmentToXML() : string
208 208
     {
209 209
         $nodes = $this->getFragmentNodes();
Please login to merge, or discard this patch.
docs/libxml/generate-errorcodes.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,9 +14,9 @@
 block discarded – undo
14 14
  * @see http://www.xmlsoft.org/html/libxml-xmlerror.html
15 15
  */
16 16
 
17
-   /**
18
-    * @var string $list
19
-    */
17
+    /**
18
+     * @var string $list
19
+     */
20 20
     $list = file_get_contents('libxmlerrors.txt');
21 21
     $outputFile = 'LibXML.php';
22 22
     $lines = explode("\n", $list);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     $lines = explode("\n", $list);
23 23
     $reverseArray = array();
24 24
     
25
-    foreach($lines as $line)
25
+    foreach ($lines as $line)
26 26
     {
27 27
         $parts = explode('=', $line);
28 28
         $name = trim(str_replace('XML_ERR_', '', $parts[0]));
Please login to merge, or discard this patch.
src/Request/RefreshParams/Exclude/Name.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@
 block discarded – undo
19 19
  */
20 20
 class Request_RefreshParams_Exclude_Name extends Request_RefreshParams_Exclude
21 21
 {
22
-   /**
23
-    * @var string
24
-    */
22
+    /**
23
+     * @var string
24
+     */
25 25
     private $name;
26 26
     
27 27
     public function __construct(string $paramName)
Please login to merge, or discard this patch.
src/Request/RefreshParams.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     * @param bool $exclude
49 49
     * @return Request_RefreshParams
50 50
     */
51
-    public function setExcludeSessionName(bool $exclude=true) : Request_RefreshParams
51
+    public function setExcludeSessionName(bool $exclude = true) : Request_RefreshParams
52 52
     {
53 53
         $this->setOption('exclude-session-name', $exclude);
54 54
         return $this;
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     
71 71
     public function excludeParamByName(string $paramName) : Request_RefreshParams
72 72
     {
73
-        if($paramName !== '')
73
+        if ($paramName !== '')
74 74
         {
75 75
             $this->excludes[] = new Request_RefreshParams_Exclude_Name($paramName);
76 76
         }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     */
108 108
     public function excludeParamsByName(array $paramNames) : Request_RefreshParams
109 109
     {
110
-        foreach($paramNames as $name)
110
+        foreach ($paramNames as $name)
111 111
         {
112 112
             $this->excludeParamByName((string)$name);
113 113
         }
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
     */
140 140
     public function overrideParams(array $params) : Request_RefreshParams
141 141
     {
142
-        foreach($params as $name => $value)
142
+        foreach ($params as $name => $value)
143 143
         {
144 144
             $this->overrideParam((string)$name, $value);
145 145
         }
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     */
174 174
     private function autoExcludeSessionName(array &$excludes) : void
175 175
     {
176
-        if($this->getBoolOption('exclude-session-name'))
176
+        if ($this->getBoolOption('exclude-session-name'))
177 177
         {
178 178
             $excludes[] = new Request_RefreshParams_Exclude_Name(session_name());
179 179
         }
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
     */
188 188
     private function autoExcludeQuickform(array &$excludes) : void
189 189
     {
190
-        if($this->getBoolOption('exclude-quickform-submitter'))
190
+        if ($this->getBoolOption('exclude-quickform-submitter'))
191 191
         {
192 192
             $excludes[] = new Request_RefreshParams_Exclude_Callback(function(string $paramName)
193 193
             {
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
         // Note: using this loop instead of array_merge,
210 210
         // because array_merge has weird behavior when
211 211
         // using numeric keys.
212
-        foreach($this->overrides as $name => $val)
212
+        foreach ($this->overrides as $name => $val)
213 213
         {
214 214
             $params[$name] = $val;
215 215
         }
@@ -227,11 +227,11 @@  discard block
 block discarded – undo
227 227
     {
228 228
         $result = array();
229 229
         
230
-        foreach($params as $name => $value)
230
+        foreach ($params as $name => $value)
231 231
         {
232 232
             $name = (string)$name;
233 233
             
234
-            if(!$this->isExcluded($name, $value))
234
+            if (!$this->isExcluded($name, $value))
235 235
             {
236 236
                 $result[$name] = $value;
237 237
             }
@@ -252,9 +252,9 @@  discard block
 block discarded – undo
252 252
     {
253 253
         $excludes = $this->resolveExcludes();
254 254
         
255
-        foreach($excludes as $exclude)
255
+        foreach ($excludes as $exclude)
256 256
         {
257
-            if($exclude->isExcluded($paramName, $paramValue))
257
+            if ($exclude->isExcluded($paramName, $paramValue))
258 258
             {
259 259
                 return true;
260 260
             }
Please login to merge, or discard this patch.
Indentation   +82 added lines, -82 removed lines patch added patch discarded remove patch
@@ -23,14 +23,14 @@  discard block
 block discarded – undo
23 23
 {
24 24
     use Traits_Optionable;
25 25
     
26
-   /**
27
-    * @var array<string,mixed>
28
-    */
26
+    /**
27
+     * @var array<string,mixed>
28
+     */
29 29
     private array $overrides = array();
30 30
     
31
-   /**
32
-    * @var Request_RefreshParams_Exclude[]
33
-    */
31
+    /**
32
+     * @var Request_RefreshParams_Exclude[]
33
+     */
34 34
     private array $excludes = array();
35 35
     
36 36
     public function getDefaultOptions() : array
@@ -41,27 +41,27 @@  discard block
 block discarded – undo
41 41
         );
42 42
     }
43 43
     
44
-   /**
45
-    * Whether to automatically exclude the session variable
46
-    * from the parameters.
47
-    * 
48
-    * @param bool $exclude
49
-    * @return Request_RefreshParams
50
-    */
44
+    /**
45
+     * Whether to automatically exclude the session variable
46
+     * from the parameters.
47
+     * 
48
+     * @param bool $exclude
49
+     * @return Request_RefreshParams
50
+     */
51 51
     public function setExcludeSessionName(bool $exclude=true) : Request_RefreshParams
52 52
     {
53 53
         $this->setOption('exclude-session-name', $exclude);
54 54
         return $this;
55 55
     }
56 56
     
57
-   /**
58
-    * Whether to automatically exclude the HTML_QuickForm2
59
-    * request variable used to track whether a form has been
60
-    * submitted.
61
-    * 
62
-    * @param bool $exclude
63
-    * @return Request_RefreshParams
64
-    */
57
+    /**
58
+     * Whether to automatically exclude the HTML_QuickForm2
59
+     * request variable used to track whether a form has been
60
+     * submitted.
61
+     * 
62
+     * @param bool $exclude
63
+     * @return Request_RefreshParams
64
+     */
65 65
     public function setExcludeQuickform(bool $exclude) : Request_RefreshParams
66 66
     {
67 67
         $this->setOption('exclude-quickform-submitter', $exclude);
@@ -99,12 +99,12 @@  discard block
 block discarded – undo
99 99
         return $this;
100 100
     }
101 101
     
102
-   /**
103
-    * Excludes a request parameter by name.
104
-    * 
105
-    * @param array<int,string|number> $paramNames
106
-    * @return Request_RefreshParams
107
-    */
102
+    /**
103
+     * Excludes a request parameter by name.
104
+     * 
105
+     * @param array<int,string|number> $paramNames
106
+     * @return Request_RefreshParams
107
+     */
108 108
     public function excludeParamsByName(array $paramNames) : Request_RefreshParams
109 109
     {
110 110
         foreach($paramNames as $name)
@@ -115,15 +115,15 @@  discard block
 block discarded – undo
115 115
         return $this;
116 116
     }
117 117
     
118
-   /**
119
-    * Overrides a parameter: even if it exists, this
120
-    * value will be used instead - even if it is on 
121
-    * the list of excluded parameters.
122
-    * 
123
-    * @param string $paramName
124
-    * @param mixed $paramValue
125
-    * @return Request_RefreshParams
126
-    */
118
+    /**
119
+     * Overrides a parameter: even if it exists, this
120
+     * value will be used instead - even if it is on 
121
+     * the list of excluded parameters.
122
+     * 
123
+     * @param string $paramName
124
+     * @param mixed $paramValue
125
+     * @return Request_RefreshParams
126
+     */
127 127
     public function overrideParam(string $paramName, $paramValue) : Request_RefreshParams
128 128
     {
129 129
         $this->overrides[$paramName] = $paramValue;
@@ -131,12 +131,12 @@  discard block
 block discarded – undo
131 131
         return $this;
132 132
     }
133 133
     
134
-   /**
135
-    * Overrides an array of parameters. 
136
-    * 
137
-    * @param array<string|number,mixed> $params
138
-    * @return Request_RefreshParams
139
-    */
134
+    /**
135
+     * Overrides an array of parameters. 
136
+     * 
137
+     * @param array<string|number,mixed> $params
138
+     * @return Request_RefreshParams
139
+     */
140 140
     public function overrideParams(array $params) : Request_RefreshParams
141 141
     {
142 142
         foreach($params as $name => $value)
@@ -147,14 +147,14 @@  discard block
 block discarded – undo
147 147
         return $this;
148 148
     }
149 149
     
150
-   /**
151
-    * Resolves all the parameter exclusions that should
152
-    * be applied to the list of parameters. This includes
153
-    * the manually added exclusions and the dynamic exclusions
154
-    * like the session name.
155
-    * 
156
-    * @return Request_RefreshParams_Exclude[]
157
-    */
150
+    /**
151
+     * Resolves all the parameter exclusions that should
152
+     * be applied to the list of parameters. This includes
153
+     * the manually added exclusions and the dynamic exclusions
154
+     * like the session name.
155
+     * 
156
+     * @return Request_RefreshParams_Exclude[]
157
+     */
158 158
     private function resolveExcludes() : array
159 159
     {
160 160
         $excludes = $this->excludes;
@@ -165,12 +165,12 @@  discard block
 block discarded – undo
165 165
         return $excludes;
166 166
     }
167 167
     
168
-   /**
169
-    * Automatically excludes the session name from the
170
-    * parameters, if present.
171
-    * 
172
-    * @param Request_RefreshParams_Exclude[] $excludes
173
-    */
168
+    /**
169
+     * Automatically excludes the session name from the
170
+     * parameters, if present.
171
+     * 
172
+     * @param Request_RefreshParams_Exclude[] $excludes
173
+     */
174 174
     private function autoExcludeSessionName(array &$excludes) : void
175 175
     {
176 176
         if($this->getBoolOption('exclude-session-name'))
@@ -179,12 +179,12 @@  discard block
 block discarded – undo
179 179
         }
180 180
     }
181 181
    
182
-   /**
183
-    * Automatically excludes the HTML_QuickForm2 submit
184
-    * tracking variable, when enabled.
185
-    * 
186
-    * @param Request_RefreshParams_Exclude[] $excludes
187
-    */
182
+    /**
183
+     * Automatically excludes the HTML_QuickForm2 submit
184
+     * tracking variable, when enabled.
185
+     * 
186
+     * @param Request_RefreshParams_Exclude[] $excludes
187
+     */
188 188
     private function autoExcludeQuickform(array &$excludes) : void
189 189
     {
190 190
         if($this->getBoolOption('exclude-quickform-submitter'))
@@ -196,12 +196,12 @@  discard block
 block discarded – undo
196 196
         }
197 197
     }
198 198
     
199
-   /**
200
-    * Retrieves the list of parameters matching the 
201
-    * current settings.
202
-    * 
203
-    * @return array<string,mixed>
204
-    */
199
+    /**
200
+     * Retrieves the list of parameters matching the 
201
+     * current settings.
202
+     * 
203
+     * @return array<string,mixed>
204
+     */
205 205
     public function getParams() : array
206 206
     {
207 207
         $params = $this->removeExcluded($_REQUEST);
@@ -217,12 +217,12 @@  discard block
 block discarded – undo
217 217
         return $params;
218 218
     }
219 219
     
220
-   /**
221
-    * Removes all excluded parameters from the array.
222
-    * 
223
-    * @param array<string,mixed> $params
224
-    * @return array<string,mixed>
225
-    */
220
+    /**
221
+     * Removes all excluded parameters from the array.
222
+     * 
223
+     * @param array<string,mixed> $params
224
+     * @return array<string,mixed>
225
+     */
226 226
     private function removeExcluded(array $params) : array
227 227
     {
228 228
         $result = array();
@@ -240,14 +240,14 @@  discard block
 block discarded – undo
240 240
         return $result;
241 241
     }
242 242
     
243
-   /**
244
-    * Checks all configured exclusions to see if the 
245
-    * parameter should be excluded or not.
246
-    * 
247
-    * @param string $paramName
248
-    * @param mixed $paramValue
249
-    * @return bool
250
-    */
243
+    /**
244
+     * Checks all configured exclusions to see if the 
245
+     * parameter should be excluded or not.
246
+     * 
247
+     * @param string $paramName
248
+     * @param mixed $paramValue
249
+     * @return bool
250
+     */
251 251
     public function isExcluded(string $paramName, $paramValue) : bool
252 252
     {
253 253
         $excludes = $this->resolveExcludes();
Please login to merge, or discard this patch.