Test Failed
Push — master ( ca159c...8f4401 )
by Sebastian
03:00
created
src/IniHelper.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -163,8 +163,7 @@
 block discarded – undo
163 163
             if($section->isDefault()) 
164 164
             {
165 165
                 $result = array_merge($result, $section->toArray());
166
-            } 
167
-            else 
166
+            } else 
168 167
             {
169 168
                 $result[$section->getName()] = $section->toArray();
170 169
             }
Please login to merge, or discard this patch.
Indentation   +85 added lines, -85 removed lines patch added patch discarded remove patch
@@ -60,23 +60,23 @@  discard block
 block discarded – undo
60 60
         }
61 61
     }
62 62
     
63
-   /**
64
-    * The end of line character used in the INI source string.
65
-    * @return string
66
-    */
63
+    /**
64
+     * The end of line character used in the INI source string.
65
+     * @return string
66
+     */
67 67
     public function getEOLChar() : string
68 68
     {
69 69
         return $this->eol;
70 70
     }
71 71
     
72
-   /**
73
-    * Factory method: creates a new helper instance loading the
74
-    * ini content from the specified file.
75
-    * 
76
-    * @param string $iniPath
77
-    * @return \AppUtils\IniHelper
78
-    * @throws IniHelper_Exception
79
-    */
72
+    /**
73
+     * Factory method: creates a new helper instance loading the
74
+     * ini content from the specified file.
75
+     * 
76
+     * @param string $iniPath
77
+     * @return \AppUtils\IniHelper
78
+     * @throws IniHelper_Exception
79
+     */
80 80
     public static function createFromFile(string $iniPath)
81 81
     {
82 82
         $iniPath = FileHelper::requireFileExists($iniPath);
@@ -96,35 +96,35 @@  discard block
 block discarded – undo
96 96
         );
97 97
     }
98 98
     
99
-   /**
100
-    * Factory method: Creates a new ini helper instance from an ini string.
101
-    * 
102
-    * @param string $iniContent
103
-    * @return \AppUtils\IniHelper
104
-    */
99
+    /**
100
+     * Factory method: Creates a new ini helper instance from an ini string.
101
+     * 
102
+     * @param string $iniContent
103
+     * @return \AppUtils\IniHelper
104
+     */
105 105
     public static function createFromString(string $iniContent)
106 106
     {
107 107
         return new IniHelper($iniContent);
108 108
     }
109 109
     
110
-   /**
111
-    * Factory method: Creates a new empty ini helper.
112
-    *  
113
-    * @return \AppUtils\IniHelper
114
-    */
110
+    /**
111
+     * Factory method: Creates a new empty ini helper.
112
+     *  
113
+     * @return \AppUtils\IniHelper
114
+     */
115 115
     public static function createNew()
116 116
     {
117 117
         return self::createFromString('');
118 118
     }
119 119
     
120
-   /**
121
-    * Adds a new data section, and returns the section instance.
122
-    * If a section with the name already exists, returns that
123
-    * section instead of creating a new one.
124
-    *  
125
-    * @param string $name
126
-    * @return IniHelper_Section
127
-    */
120
+    /**
121
+     * Adds a new data section, and returns the section instance.
122
+     * If a section with the name already exists, returns that
123
+     * section instead of creating a new one.
124
+     *  
125
+     * @param string $name
126
+     * @return IniHelper_Section
127
+     */
128 128
     public function addSection(string $name) : IniHelper_Section
