Passed
Push — master ( aecd40...074997 )
by Sebastian
10:13 queued 07:17
created
src/SVNHelper/Command/Update.php 2 patches
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.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -10,13 +10,13 @@  discard block
 block discarded – undo
10 10
     {
11 11
         $result = $this->execCommand('update', $this->target->getPath());
12 12
         
13
-        if($result->isError()) {
13
+        if ($result->isError()) {
14 14
             $this->throwExceptionUnexpected($result);
15 15
         }
16 16
         
17 17
         $this->parseResult($result);
18 18
         
19
-        if(!isset($this->revision)) {
19
+        if (!isset($this->revision)) {
20 20
             $this->throwException(
21 21
                 'No update revision returned',
22 22
                 'The command did not return the expected last line with "at revision x".',
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         
46 46
         $lines = $result->getLines();
47 47
         
48
-        foreach($lines as $line) 
48
+        foreach ($lines as $line) 
49 49
         {
50 50
             $result = array();
51 51
             preg_match_all('/\A(a|c|d|u)[ ]+(.+)/si', $line, $result, PREG_PATTERN_ORDER);
@@ -53,13 +53,13 @@  discard block
 block discarded – undo
53 53
             // is this a file update status line? It looks like this:
54 54
             // a    c:\path\to\file.ext
55 55
             // ^ status code
56
-            if(isset($result[0]) && isset($result[1][0]) && !empty($result[1][0])) 
56
+            if (isset($result[0]) && isset($result[1][0]) && !empty($result[1][0])) 
57 57
             {
58 58
                 $status = $result[1][0];
59 59
                 $path = $result[2][0];
60 60
                 $obj = new SVNHelper_Command_Update_Status($this, $status, $path);
61 61
                 
62
-                if(!isset($this->stati[$status])) {
62
+                if (!isset($this->stati[$status])) {
63 63
                     $this->stati[$status] = array();
64 64
                 }
65 65
                 
@@ -69,9 +69,9 @@  discard block
 block discarded – undo
69 69
             }
70 70
             
71 71
             // the revision line, "updated to revision X" or "at revision X"
72
-            if(strstr($line, 'revision ')) {
72
+            if (strstr($line, 'revision ')) {
73 73
                 preg_match('/(at revision|to revision) ([0-9]+)/si', $line, $result);
74
-                if(isset($result[2])) {
74
+                if (isset($result[2])) {
75 75
                     $this->revision = $result[2];
76 76
                 }
77 77
                 continue;
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     {
136 136
         $this->execute();
137 137
         
138
-        if(isset($this->stati[$status])) {
138
+        if (isset($this->stati[$status])) {
139 139
             return $this->stati[$status];
140 140
         }
141 141
         
Please login to merge, or discard this patch.
src/SVNHelper/Command/Status.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,13 +49,13 @@  discard block
 block discarded – undo
49 49
     {
50 50
         $result = $this->execCommand('status', $this->target->getPath(), array('depth empty'));
51 51
         
52
-        if($result->isError()) {
52
+        if ($result->isError()) {
53 53
             $this->throwExceptionUnexpected($result);
54 54
         }
55 55
 
56 56
         $lines = $result->getOutput();
57 57
         
58
-        if(empty($lines)) 
58
+        if (empty($lines)) 
59 59
         {
60 60
             $this->status = self::STATUS_NOT_MODIFIED;
61 61
         }
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             $this->status = self::STATUS_UNKNOWN;
65 65
             
66 66
             $svnStatusCode = strtolower(substr($lines[0], 0, 1));
67
-            if(isset(self::$knownStati[$svnStatusCode])) {
67
+            if (isset(self::$knownStati[$svnStatusCode])) {
68 68
                $this->status = self::$knownStati[$svnStatusCode];
69 69
             }
70 70
         }
Please login to merge, or discard this patch.
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 3 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.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     {
60 60
         $this->info = $info;
61 61
         
62
-        if(isset($data['serialized'])) 
62
+        if (isset($data['serialized'])) 
63 63
         {
64 64
             $this->parseSerialized($data['serialized']);
65 65
         }
@@ -69,11 +69,11 @@  discard block
 block discarded – undo
69 69
             $this->position = $data['position'];
70 70
         }
71 71
         
72
-        if($this->hasClass()) 
72
+        if ($this->hasClass()) 
73 73
         {
74 74
             $this->type = self::TYPE_METHOD_CALL;
75 75
         }
76
-        else if($this->hasFunction()) 
76
+        else if ($this->hasFunction()) 
77 77
         {
78 78
             $this->type = self::TYPE_FUNCTION_CALL;
79 79
         }
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
     
133 133
     public function getFileName() : string
134 134
     {
135
-        if($this->hasFile()) {
135
+        if ($this->hasFile()) {
136 136
             return basename($this->file);
137 137
         }
138 138
         
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     
142 142
     public function getFileRelative() : string
143 143
     {
144
-        if($this->hasFile()) {
144
+        if ($this->hasFile()) {
145 145
             return FileHelper::relativizePathByDepth($this->file, $this->info->getFolderDepth());
146 146
         }
147 147
         
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         $this->class = $data['class'];
172 172
         $this->position = $data['position'];
173 173
         
174
-        foreach($data['arguments'] as $arg)
174
+        foreach ($data['arguments'] as $arg)
175 175
         {
176 176
             $this->args[] = VariableInfo::fromSerialized($arg);
177 177
         }
@@ -182,29 +182,29 @@  discard block
 block discarded – undo
182 182
      */
183 183
     protected function parseTrace(array $trace) : void
184 184
     {
185
-        if(isset($trace['line']))
185
+        if (isset($trace['line']))
186 186
         {
187 187
             $this->line = intval($trace['line']);
188 188
         }
189 189
         
190
-        if(isset($trace['function'])) 
190
+        if (isset($trace['function'])) 
191 191
         {
192 192
             $this->function = $trace['function'];
193 193
         }
194 194
         
195
-        if(isset($trace['file']))
195
+        if (isset($trace['file']))
196 196
         {
197 197
             $this->file = FileHelper::normalizePath($trace['file']);
198 198
         }
199 199
         
200
-        if(isset($trace['class'])) 
200
+        if (isset($trace['class'])) 
201 201
         {
202 202
             $this->class = $trace['class'];
203 203
         }
204 204
      
205
-        if(isset($trace['args']) && !empty($trace['args']))
205
+        if (isset($trace['args']) && !empty($trace['args']))
206 206
         {
207
-            foreach($trace['args'] as $arg) 
207
+            foreach ($trace['args'] as $arg) 
208 208
             {
209 209
                 $this->args[] = parseVariable($arg);
210 210
             }
@@ -219,13 +219,13 @@  discard block
 block discarded – undo
219 219
         
220 220
         $tokens[] = '#'.sprintf('%0'.$padLength.'d', $this->getPosition()).' ';
221 221
         
222
-        if($this->hasFile()) {
222
+        if ($this->hasFile()) {
223 223
             $tokens[] = $this->getFileRelative().':'.$this->getLine();
224 224
         }
225 225
         
226
-        if($this->hasClass()) {
226
+        if ($this->hasClass()) {
227 227
             $tokens[] = $this->getClass().'::'.$this->getFunction().'('.$this->argumentsToString().')';
228
-        } else if($this->hasFunction()) {
228
+        } else if ($this->hasFunction()) {
229 229
             $tokens[] = $this->getFunction().'('.$this->argumentsToString().')';
230 230
         }
231 231
         
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
     {
237 237
         $tokens = array();
238 238
         
239
-        foreach($this->args as $arg) 
239
+        foreach ($this->args as $arg) 
240 240
         {
241 241
             $tokens[] = $arg->toString();
242 242
         }
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
             'arguments' => array()
282 282
         );
283 283
         
284
-        foreach($this->args as $argument)
284
+        foreach ($this->args as $argument)
285 285
         {
286 286
             $result['arguments'][] = $argument->serialize();
287 287
         }
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.
src/VariableInfo.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,7 @@
 block discarded – undo
55 55
         if(is_array($serialized))
56 56
         {
57 57
             $this->parseSerialized($serialized);
58
-        }
59
-        else
58
+        } else
60 59
         {
61 60
             $this->parseValue($value);
62 61
         }
Please login to merge, or discard this patch.
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -37,19 +37,19 @@  discard block
 block discarded – undo
37 37
 
38 38
     public const ERROR_INVALID_SERIALIZED_DATA = 56301;
39 39
     
40
-   /**
41
-    * @var string
42
-    */
40
+    /**
41
+     * @var string
42
+     */
43 43
     protected $string;
44 44
     
45
-   /**
46
-    * @var mixed
47
-    */
45
+    /**
46
+     * @var mixed
47
+     */
48 48
     protected $value;
49 49
     
50
-   /**
51
-    * @var string
52
-    */
50
+    /**
51
+     * @var string
52
+     */
53 53
     protected $type;
54 54
 
55 55
     /**
@@ -106,15 +106,15 @@  discard block
 block discarded – undo
106 106
         return new VariableInfo(null, $serialized);
107 107
     }
108 108
     
109
-   /**
110
-    * Parses a previously serialized data set to restore the 
111
-    * variable information from it.
112
-    * 
113
-    * @param array<mixed> $serialized
114
-    * @throws BaseException
115
-    * 
116
-    * @see VariableInfo::ERROR_INVALID_SERIALIZED_DATA
117
-    */
109
+    /**
110
+     * Parses a previously serialized data set to restore the 
111
+     * variable information from it.
112
+     * 
113
+     * @param array<mixed> $serialized
114
+     * @throws BaseException
115
+     * 
116
+     * @see VariableInfo::ERROR_INVALID_SERIALIZED_DATA
117
+     */
118 118
     protected function parseSerialized(array $serialized) : void
119 119
     {
120 120
         if(!isset($serialized['string'], $serialized['type'], $serialized['options']))
@@ -163,12 +163,12 @@  discard block
 block discarded – undo
163 163
         return $this->value;
164 164
     }
165 165
     
166
-   /**
167
-    * The variable type - this is the same string that
168
-    * is returned by the PHP function `gettype`.
169
-    * 
170
-    * @return string
171
-    */
166
+    /**
167
+     * The variable type - this is the same string that
168
+     * is returned by the PHP function `gettype`.
169
+     * 
170
+     * @return string
171
+     */
172 172
     public function getType() : string
173 173
     {
174 174
         return $this->type;
@@ -185,13 +185,13 @@  discard block
 block discarded – undo
185 185
         );
186 186
     }
187 187
     
188
-   /**
189
-    * Whether to prepend the variable type before the value, 
190
-    * like the var_dump function. Example: <code>string "Some text"</code>.
191
-    * 
192
-    * @param bool $enable
193
-    * @return VariableInfo
194
-    */
188
+    /**
189
+     * Whether to prepend the variable type before the value, 
190
+     * like the var_dump function. Example: <code>string "Some text"</code>.
191
+     * 
192
+     * @param bool $enable
193
+     * @return VariableInfo
194
+     */
195 195
     public function enableType(bool $enable=true) : VariableInfo
196 196
     {
197 197
         return $this->setOption('prepend-type', $enable);
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
      * @param array<mixed>|null $serialized
68 68
      * @throws BaseException
69 69
      */
70
-    public function __construct($value, ?array $serialized=null)
70
+    public function __construct($value, ?array $serialized = null)
71 71
     {
72
-        if(is_array($serialized))
72
+        if (is_array($serialized))
73 73
         {
74 74
             $this->parseSerialized($serialized);
75 75
         }
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     */
118 118
     protected function parseSerialized(array $serialized) : void
119 119
     {
120
-        if(!isset($serialized['string'], $serialized['type'], $serialized['options']))
120
+        if (!isset($serialized['string'], $serialized['type'], $serialized['options']))
121 121
         {
122 122
             throw new BaseException(
123 123
                 'Invalid variable info serialized data.',
@@ -143,12 +143,12 @@  discard block
 block discarded – undo
143 143
         
144 144
         // Gettype will return a string like "Resource(closed)" when
145 145
         // working with a resource that has already been closed.
146
-        if(stripos($this->type, 'resource') !== false)
146
+        if (stripos($this->type, 'resource') !== false)
147 147
         {
148 148
             $this->type = self::TYPE_RESOURCE;
149 149
         }
150 150
 
151
-        if(is_callable($value) && in_array($this->type, $this->callableTypes)) {
151
+        if (is_callable($value) && in_array($this->type, $this->callableTypes)) {
152 152
             $this->type = self::TYPE_CALLABLE;
153 153
         }
154 154
         
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     * @param bool $enable
193 193
     * @return VariableInfo
194 194
     */
195
-    public function enableType(bool $enable=true) : VariableInfo
195
+    public function enableType(bool $enable = true) : VariableInfo
196 196
     {
197 197
         return $this->setOption('prepend-type', $enable);
198 198
     }
@@ -201,9 +201,9 @@  discard block
 block discarded – undo
201 201
     {
202 202
         $converted = $this->string;
203 203
         
204
-        if($this->getOption('prepend-type') === true && !$this->isNull())
204
+        if ($this->getOption('prepend-type') === true && !$this->isNull())
205 205
         {
206
-            if($this->isString())
206
+            if ($this->isString())
207 207
             {
208 208
                 $converted = '"'.$converted.'"';
209 209
             }
Please login to merge, or discard this patch.
src/BaseException.php 3 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,8 +59,7 @@  discard block
 block discarded – undo
59 59
         try
60 60
         {
61 61
             throw new BaseException('');
62
-        }
63
-        catch(BaseException $e) 
62
+        } catch(BaseException $e) 
64 63
         {
65 64
             echo self::createInfo($e)->toString();
66 65
         }
@@ -74,8 +73,7 @@  discard block
 block discarded – undo
74 73
         try
75 74
         {
76 75
             throw new BaseException('');
77
-        }
78
-        catch(BaseException $e)
76
+        } catch(BaseException $e)
79 77
         {
80 78
             echo '<pre style="background:#fff;font-family:monospace;font-size:14px;color:#444;padding:16px;border:solid 1px #999;border-radius:4px;">';
81 79
             echo self::createInfo($e)->toString();
Please login to merge, or discard this patch.
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -25,12 +25,12 @@  discard block
 block discarded – undo
25 25
 {
26 26
     protected ?string $details = null;
27 27
     
28
-   /**
29
-    * @param string $message
30
-    * @param string|NULL $details
31
-    * @param int|NULL $code
32
-    * @param Throwable|NULL $previous
33
-    */
28
+    /**
29
+     * @param string $message
30
+     * @param string|NULL $details
31
+     * @param int|NULL $code
32
+     * @param Throwable|NULL $previous
33
+     */
34 34
     public function __construct(string $message, ?string $details=null, ?int $code=null, ?Throwable $previous=null)
35 35
     {
36 36
         if(defined('APP_UTILS_TESTSUITE') && APP_UTILS_TESTSUITE === 'true')
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
         if($code === null)
42 42
         {
43
-             $code = 0;
43
+                $code = 0;
44 44
         }
45 45
 
46 46
         parent::__construct($message, (int)$code, $previous);
@@ -48,18 +48,18 @@  discard block
 block discarded – undo
48 48
         $this->details = $details;
49 49
     }
50 50
     
51
-   /**
52
-    * Retrieves the detailed error description, if any.
53
-    * @return string
54
-    */
51
+    /**
52
+     * Retrieves the detailed error description, if any.
53
+     * @return string
54
+     */
55 55
     public function getDetails() : string
56 56
     {
57 57
         return $this->details ?? '';
58 58
     }
59 59
     
60
-   /**
61
-    * Displays pertinent information on the exception.
62
-    */
60
+    /**
61
+     * Displays pertinent information on the exception.
62
+     */
63 63
     public function display() : void
64 64
     {
65 65
         if(!headers_sent()) {
@@ -69,20 +69,20 @@  discard block
 block discarded – undo
69 69
         echo $this->getInfo();
70 70
     }
71 71
     
72
-   /**
73
-    * Retrieves information on the exception that can be
74
-    * easily accessed.
75
-    * 
76
-    * @return ConvertHelper_ThrowableInfo
77
-    */
72
+    /**
73
+     * Retrieves information on the exception that can be
74
+     * easily accessed.
75
+     * 
76
+     * @return ConvertHelper_ThrowableInfo
77
+     */
78 78
     public function getInfo() : ConvertHelper_ThrowableInfo
79 79
     {
80 80
         return ConvertHelper::throwable2info($this);
81 81
     }
82 82
     
83
-   /**
84
-    * Dumps a current PHP function trace, as a text only string.
85
-    */
83
+    /**
84
+     * Dumps a current PHP function trace, as a text only string.
85
+     */
86 86
     public static function dumpTraceAsString() : void
87 87
     {
88 88
         try
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
         }
96 96
     }
97 97
 
98
-   /**
99
-    * Dumps a current PHP function trace, with HTML styling.
100
-    */
98
+    /**
99
+     * Dumps a current PHP function trace, with HTML styling.
100
+     */
101 101
     public static function dumpTraceAsHTML() : void
102 102
     {
103 103
         try
@@ -112,13 +112,13 @@  discard block
 block discarded – undo
112 112
         }
113 113
     }
114 114
     
115
-   /**
116
-    * Creates an exception info instance from a throwable instance.
117
-    * 
118
-    * @param Throwable $e
119
-    * @return ConvertHelper_ThrowableInfo
120
-    * @see ConvertHelper::throwable2info()
121
-    */
115
+    /**
116
+     * Creates an exception info instance from a throwable instance.
117
+     * 
118
+     * @param Throwable $e
119
+     * @return ConvertHelper_ThrowableInfo
120
+     * @see ConvertHelper::throwable2info()
121
+     */
122 122
     public static function createInfo(Throwable $e) : ConvertHelper_ThrowableInfo
123 123
     {
124 124
         return ConvertHelper::throwable2info($e);
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,14 +31,14 @@  discard block
 block discarded – undo
31 31
     * @param int|NULL $code
32 32
     * @param Throwable|NULL $previous
33 33
     */
34
-    public function __construct(string $message, ?string $details=null, ?int $code=null, ?Throwable $previous=null)
34
+    public function __construct(string $message, ?string $details = null, ?int $code = null, ?Throwable $previous = null)
35 35
     {
36
-        if(defined('APP_UTILS_TESTSUITE') && APP_UTILS_TESTSUITE === 'true')
36
+        if (defined('APP_UTILS_TESTSUITE') && APP_UTILS_TESTSUITE === 'true')
37 37
         {
38 38
             $message .= PHP_EOL.$details;
39 39
         }
40 40
 
41
-        if($code === null)
41
+        if ($code === null)
42 42
         {
43 43
              $code = 0;
44 44
         }
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     */
63 63
     public function display() : void
64 64
     {
65
-        if(!headers_sent()) {
65
+        if (!headers_sent()) {
66 66
             header('Content-type:text/plain; charset=utf-8');
67 67
         }
68 68
         
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         {
90 90
             throw new BaseException('');
91 91
         }
92
-        catch(BaseException $e) 
92
+        catch (BaseException $e) 
93 93
         {
94 94
             echo self::createInfo($e)->toString();
95 95
         }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         {
105 105
             throw new BaseException('');
106 106
         }
107
-        catch(BaseException $e)
107
+        catch (BaseException $e)
108 108
         {
109 109
             echo '<pre style="background:#fff;font-family:monospace;font-size:14px;color:#444;padding:16px;border:solid 1px #999;border-radius:4px;">';
110 110
             echo self::createInfo($e)->toString();
Please login to merge, or discard this patch.
src/IniHelper/Section.php 3 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -198,8 +198,7 @@  discard block
 block discarded – undo
198 198
                     } else {
199 199
                         $this->addValueLine($name, $values[$i]);
200 200
                     }
201
-                }
202
-                else 
201
+                } else 
203 202
                 {
204 203
                     $this->deleteLine($lines[$i]);
205 204
                 }
@@ -219,8 +218,7 @@  discard block
 block discarded – undo
219 218
                 foreach($lines as $delete) {
220 219
                     $this->deleteLine($delete);
221 220
                 }
222
-            }
223
-            else 
221
+            } else 
224 222
             {
225 223
                 $this->addValueLine($name, $value);
226 224
             }
@@ -258,8 +256,7 @@  discard block
 block discarded – undo
258 256
         if(empty($lines))
259 257
         {
260 258
             $this->addValueLine($name, $value);
261
-        }
262
-        else
259
+        } else
263 260
         {
264 261
             $found = false;
265 262
             
Please login to merge, or discard this patch.
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
     protected IniHelper $ini;
27 27
     protected string $name;
28 28
     
29
-   /**
30
-    * @var INILine[]
31
-    */
29
+    /**
30
+     * @var INILine[]
31
+     */
32 32
     protected array $lines = array();
33 33
     
34 34
     public function __construct(IniHelper $ini, string $name)
@@ -37,33 +37,33 @@  discard block
 block discarded – undo
37 37
         $this->name = $name;
38 38
     }
39 39
     
40
-   /**
41
-    * The section's name.
42
-    * @return string
43
-    */
40
+    /**
41
+     * The section's name.
42
+     * @return string
43
+     */
44 44
     public function getName() : string
45 45
     {
46 46
         return $this->name;
47 47
     }
48 48
     
49
-   /**
50
-    * Whether this is the default section: this 
51
-    * is used internally to store all variables that
52
-    * are not in any specific section.
53
-    * 
54
-    * @return bool
55
-    */
49
+    /**
50
+     * Whether this is the default section: this 
51
+     * is used internally to store all variables that
52
+     * are not in any specific section.
53
+     * 
54
+     * @return bool
55
+     */
56 56
     public function isDefault() : bool
57 57
     {
58 58
         return $this->name === IniHelper::SECTION_DEFAULT;
59 59
     }
60 60
     
61
-   /**
62
-    * Adds a line instance to the section.
63
-    * 
64
-    * @param INILine $line
65
-    * @return IniHelper_Section
66
-    */
61
+    /**
62
+     * Adds a line instance to the section.
63
+     * 
64
+     * @param INILine $line
65
+     * @return IniHelper_Section
66
+     */
67 67
     public function addLine(INILine $line) : IniHelper_Section
68 68
     {
69 69
         $this->lines[] = $line;
@@ -71,12 +71,12 @@  discard block
 block discarded – undo
71 71
         return $this;
72 72
     }
73 73
     
74
-   /**
75
-    * Converts the values contained in the section into 
76
-    * an associative array.
77
-    * 
78
-    * @return array<string,array<int,string>>
79
-    */
74
+    /**
75
+     * Converts the values contained in the section into 
76
+     * an associative array.
77
+     * 
78
+     * @return array<string,array<int,string>>
79
+     */
80 80
     public function toArray() : array
81 81
     {
82 82
         $result = array();
@@ -136,12 +136,12 @@  discard block
 block discarded – undo
136 136
         return implode($this->ini->getEOLChar(), $lines);
137 137
     }
138 138
 
139
-   /**
140
-    * Deletes a line from the section.
141
-    * 
142
-    * @param INILine $toDelete
143
-    * @return IniHelper_Section
144
-    */
139
+    /**
140
+     * Deletes a line from the section.
141
+     * 
142
+     * @param INILine $toDelete
143
+     * @return IniHelper_Section
144
+     */
145 145
     public function deleteLine(INILine $toDelete) : IniHelper_Section
146 146
     {
147 147
         $keep = array();
@@ -226,15 +226,15 @@  discard block
 block discarded – undo
226 226
         return $this;
227 227
     }
228 228
     
229
-   /**
230
-    * Adds a variable value to the section. Unlike setValue(), this
231
-    * will not overwrite any existing value. If the name is an existing
232
-    * variable name, it will be converted to duplicate keys.
233
-    * 
234
-    * @param string $name
235
-    * @param mixed $value If this is an array, it will be treated as duplicate keys, and all values that are not present yet will be added.
236
-    * @return IniHelper_Section
237
-    */
229
+    /**
230
+     * Adds a variable value to the section. Unlike setValue(), this
231
+     * will not overwrite any existing value. If the name is an existing
232
+     * variable name, it will be converted to duplicate keys.
233
+     * 
234
+     * @param string $name
235
+     * @param mixed $value If this is an array, it will be treated as duplicate keys, and all values that are not present yet will be added.
236
+     * @return IniHelper_Section
237
+     */
238 238
     public function addValue(string $name, $value) : IniHelper_Section
239 239
     {
240 240
         // array value? Treat it as duplicate keys.
@@ -297,12 +297,12 @@  discard block
 block discarded – undo
297 297
     }
298 298
     
299 299
     
300
-   /**
301
-    * Retrieves all lines for the specified variable name.
302
-    *  
303
-    * @param string $name
304
-    * @return INILine[]
305
-    */
300
+    /**
301
+     * Retrieves all lines for the specified variable name.
302
+     *  
303
+     * @param string $name
304
+     * @return INILine[]
305
+     */
306 306
     public function getLinesByVariable(string $name) : array
307 307
     {
308 308
         $result = array();
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -81,15 +81,15 @@  discard block
 block discarded – undo
81 81
     {
82 82
         $result = array();
83 83
         
84
-        foreach($this->lines as $line)
84
+        foreach ($this->lines as $line)
85 85
         {
86
-            if(!$line->isValue()) {
86
+            if (!$line->isValue()) {
87 87
                 continue;
88 88
             }
89 89
 
90 90
             $name = $line->getVarName();
91 91
             
92
-            if(!isset($result[$name])) 
92
+            if (!isset($result[$name])) 
93 93
             {
94 94
                 $result[$name] = $line->getVarValue();
95 95
                 continue;
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             // name exists in collection? Then this is a
99 99
             // duplicate key, and we need to convert it to
100 100
             // an indexed array of values.
101
-            if(!is_array($result[$name])) 
101
+            if (!is_array($result[$name])) 
102 102
             {
103 103
                 $result[$name] = array($result[$name]);
104 104
             }
@@ -118,15 +118,15 @@  discard block
 block discarded – undo
118 118
     public function toString() : string
119 119
     {
120 120
         $lines = array();
121
-        if(!$this->isDefault()) 
121
+        if (!$this->isDefault()) 
122 122
         {
123 123
             $lines[] = '['.$this->getName().']';
124 124
         }
125 125
         
126
-        foreach($this->lines as $line) 
126
+        foreach ($this->lines as $line) 
127 127
         {
128 128
             // we already did this
129
-            if($line->isSection()) {
129
+            if ($line->isSection()) {
130 130
                 continue;
131 131
             }
132 132
             
@@ -146,9 +146,9 @@  discard block
 block discarded – undo
146 146
     {
147 147
         $keep = array();
148 148
         
149
-        foreach($this->lines as $line)
149
+        foreach ($this->lines as $line)
150 150
         {
151
-            if($line !== $toDelete) {
151
+            if ($line !== $toDelete) {
152 152
                 $keep[] = $line;
153 153
             }
154 154
         }
@@ -174,23 +174,23 @@  discard block
 block discarded – undo
174 174
         // Removes any superfluous values that may
175 175
         // already exist, if there are more than the
176 176
         // new set of values.
177
-        if(is_array($value))
177
+        if (is_array($value))
178 178
         {
179 179
             $values = array_values($value);
180 180
             $amountNew = count($values);
181 181
             $amountExisting = count($lines);
182 182
             
183 183
             $max = $amountNew;
184
-            if($amountExisting > $max) {
184
+            if ($amountExisting > $max) {
185 185
                 $max = $amountExisting;
186 186
             }
187 187
             
188
-            for($i=0; $i < $max; $i++) 
188
+            for ($i = 0; $i < $max; $i++) 
189 189
             {
190 190
                 // new value exists
191
-                if(isset($values[$i]))
191
+                if (isset($values[$i]))
192 192
                 {
193
-                    if(isset($lines[$i])) {
193
+                    if (isset($lines[$i])) {
194 194
                         $lines[$i]->setValue($values[$i]);
195 195
                     } else {
196 196
                         $this->addValueLine($name, $values[$i]);
@@ -208,12 +208,12 @@  discard block
 block discarded – undo
208 208
         else
209 209
         {
210 210
             // remove all superfluous lines
211
-            if(!empty($lines))
211
+            if (!empty($lines))
212 212
             {
213 213
                 $line = array_shift($lines); // keep only the first line
214 214
                 $line->setValue($value);
215 215
                 
216
-                foreach($lines as $delete) {
216
+                foreach ($lines as $delete) {
217 217
                     $this->deleteLine($delete);
218 218
                 }
219 219
             }
@@ -238,11 +238,11 @@  discard block
 block discarded – undo
238 238
     public function addValue(string $name, $value) : IniHelper_Section
239 239
     {
240 240
         // array value? Treat it as duplicate keys.
241
-        if(is_array($value))
241
+        if (is_array($value))
242 242
         {
243 243
             $values = array_values($value);
244 244
             
245
-            foreach($values as $setValue)
245
+            foreach ($values as $setValue)
246 246
             {
247 247
                 $this->addValue($name, $setValue);
248 248
             }
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
         
253 253
         $lines = $this->getLinesByVariable($name);
254 254
         
255
-        if(empty($lines))
255
+        if (empty($lines))
256 256
         {
257 257
             $this->addValueLine($name, $value);
258 258
         }
@@ -260,15 +260,15 @@  discard block
 block discarded – undo
260 260
         {
261 261
             $found = false;
262 262
             
263
-            foreach($lines as $line)
263
+            foreach ($lines as $line)
264 264
             {
265
-                if($line->getVarValue() === $value) {
265
+                if ($line->getVarValue() === $value) {
266 266
                     $found = $line;
267 267
                     break;
268 268
                 }
269 269
             }
270 270
             
271
-            if(!$found)
271
+            if (!$found)
272 272
             {
273 273
                 $this->addValueLine($name, $value);
274 274
             }
@@ -307,9 +307,9 @@  discard block
 block discarded – undo
307 307
     {
308 308
         $result = array();
309 309
         
310
-        foreach($this->lines as $line)
310
+        foreach ($this->lines as $line)
311 311
         {
312
-            if($line->isValue() && $line->getVarName() === $name) {
312
+            if ($line->isValue() && $line->getVarName() === $name) {
313 313
                 $result[] = $line;
314 314
             }
315 315
         }
Please login to merge, or discard this patch.
src/ConvertHelper/WordWrapper.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
         return $this->getBoolOption('cut');
64 64
     }
65 65
     
66
-    public function setCuttingEnabled(bool $enabled=true) : ConvertHelper_WordWrapper
66
+    public function setCuttingEnabled(bool $enabled = true) : ConvertHelper_WordWrapper
67 67
     {
68 68
         $this->setOption('cut', $enabled);
69 69
         return $this;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,8 +92,7 @@
 block discarded – undo
92 92
                 if (mb_strlen($actual.$word) <= $width)
93 93
                 {
94 94
                     $actual .= $word.' ';
95
-                }
96
-                else
95
+                } else
97 96
                 {
98 97
                     if ($actual != '') {
99 98
                         $line .= rtrim($actual).$break;
Please login to merge, or discard this patch.
src/SVNHelper/CommandResult.php 2 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -4,37 +4,37 @@  discard block
 block discarded – undo
4 4
 
5 5
 class SVNHelper_CommandResult
6 6
 {
7
-   /**
8
-    * @var SVNHelper_Command
9
-    */
7
+    /**
8
+     * @var SVNHelper_Command
9
+     */
10 10
     protected $command;
11 11
     
12
-   /**
13
-    * @var string[]
14
-    */
12
+    /**
13
+     * @var string[]
14
+     */
15 15
     protected $output;
16 16
     
17
-   /**
18
-    * @var SVNHelper_CommandError[]
19
-    */
17
+    /**
18
+     * @var SVNHelper_CommandError[]
19
+     */
20 20
     protected $errors = array();
21 21
     
22
-   /**
23
-    * @var SVNHelper_CommandError[]
24
-    */
22
+    /**
23
+     * @var SVNHelper_CommandError[]
24
+     */
25 25
     protected $warnings = array();
26 26
     
27
-   /**
28
-    * The actual command that has been executed
29
-    * @var string
30
-    */
27
+    /**
28
+     * The actual command that has been executed
29
+     * @var string
30
+     */
31 31
     protected $commandLine;
32 32
     
33
-   /**
34
-    * @param SVNHelper_Command $command
35
-    * @param string[] $output
36
-    * @param SVNHelper_CommandError[] $errors
37
-    */
33
+    /**
34
+     * @param SVNHelper_Command $command
35
+     * @param string[] $output
36
+     * @param SVNHelper_CommandError[] $errors
37
+     */
38 38
     public function __construct(SVNHelper_Command $command, $commandLine, $output, $errors)
39 39
     {
40 40
         $this->command = $command;
@@ -86,12 +86,12 @@  discard block
 block discarded – undo
86 86
         return $this->command;
87 87
     }
88 88
     
89
-   /**
90
-    * Retrieves all error messages.
91
-    * 
92
-    * @param bool $asString
93
-    * @return string|string[]
94
-    */
89
+    /**
90
+     * Retrieves all error messages.
91
+     * 
92
+     * @param bool $asString
93
+     * @return string|string[]
94
+     */
95 95
     public function getErrorMessages(bool $asString=false)
96 96
     {
97 97
         if($asString) {
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
         $this->commandLine = $commandLine;
42 42
         $this->output = $output;
43 43
         
44
-        foreach($errors as $error) {
45
-            if($error->isError()) {
44
+        foreach ($errors as $error) {
45
+            if ($error->isError()) {
46 46
                 $this->errors[] = $error;
47 47
             } else {
48 48
                 $this->warnings[] = $error;
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
     
63 63
     public function hasErrorCode($code)
64 64
     {
65
-        foreach($this->errors as $error) {
66
-            if($error->getCode() == $code) {
65
+        foreach ($this->errors as $error) {
66
+            if ($error->getCode() == $code) {
67 67
                 return true;
68 68
             }
69 69
         }
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
92 92
     * @param bool $asString
93 93
     * @return string|string[]
94 94
     */
95
-    public function getErrorMessages(bool $asString=false)
95
+    public function getErrorMessages(bool $asString = false)
96 96
     {
97
-        if($asString) {
97
+        if ($asString) {
98 98
             $lines = array();
99
-            foreach($this->errors as $error) {
99
+            foreach ($this->errors as $error) {
100 100
                 $lines[] = (string)$error;
101 101
             }
102 102
             
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         }
105 105
         
106 106
         $messages = array();
107
-        foreach($this->errors as $error) {
107
+        foreach ($this->errors as $error) {
108 108
             $messages[] = (string)$error;
109 109
         }
110 110
         
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     
124 124
     public function getLastLine()
125 125
     {
126
-        return $this->output[count($this->output)-1];
126
+        return $this->output[count($this->output) - 1];
127 127
     }
128 128
     
129 129
     public function getFirstLine()
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
     
139 139
     public function isConnectionFailed()
140 140
     {
141
-        foreach($this->errors as $error) {
142
-            if($error->isConnectionFailed()) {
141
+        foreach ($this->errors as $error) {
142
+            if ($error->isConnectionFailed()) {
143 143
                 return true;
144 144
             }
145 145
         }
@@ -149,8 +149,8 @@  discard block
 block discarded – undo
149 149
     
150 150
     public function hasConflicts()
151 151
     {
152
-        foreach($this->errors as $error) {
153
-            if($error->isConflict()) {
152
+        foreach ($this->errors as $error) {
153
+            if ($error->isConflict()) {
154 154
                 return true;
155 155
             }
156 156
         }
@@ -160,8 +160,8 @@  discard block
 block discarded – undo
160 160
     
161 161
     public function hasLocks()
162 162
     {
163
-        foreach($this->errors as $error) {
164
-            if($error->isLock()) {
163
+        foreach ($this->errors as $error) {
164
+            if ($error->isLock()) {
165 165
                 return true;
166 166
             }
167 167
         }
Please login to merge, or discard this patch.