129 129
     {
130 130
         if(!isset($this->sections[$name])) {
@@ -134,12 +134,12 @@  discard block
 block discarded – undo
134 134
         return $this->sections[$name];
135 135
     }
136 136
     
137
-   /**
138
-    * Retrieves a section by its name, if it exists.
139
-    * 
140
-    * @param string $name
141
-    * @return IniHelper_Section|NULL
142
-    */
137
+    /**
138
+     * Retrieves a section by its name, if it exists.
139
+     * 
140
+     * @param string $name
141
+     * @return IniHelper_Section|NULL
142
+     */
143 143
     public function getSection(string $name) : ?IniHelper_Section
144 144
     {
145 145
         if(isset($this->sections[$name])) {
@@ -149,11 +149,11 @@  discard block
 block discarded – undo
149 149
         return null;
150 150
     }
151 151
     
152
-   /**
153
-    * Gets the data from the INI file as an associative array.
154
-    * 
155
-    * @return array
156
-    */
152
+    /**
153
+     * Gets the data from the INI file as an associative array.
154
+     * 
155
+     * @return array
156
+     */
157 157
     public function toArray() : array
158 158
     {
159 159
         $result = array();
@@ -173,17 +173,17 @@  discard block
 block discarded – undo
173 173
         return $result;
174 174
     }
175 175
     
176
-   /**
177
-    * Saves the INI content to the target file.
178
-    * 
179
-    * @param string $filePath
180
-    * @return IniHelper
181
-    * @throws FileHelper_Exception
182
-    * 
183
-    * @see FileHelper::ERROR_SAVE_FOLDER_NOT_WRITABLE
184
-    * @see FileHelper::ERROR_SAVE_FILE_NOT_WRITABLE
185
-    * @see FileHelper::ERROR_SAVE_FILE_WRITE_FAILED
186
-    */
176
+    /**
177
+     * Saves the INI content to the target file.
178
+     * 
179
+     * @param string $filePath
180
+     * @return IniHelper
181
+     * @throws FileHelper_Exception
182
+     * 
183
+     * @see FileHelper::ERROR_SAVE_FOLDER_NOT_WRITABLE
184
+     * @see FileHelper::ERROR_SAVE_FILE_NOT_WRITABLE
185
+     * @see FileHelper::ERROR_SAVE_FILE_WRITE_FAILED
186
+     */
187 187
     public function saveToFile(string $filePath) : IniHelper
188 188
     {
189 189
         FileHelper::saveFile($filePath, $this->saveToString());
@@ -191,11 +191,11 @@  discard block
 block discarded – undo
191 191
         return $this;
192 192
     }
193 193
     
194
-   /**
195
-    * Returns the INI content as string.
196
-    * 
197
-    * @return string
198
-    */
194
+    /**
195
+     * Returns the INI content as string.
196
+     * 
197
+     * @return string
198
+     */
199 199
     public function saveToString() : string
200 200
     {
201 201
         $parts = array();
@@ -208,15 +208,15 @@  discard block
 block discarded – undo
208 208
         return implode($this->eol, $parts);
209 209
     }
210 210
     
211
-   /**
212
-    * Sets or adds the value of a setting in the INI content.
213
-    * If the setting does not exist, it is added. Otherwise,
214
-    * the existing value is overwritten.
215
-    * 
216
-    * @param string $path A variable path, either <code>varname</code> or <code>section.varname</code>.
217
-    * @param mixed $value
218
-    * @return IniHelper
219
-    */
211
+    /**
212
+     * Sets or adds the value of a setting in the INI content.
213
+     * If the setting does not exist, it is added. Otherwise,
214
+     * the existing value is overwritten.
215
+     * 
216
+     * @param string $path A variable path, either <code>varname</code> or <code>section.varname</code>.
217
+     * @param mixed $value
218
+     * @return IniHelper
219
+     */
220 220
     public function setValue(string $path, $value) : IniHelper
221 221
     {
222 222
         $path = $this->parsePath($path);
@@ -235,12 +235,12 @@  discard block
 block discarded – undo
235 235
         return $this;
236 236
     }
237 237
     
238
-   /**
239
-    * Checks whether a section with the specified name exists.
240
-    * 
241
-    * @param string $name
242
-    * @return bool
243
-    */
238
+    /**
239
+     * Checks whether a section with the specified name exists.
240
+     * 
241
+     * @param string $name
242
+     * @return bool
243
+     */
244 244
     public function sectionExists(string $name) : bool
245 245
     {
246 246
         foreach($this->sections as $section) {
@@ -252,23 +252,23 @@  discard block
 block discarded – undo
252 252
         return false;
253 253
     }
254 254
     
255
-   /**
256
-    * Retrieves the default section, which is used to add
257
-    * values in the root of the document.
258
-    * 
259
-    * @return IniHelper_Section
260
-    */
255
+    /**
256
+     * Retrieves the default section, which is used to add
257
+     * values in the root of the document.
258
+     * 
259
+     * @return IniHelper_Section
260
+     */
261 261
     public function getDefaultSection() : IniHelper_Section
262 262
     {
263 263
         return $this->addSection(self::SECTION_DEFAULT);
264 264
     }
265 265
     
266
-   /**
267
-    * Retrieves all variable lines for the specified path.
268
-    * 
269
-    * @param string $path A variable path. Either <code>varname</code> or <code>section.varname</code>.
270
-    * @return array|\AppUtils\IniHelper_Line[]
271
-    */
266
+    /**
267
+     * Retrieves all variable lines for the specified path.
268
+     * 
269
+     * @param string $path A variable path. Either <code>varname</code> or <code>section.varname</code>.
270
+     * @return array|\AppUtils\IniHelper_Line[]
271
+     */
272 272
     public function getLinesByVariable(string $path)
273 273
     {
274 274
         $path = $this->parsePath($path);
Please login to merge, or discard this patch.
src/JSHelper.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -159,8 +159,7 @@  discard block
 block discarded – undo
159 159
             if($hash === true) 
160 160
             { 
161 161
                 $hash = 'true'; 
162
-            } 
163
-            else if($hash === false) 
162
+            } else if($hash === false) 
164 163
             { 
165 164
                 $hash = 'false'; 
166 165
             }
@@ -184,8 +183,7 @@  discard block
 block discarded – undo
184 183
                 if($string === false) 
185 184
                 {
186 185
                     $string = '';
187
-                } 
188
-                else if($quoteStyle === self::QUOTE_STYLE_SINGLE) 
186
+                } else if($quoteStyle === self::QUOTE_STYLE_SINGLE) 
189 187
                 {
190 188
                     $string = mb_substr($string, 1, mb_strlen($string)-2);
191 189
                     $string = "'".str_replace("'", "\'", $string)."'";
Please login to merge, or discard this patch.
Indentation   +85 added lines, -85 removed lines patch added patch discarded remove patch
@@ -29,28 +29,28 @@  discard block
 block discarded – undo
29 29
     public const QUOTE_STYLE_SINGLE = 1;
30 30
     public const QUOTE_STYLE_DOUBLE = 2;
31 31
 
32
-   /**
33
-    * @var array<string,string>
34
-    */
32
+    /**
33
+     * @var array<string,string>
34
+     */
35 35
     protected static array $variableCache = array();
36 36
     protected static int $elementCounter = 0;
37 37
     protected static string $idPrefix = 'E';
38 38
     
39
-   /**
40
-    * Builds a javascript statement. The first parameter is the
41
-    * javascript function to call, any additional parameters are
42
-    * used as arguments for the javascript function call. Variable
43
-    * types are automagically converted to the javascript equivalents.
44
-    *
45
-    * Examples:
46
-    *
47
-    * // add an alert(); statement:
48
-    * JSHelper::buildStatement('alert');
49
-    *
50
-    * // add an alert('Alert text'); statement
51
-    * JSHelper::buildStatement('alert', 'Alert text');
52
-    *
53
-    */
39
+    /**
40
+     * Builds a javascript statement. The first parameter is the
41
+     * javascript function to call, any additional parameters are
42
+     * used as arguments for the javascript function call. Variable
43
+     * types are automagically converted to the javascript equivalents.
44
+     *
45
+     * Examples:
46
+     *
47
+     * // add an alert(); statement:
48
+     * JSHelper::buildStatement('alert');
49
+     *
50
+     * // add an alert('Alert text'); statement
51
+     * JSHelper::buildStatement('alert', 'Alert text');
52
+     *
53
+     */
54 54
     public static function buildStatement() : string
55 55
     {
56 56
         $args = func_get_args();
@@ -58,13 +58,13 @@  discard block
 block discarded – undo
58 58
         return call_user_func_array(array(self::class, 'buildStatementQuoteStyle'), $args);
59 59
     }
60 60
     
61
-   /**
62
-    * Like {@link JSHelper::buildStatement()}, but using single quotes
63
-    * to make it possible to use the statement in an HTML tag attribute.
64
-    * 
65
-    * @return string
66
-    * @see JSHelper::buildStatement()
67
-    */
61
+    /**
62
+     * Like {@link JSHelper::buildStatement()}, but using single quotes
63
+     * to make it possible to use the statement in an HTML tag attribute.
64
+     * 
65
+     * @return string
66
+     * @see JSHelper::buildStatement()
67
+     */
68 68
     public static function buildStatementAttribute() : string
69 69
     {
70 70
         $args = func_get_args();
@@ -94,39 +94,39 @@  discard block
 block discarded – undo
94 94
         return $call . ');';
95 95
     }
96 96
 
97
-   /**
98
-    * Builds a set variable statement. The variable value is
99
-    * automatically converted to the javascript equivalent.
100
-    *
101
-    * Examples:
102
-    *
103
-    * // foo = 'bar';
104
-    * JSHelper::buildVariable('foo', 'bar');
105
-    *
106
-    * // foo = 42;
107
-    * JSHelper::buildVariable('foo', 42);
108
-    *
109
-    * // foo = true;
110
-    * JSHelper::buildVariable('foo', true);
111
-    *
112
-    * @param string $varName
113
-    * @param mixed $varValue
114
-    * @return string
115
-    */
97
+    /**
98
+     * Builds a set variable statement. The variable value is
99
+     * automatically converted to the javascript equivalent.
100
+     *
101
+     * Examples:
102
+     *
103
+     * // foo = 'bar';
104
+     * JSHelper::buildVariable('foo', 'bar');
105
+     *
106
+     * // foo = 42;
107
+     * JSHelper::buildVariable('foo', 42);
108
+     *
109
+     * // foo = true;
110
+     * JSHelper::buildVariable('foo', true);
111
+     *
112
+     * @param string $varName
113
+     * @param mixed $varValue
114
+     * @return string
115
+     */
116 116
     public static function buildVariable(string $varName, $varValue) : string
117 117
     {
118 118
         return $varName . "=" . self::phpVariable2JS($varValue) . ';';
119 119
     }
120 120
     
121
-   /**
122
-    * Converts a PHP variable to its javascript equivalent. Note that
123
-    * if a variable cannot be converted (like a PHP resource), this will
124
-    * return a javascript "null".
125
-    *
126
-    * @param mixed $variable
127
-    * @param int $quoteStyle The quote style to use for strings
128
-    * @return string
129
-    */
121
+    /**
122
+     * Converts a PHP variable to its javascript equivalent. Note that
123
+     * if a variable cannot be converted (like a PHP resource), this will
124
+     * return a javascript "null".
125
+     *
126
+     * @param mixed $variable
127
+     * @param int $quoteStyle The quote style to use for strings
128
+     * @return string
129
+     */
130 130
     public static function phpVariable2JS($variable, int $quoteStyle=self::QUOTE_STYLE_DOUBLE) : string
131 131
     {
132 132
         // after much profiling, this variant of the method offers
@@ -204,26 +204,26 @@  discard block
 block discarded – undo
204 204
         return $result;
205 205
     }
206 206
     
207
-   /**
208
-    * Converts a variable to a JS string that can be 
209
-    * used in an HTML attribute: it uses single quotes
210
-    * instead of the default double quotes.
211
-    * 
212
-    * @param mixed $variable
213
-    * @return string
214
-    */
207
+    /**
208
+     * Converts a variable to a JS string that can be 
209
+     * used in an HTML attribute: it uses single quotes
210
+     * instead of the default double quotes.
211
+     * 
212
+     * @param mixed $variable
213
+     * @return string
214
+     */
215 215
     public static function phpVariable2AttributeJS($variable) : string
216 216
     {
217 217
         return self::phpVariable2JS($variable, self::QUOTE_STYLE_SINGLE);
218 218
     }
219 219
 
220
-   /**
221
-    * Generates a dynamic element ID to be used with dynamically generated
222
-    * HTML code to tie in with clientside javascript when compact but unique
223
-    * IDs are needed in a  request.
224
-    *
225
-    * @return string
226
-    */
220
+    /**
221
+     * Generates a dynamic element ID to be used with dynamically generated
222
+     * HTML code to tie in with clientside javascript when compact but unique
223
+     * IDs are needed in a  request.
224
+     *
225
+     * @return string
226
+     */
227 227
     public static function nextElementID() : string
228 228
     {
229 229
         self::$elementCounter++;
@@ -231,33 +231,33 @@  discard block
 block discarded – undo
231 231
         return self::$idPrefix . self::$elementCounter;
232 232
     }
233 233
     
234
-   /**
235
-    * Retrieves the ID prefix currently used.
236
-    * 
237
-    * @return string
238
-    */
234
+    /**
235
+     * Retrieves the ID prefix currently used.
236
+     * 
237
+     * @return string
238
+     */
239 239
     public static function getIDPrefix() : string
240 240
     {
241 241
         return self::$idPrefix;
242 242
     }
243 243
     
244
-   /**
245
-    * Retrieves the value of the internal elements counter.
246
-    * 
247
-    * @return integer
248
-    */
244
+    /**
245
+     * Retrieves the value of the internal elements counter.
246
+     * 
247
+     * @return integer
248
+     */
249 249
     public static function getElementCounter() : int
250 250
     {
251 251
         return self::$elementCounter;
252 252
     }
253 253
     
254
-   /**
255
-    * Sets the prefix that is added in front of all IDs
256
-    * retrieved using the {@link nextElementID()} method.
257
-    * 
258
-    * @param string $prefix
259
-    * @see JSHelper::nextElementID()
260
-    */
254
+    /**
255
+     * Sets the prefix that is added in front of all IDs
256
+     * retrieved using the {@link nextElementID()} method.
257
+     * 
258
+     * @param string $prefix
259
+     * @see JSHelper::nextElementID()
260
+     */
261 261
     public static function setIDPrefix(string $prefix) : void
262 262
     {
263 263
         self::$idPrefix = $prefix;
Please login to merge, or discard this patch.
src/PaginationHelper.php 2 patches
Indentation   +115 added lines, -115 removed lines patch added patch discarded remove patch
@@ -24,56 +24,56 @@  discard block
 block discarded – undo
24 24
  */
25 25
 class PaginationHelper
26 26
 {
27
-   /**
28
-    * @var int
29
-    */
27
+    /**
28
+     * @var int
29
+     */
30 30
     protected $total;
31 31
     
32
-   /**
33
-    * @var int
34
-    */
32
+    /**
33
+     * @var int
34
+     */
35 35
     protected $perPage;
36 36
     
37
-   /**
38
-    * @var int
39
-    */
37
+    /**
38
+     * @var int
39
+     */
40 40
     protected $current;
41 41
     
42
-   /**
43
-    * @var int
44
-    */
42
+    /**
43
+     * @var int
44
+     */
45 45
     protected $next = 0;
46 46
     
47
-   /**
48
-    * @var int
49
-    */
47
+    /**
48
+     * @var int
49
+     */
50 50
     protected $prev = 0;
51 51
     
52
-   /**
53
-    * @var int
54
-    */
52
+    /**
53
+     * @var int
54
+     */
55 55
     protected $last = 0; 
56 56
     
57
-   /**
58
-    * @var int
59
-    */
57
+    /**
58
+     * @var int
59
+     */
60 60
     protected $adjacentPages = 3;
61 61
     
62
-   /**
63
-    * @var int
64
-    */
62
+    /**
63
+     * @var int
64
+     */
65 65
     protected $offsetEnd = 0;
66 66
     
67
-   /**
68
-    * @var int
69
-    */
67
+    /**
68
+     * @var int
69
+     */
70 70
     protected $offsetStart = 0;
71 71
     
72
-   /**
73
-    * @param int $totalItems The total amount of items available.
74
-    * @param int $itemsPerPage How many items to display per page.
75
-    * @param int $currentPage The current page number (1-based)
76
-    */
72
+    /**
73
+     * @param int $totalItems The total amount of items available.
74
+     * @param int $itemsPerPage How many items to display per page.
75
+     * @param int $currentPage The current page number (1-based)
76
+     */
77 77
     public function __construct(int $totalItems, int $itemsPerPage, int $currentPage)
78 78
     {
79 79
         $this->total = $totalItems;
@@ -83,34 +83,34 @@  discard block
 block discarded – undo
83 83
         $this->calculate();
84 84
     }
85 85
     
86
-   /**
87
-    * Sets the amount of adjacent pages to display next to the
88
-    * current one when using the pages list.
89
-    *
90
-    * @param int $amount
91
-    * @return PaginationHelper
92
-    */
86
+    /**
87
+     * Sets the amount of adjacent pages to display next to the
88
+     * current one when using the pages list.
89
+     *
90
+     * @param int $amount
91
+     * @return PaginationHelper
92
+     */
93 93
     public function setAdjacentPages(int $amount) : PaginationHelper
94 94
     {
95 95
         $this->adjacentPages = $amount;
96 96
         return $this;
97 97
     }
98 98
     
99
-   /**
100
-    * Whether there is a next page after the current page.
101
-    * @return bool
102
-    */
99
+    /**
100
+     * Whether there is a next page after the current page.
101
+     * @return bool
102
+     */
103 103
     public function hasNextPage() : bool
104 104
     {
105 105
         return $this->next > 0;
106 106
     }
107 107
     
108
-   /**
109
-    * The next page number. Returns the last page
110
-    * number if there is no next page.
111
-    *  
112
-    * @return int
113
-    */
108
+    /**
109
+     * The next page number. Returns the last page
110
+     * number if there is no next page.
111
+     *  
112
+     * @return int
113
+     */
114 114
     public function getNextPage() : int
115 115
     {
116 116
         if($this->next === 0) {
@@ -120,21 +120,21 @@  discard block
 block discarded – undo
120 120
         return $this->next;
121 121
     }
122 122
     
123
-   /**
124
-    * Whether there is a previous page before the current page.
125
-    * @return bool
126
-    */
123
+    /**
124
+     * Whether there is a previous page before the current page.
125
+     * @return bool
126
+     */
127 127
     public function hasPreviousPage() : bool
128 128
     {
129 129
         return $this->prev > 0;
130 130
     }
131 131
     
132
-   /**
133
-    * The previous page number. Returns the first page
134
-    * number if there is no previous page.
135
-    * 
136
-    * @return int
137
-    */
132
+    /**
133
+     * The previous page number. Returns the first page
134
+     * number if there is no previous page.
135
+     * 
136
+     * @return int
137
+     */
138 138
     public function getPreviousPage() : int
139 139
     {
140 140
         if($this->prev === 0) {
@@ -144,21 +144,21 @@  discard block
 block discarded – undo
144 144
         return $this->prev;
145 145
     }
146 146
     
147
-   /**
148
-    * Retrieves the last page number.
149
-    * @return int
150
-    */
147
+    /**
148
+     * Retrieves the last page number.
149
+     * @return int
150
+     */
151 151
     public function getLastPage() : int
152 152
     {
153 153
         return $this->last;
154 154
     }
155 155
     
156
-   /**
157
-    * Whether there is more than one page, i.e. whether
158
-    * pagination is required at all.
159
-    *  
160
-    * @return bool
161
-    */
156
+    /**
157
+     * Whether there is more than one page, i.e. whether
158
+     * pagination is required at all.
159
+     *  
160
+     * @return bool
161
+     */
162 162
     public function hasPages() : bool
163 163
     {
164 164
         return $this->last > 1;
@@ -169,12 +169,12 @@  discard block
 block discarded – undo
169 169
         return $this->current;
170 170
     }
171 171
     
172
-   /**
173
-    * Retrieves a list of page numbers for a page
174
-    * navigator, to quickly jump between pages.
175
-    *
176
-    * @return int[]
177
-    */
172
+    /**
173
+     * Retrieves a list of page numbers for a page
174
+     * navigator, to quickly jump between pages.
175
+     *
176
+     * @return int[]
177
+     */
178 178
     public function getPageNumbers() : array
179 179
     {
180 180
         $adjacent = $this->adjacentPages;
@@ -250,66 +250,66 @@  discard block
 block discarded – undo
250 250
         return $numbers;
251 251
     }
252 252
     
253
-   /**
254
-    * Whether the specified page number is the current page.
255
-    * 
256
-    * @param int $pageNumber
257
-    * @return bool
258
-    */
253
+    /**
254
+     * Whether the specified page number is the current page.
255
+     * 
256
+     * @param int $pageNumber
257
+     * @return bool
258
+     */
259 259
     public function isCurrentPage(int $pageNumber) : bool
260 260
     {
261 261
         return $pageNumber === $this->current;
262 262
     }
263 263
     
264
-   /**
265
-    * Retrieves the 1-based starting offset of
266
-    * items currently displayed in the page.
267
-    * 
268
-    * Note: Use this to create a text like 
269
-    * "showing entries x to y".
270
-    * 
271
-    * @return int
272
-    * @see PaginationHelper::getOffsetEnd()
273
-    */
264
+    /**
265
+     * Retrieves the 1-based starting offset of
266
+     * items currently displayed in the page.
267
+     * 
268
+     * Note: Use this to create a text like 
269
+     * "showing entries x to y".
270
+     * 
271
+     * @return int
272
+     * @see PaginationHelper::getOffsetEnd()
273
+     */
274 274
     public function getItemsStart() : int
275 275
     {
276 276
         return $this->getOffsetStart() + 1;
277 277
     }
278 278
 
279
-   /**
280
-    * Retrieves the 1-based ending offset of
281
-    * items currently displayed in the page.
282
-    * 
283
-    * Note: Use this to create a text like 
284
-    * "showing entries x to y".
285
-    * 
286
-    * @return int
287
-    * @see PaginationHelper::getOffsetStart()
288
-    */
279
+    /**
280
+     * Retrieves the 1-based ending offset of
281
+     * items currently displayed in the page.
282
+     * 
283
+     * Note: Use this to create a text like 
284
+     * "showing entries x to y".
285
+     * 
286
+     * @return int
287
+     * @see PaginationHelper::getOffsetStart()
288
+     */
289 289
     public function getItemsEnd() : int
290 290
     {
291 291
         return $this->getOffsetEnd() + 1;
292 292
     }
293 293
     
294
-   /**
295
-    * Retrieves the 0-based starting offset of
296
-    * items currently displayed in the page.
297
-    * 
298
-    * @return int
299
-    * @see PaginationHelper::getItemsStart()
300
-    */
294
+    /**
295
+     * Retrieves the 0-based starting offset of
296
+     * items currently displayed in the page.
297
+     * 
298
+     * @return int
299
+     * @see PaginationHelper::getItemsStart()
300
+     */
301 301
     public function getOffsetStart() : int
302 302
     {
303 303
         return $this->offsetStart;
304 304
     }
305 305
     
306
-   /**
307
-    * Retrieves the 0-based ending offset of
308
-    * items currently displayed in the page.
309
-    * 
310
-    * @return int
311
-    * @see PaginationHelper::getItemsEnd()
312
-    */
306
+    /**
307
+     * Retrieves the 0-based ending offset of
308
+     * items currently displayed in the page.
309
+     * 
310
+     * @return int
311
+     * @see PaginationHelper::getItemsEnd()
312
+     */
313 313
     public function getOffsetEnd() : int
314 314
     {
315 315
         return $this->offsetEnd;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -322,8 +322,7 @@
 block discarded – undo
322 322
         if($this->current < 1)
323 323
         {
324 324
             $this->current = 1;
325
-        }
326
-        else if($this->current > $pages)
325
+        } else if($this->current > $pages)
327 326
         {
328 327
             $this->current = $pages;
329 328
         }
Please login to merge, or discard this patch.
src/SVNHelper/Target.php 2 patches
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -76,10 +76,10 @@  discard block
 block discarded – undo
76 76
         return $this instanceof SVNHelper_Target_Folder;
77 77
     }
78 78
     
79
-   /**
80
-    * Runs an update of the file or folder.
81
-    * @return SVNHelper_Command_Update
82
-    */
79
+    /**
80
+     * Runs an update of the file or folder.
81
+     * @return SVNHelper_Command_Update
82
+     */
83 83
     public function runUpdate()
84 84
     {
85 85
         $cmd = $this->createUpdate();
@@ -88,55 +88,55 @@  discard block
 block discarded – undo
88 88
         return $cmd;
89 89
     }
90 90
     
91
-   /**
92
-    * Creates an update command instance for the target file or folder.
93
-    * @return SVNHelper_Command_Update
94
-    */
91
+    /**
92
+     * Creates an update command instance for the target file or folder.
93
+     * @return SVNHelper_Command_Update
94
+     */
95 95
     public function createUpdate()
96 96
     {
97 97
         return $this->helper->createUpdate($this);
98 98
     }
99 99
     
100
-   /**
101
-    * Creates a status command instance for the target file or folder.
102
-    * @return SVNHelper_Command_Status
103
-    */
100
+    /**
101
+     * Creates a status command instance for the target file or folder.
102
+     * @return SVNHelper_Command_Status
103
+     */
104 104
     public function createStatus()
105 105
     {
106 106
         return $this->helper->createStatus($this);
107 107
     }
108 108
     
109
-   /**
110
-    * Creates an info command instance for the target file or folder.
111
-    * @return SVNHelper_Command_Info
112
-    */
109
+    /**
110
+     * Creates an info command instance for the target file or folder.
111
+     * @return SVNHelper_Command_Info
112
+     */
113 113
     public function createInfo()
114 114
     {
115 115
         return $this->helper->createInfo($this);
116 116
     }
117 117
     
118
-   /**
119
-    * Creates a commit command instance for the target file or folder.
120
-    * @param string $message
121
-    * @return SVNHelper_Command_Commit
122
-    */
118
+    /**
119
+     * Creates a commit command instance for the target file or folder.
120
+     * @param string $message
121
+     * @return SVNHelper_Command_Commit
122
+     */
123 123
     public function createCommit($message)
124 124
     {
125 125
         return $this->helper->createCommit($this, $message);
126 126
     }
127 127
 
128
-   /**
129
-    * Creates an add command instance for the target file or folder.
130
-    * @return SVNHelper_Command_Add
131
-    */
128
+    /**
129
+     * Creates an add command instance for the target file or folder.
130
+     * @return SVNHelper_Command_Add
131
+     */
132 132
     public function createAdd()
133 133
     {
134 134
         return $this->helper->createAdd($this);
135 135
     }
136 136
     
137
-   /**
138
-    * @return SVNHelper_Command_Status
139
-    */
137
+    /**
138
+     * @return SVNHelper_Command_Status
139
+     */
140 140
     public function getStatus()
141 141
     {
142 142
         $cmd = $this->createStatus();
@@ -154,10 +154,10 @@  discard block
 block discarded – undo
154 154
         return $this;
155 155
     }
156 156
     
157
-   /**
158
-    * Whether the target is versioned or needs to be added.
159
-    * @return boolean
160
-    */
157
+    /**
158
+     * Whether the target is versioned or needs to be added.
159
+     * @return boolean
160
+     */
161 161
     public function isVersioned()
162 162
     {
163 163
         return $this->getInfo()->isVersioned();
@@ -170,10 +170,10 @@  discard block
 block discarded – undo
170 170
         $this->cache = array();
171 171
     }
172 172
     
173
-   /**
174
-    * Retrieves information on the target.
175
-    * @return SVNHelper_Command_Info
176
-    */
173
+    /**
174
+     * Retrieves information on the target.
175
+     * @return SVNHelper_Command_Info
176
+     */
177 177
     public function getInfo()
178 178
     {
179 179
         if(!isset($this->cache['info'])) {
@@ -183,15 +183,15 @@  discard block
 block discarded – undo
183 183
         return $this->cache['info'];
184 184
     }
185 185
     
186
-   /**
187
-    * Commits the target file or folder. If it has
188
-    * not been added to the repository yet, it is 
189
-    * added automatically beforehand. If it does
190
-    * not need to be committed, no changes are made.
191
-    * 
192
-    * @param string $message
193
-    * @return SVNHelper_Target
194
-    */
186
+    /**
187
+     * Commits the target file or folder. If it has
188
+     * not been added to the repository yet, it is 
189
+     * added automatically beforehand. If it does
190
+     * not need to be committed, no changes are made.
191
+     * 
192
+     * @param string $message
193
+     * @return SVNHelper_Target
194
+     */
195 195
     public function runCommit($message)
196 196
     {
197 197
         if(!$this->isVersioned()) {
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -202,8 +202,7 @@
 block discarded – undo
202 202
         if(!$this->isCommitted()) {
203 203
             $this->createCommit($message)->execute();
204 204
             $this->clearCache();
205
-        }
206
-        else 
205
+        } else 
207 206
         {
208 207
             $this->log('Already committed, nothing to do.');
209 208
         }
Please login to merge, or discard this patch.
src/SVNHelper/Command/Info.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,12 +44,12 @@
 block discarded – undo
44 44
         return $result;
45 45
     }
46 46
     
47
-   /**
48
-    * Whether the file or folder has already been committed
49
-    * and has no pending changes.
50
-    * 
51
-    * @return boolean
52
-    */
47
+    /**
48
+     * Whether the file or folder has already been committed
49
+     * and has no pending changes.
50
+     * 
51
+     * @return boolean
52
+     */
53 53
     public function isCommitted()
54 54
     {
55 55
         $status = $this->target->getStatus();
Please login to merge, or discard this patch.
src/SVNHelper/Command/Update.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -28,17 +28,17 @@  discard block
 block discarded – undo
28 28
         return $result;
29 29
     }
30 30
     
31
-   /**
32
-    * @var SVNHelper_Command_Update_Status[]
33
-    */
31
+    /**
32
+     * @var SVNHelper_Command_Update_Status[]
33
+     */
34 34
     protected $stati;
35 35
     
36 36
     protected $revision;
37 37
     
38
-   /**
39
-    * Parses the command output to find out which files have been modified, and how.
40
-    * @param SVNHelper_CommandResult $result
41
-    */
38
+    /**
39
+     * Parses the command output to find out which files have been modified, and how.
40
+     * @param SVNHelper_CommandResult $result
41
+     */
42 42
     protected function parseResult(SVNHelper_CommandResult $result)
43 43
     {
44 44
         $this->stati = array();
@@ -119,11 +119,11 @@  discard block
 block discarded – undo
119 119
         return $this->getByStatus('a');
120 120
     }
121 121
     
122
-   /**
123
-    * Whether there were files with the specified status code.
124
-    * @param string $status
125
-    * @return boolean
126
-    */
122
+    /**
123
+     * Whether there were files with the specified status code.
124
+     * @param string $status
125
+     * @return boolean
126
+     */
127 127
     protected function hasStatus($status)
128 128
     {
129 129
         $this->execute();
Please login to merge, or discard this patch.
src/SVNHelper/Command/Status.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@
 block discarded – undo
58 58
         if(empty($lines)) 
59 59
         {
60 60
             $this->status = self::STATUS_NOT_MODIFIED;
61
-        }
62
-        else 
61
+        } else 
63 62
         {
64 63
             $this->status = self::STATUS_UNKNOWN;
65 64
             
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
     
25 25
     public const STATUS_FILETYPE_CHANGE = 'filetype-change';
26 26
     
27
-   /**
28
-    * @var array
29
-    * @see http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.status.html
30
-    */
27
+    /**
28
+     * @var array
29
+     * @see http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.status.html
30
+     */
31 31
     protected static $knownStati = array(
32 32
         'a' => self::STATUS_ADD,
33 33
         'd' => self::STATUS_DELETE,
@@ -40,9 +40,9 @@  discard block
 block discarded – undo
40 40
         '~' => self::STATUS_FILETYPE_CHANGE,
41 41
     );
42 42
     
43
-   /**
44
-    * @var string
45
-    */
43
+    /**
44
+     * @var string
45
+     */
46 46
     protected $status;
47 47
     
48 48
     protected function _execute()
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             
66 66
             $svnStatusCode = strtolower(substr($lines[0], 0, 1));
67 67
             if(isset(self::$knownStati[$svnStatusCode])) {
68
-               $this->status = self::$knownStati[$svnStatusCode];
68
+                $this->status = self::$knownStati[$svnStatusCode];
69 69
             }
70 70
         }
71 71
         
Please login to merge, or discard this patch.
src/ConvertHelper/ThrowableInfo/Call.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,8 +65,7 @@  discard block
 block discarded – undo
65 65
         if(isset($data['serialized'])) 
66 66
         {
67 67
             $this->parseSerialized($data['serialized']);
68
-        }
69
-        else
68
+        } else
70 69
         {
71 70
             $this->parseTrace($data['trace']);
72 71
             $this->position = $data['position'];
@@ -75,8 +74,7 @@  discard block
 block discarded – undo
75 74
         if($this->hasClass()) 
76 75
         {
77 76
             $this->type = self::TYPE_METHOD_CALL;
78
-        }
79
-        else if($this->hasFunction()) 
77
+        } else if($this->hasFunction()) 
80 78
         {
81 79
             $this->type = self::TYPE_FUNCTION_CALL;
82 80
         }
Please login to merge, or discard this patch.
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -10,45 +10,45 @@  discard block
 block discarded – undo
10 10
     public const TYPE_METHOD_CALL = 'method';
11 11
     public const TYPE_SCRIPT_START = 'start';
12 12
     
13
-   /**
14
-    * @var ConvertHelper_ThrowableInfo
15
-    */
13
+    /**
14
+     * @var ConvertHelper_ThrowableInfo
15
+     */
16 16
     protected $info;
17 17
     
18
-   /**
19
-    * @var VariableInfo[]
20
-    */
18
+    /**
19
+     * @var VariableInfo[]
20
+     */
21 21
     protected $args = array();
22 22
     
23
-   /**
24
-    * The source file, if any
25
-    * @var string
26
-    */
23
+    /**
24
+     * The source file, if any
25
+     * @var string
26
+     */
27 27
     protected $file = '';
28 28
     
29
-   /**
30
-    * @var string
31
-    */
29
+    /**
30
+     * @var string
31
+     */
32 32
     protected $class = '';
33 33
     
34
-   /**
35
-    * @var integer
36
-    */
34
+    /**
35
+     * @var integer
36
+     */
37 37
     protected $line = 0;
38 38
     
39
-   /**
40
-    * @var int
41
-    */
39
+    /**
40
+     * @var int
41
+     */
42 42
     protected $position = 1;
43 43
     
44
-   /**
45
-    * @var string
46
-    */
44
+    /**
45
+     * @var string
46
+     */
47 47
     protected $function = '';
48 48
     
49
-   /**
50
-    * @var string
51
-    */
49
+    /**
50
+     * @var string
51
+     */
52 52
     protected $type = self::TYPE_SCRIPT_START;
53 53
 
54 54
     /**
@@ -79,10 +79,10 @@  discard block
 block discarded – undo
79 79
         }
80 80
     }
81 81
     
82
-   /**
83
-    * 1-based position of the call in the calls list.
84
-    * @return int
85
-    */
82
+    /**
83
+     * 1-based position of the call in the calls list.
84
+     * @return int
85
+     */
86 86
     public function getPosition() : int
87 87
     {
88 88
         return $this->position;
@@ -93,18 +93,18 @@  discard block
 block discarded – undo
93 93
         return $this->line;
94 94
     }
95 95
     
96
-   /**
97
-    * Whether the call had any arguments.
98
-    * @return bool
99
-    */
96
+    /**
97
+     * Whether the call had any arguments.
98
+     * @return bool
99
+     */
100 100
     public function hasArguments() : bool
101 101
     {
102 102
         return !empty($this->args);
103 103
     }
104 104
     
105
-   /**
106
-    * @return VariableInfo[]
107
-    */
105
+    /**
106
+     * @return VariableInfo[]
107
+     */
108 108
     public function getArguments()
109 109
     {
110 110
         return $this->args;
@@ -244,31 +244,31 @@  discard block
 block discarded – undo
244 244
         return implode(', ', $tokens); 
245 245
     }
246 246
     
247
-   /**
248
-    * Retrieves the type of call: typically a function
249
-    * call, or a method call of an object. Note that the
250
-    * first call in a script does not have either.
251
-    * 
252
-    * @return string
253
-    * 
254
-    * @see ConvertHelper_ThrowableInfo_Call::TYPE_FUNCTION_CALL
255
-    * @see ConvertHelper_ThrowableInfo_Call::TYPE_METHOD_CALL
256
-    * @see ConvertHelper_ThrowableInfo_Call::TYPE_SCRIPT_START
257
-    * @see ConvertHelper_ThrowableInfo_Call::hasFunction()
258
-    * @see ConvertHelper_ThrowableInfo_Call::hasClass()
259
-    */
247
+    /**
248
+     * Retrieves the type of call: typically a function
249
+     * call, or a method call of an object. Note that the
250
+     * first call in a script does not have either.
251
+     * 
252
+     * @return string
253
+     * 
254
+     * @see ConvertHelper_ThrowableInfo_Call::TYPE_FUNCTION_CALL
255
+     * @see ConvertHelper_ThrowableInfo_Call::TYPE_METHOD_CALL
256
+     * @see ConvertHelper_ThrowableInfo_Call::TYPE_SCRIPT_START
257
+     * @see ConvertHelper_ThrowableInfo_Call::hasFunction()
258
+     * @see ConvertHelper_ThrowableInfo_Call::hasClass()
259
+     */
260 260
     public function getType() : string
261 261
     {
262 262
         return $this->type;
263 263
     }
264 264
      
265
-   /**
266
-    * Serializes the call to an array, with all
267
-    * necessary information. Can be used to restore
268
-    * the call later using {@link ConvertHelper_ThrowableInfo_Call::fromSerialized()}.
269
-    * 
270
-    * @return array<string,mixed>
271
-    */
265
+    /**
266
+     * Serializes the call to an array, with all
267
+     * necessary information. Can be used to restore
268
+     * the call later using {@link ConvertHelper_ThrowableInfo_Call::fromSerialized()}.
269
+     * 
270
+     * @return array<string,mixed>
271
+     */
272 272
     public function serialize() : array
273 273
     {
274 274
         $result = array(
Please login to merge, or discard this patch.
src/ConvertHelper/StringMatch.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -33,19 +33,19 @@
 block discarded – undo
33 33
         $this->match = $matchedString;
34 34
     }
35 35
     
36
-   /**
37
-    * The zero-based start position of the string in the haystack.
38
-    * @return int
39
-    */
36
+    /**
37
+     * The zero-based start position of the string in the haystack.
38
+     * @return int
39
+     */
40 40
     public function getPosition() : int
41 41
     {
42 42
         return $this->position;
43 43
     }
44 44
     
45
-   /**
46
-    * The exact string that was matched, respecting the case as found in needle.
47
-    * @return string
48
-    */
45
+    /**
46
+     * The exact string that was matched, respecting the case as found in needle.
47
+     * @return string
48
+     */
49 49
     public function getMatchedString() : string
50 50
     {
51 51
         return $this->match;
Please login to merge, or discard this patch.