Passed
Push — master ( e76473...8d6fb4 )
by Sebastian
09:39
created
src/ConvertHelper/TabsNormalizer.php 1 patch
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -20,43 +20,43 @@  discard block
 block discarded – undo
20 20
  */
21 21
 class ConvertHelper_TabsNormalizer
22 22
 {
23
-   /**
24
-    * @var integer
25
-    */
23
+    /**
24
+     * @var integer
25
+     */
26 26
     protected $max = 0;
27 27
     
28
-   /**
29
-    * @var integer
30
-    */
28
+    /**
29
+     * @var integer
30
+     */
31 31
     protected $min = PHP_INT_MAX;
32 32
     
33
-   /**
34
-    * @var bool
35
-    */
33
+    /**
34
+     * @var bool
35
+     */
36 36
     protected $tabs2spaces = false;
37 37
     
38
-   /**
39
-    * @var string[]
40
-    */
38
+    /**
39
+     * @var string[]
40
+     */
41 41
     protected $lines = array();
42 42
 
43
-   /**
44
-    * @var string
45
-    */
43
+    /**
44
+     * @var string
45
+     */
46 46
     protected $eol = '';
47 47
     
48
-   /**
49
-    * @var integer
50
-    */
48
+    /**
49
+     * @var integer
50
+     */
51 51
     protected $tabSize = 4;
52 52
     
53
-   /**
54
-    * Whether to enable or disable the conversion
55
-    * of tabs to spaces.
56
-    * 
57
-    * @param bool $enable
58
-    * @return ConvertHelper_TabsNormalizer
59
-    */
53
+    /**
54
+     * Whether to enable or disable the conversion
55
+     * of tabs to spaces.
56
+     * 
57
+     * @param bool $enable
58
+     * @return ConvertHelper_TabsNormalizer
59
+     */
60 60
     public function convertTabsToSpaces(bool $enable=true) : ConvertHelper_TabsNormalizer
61 61
     {
62 62
         $this->tabs2spaces = $enable;
@@ -64,13 +64,13 @@  discard block
 block discarded – undo
64 64
         return $this;
65 65
     }
66 66
     
67
-   /**
68
-    * Sets the size of a tab, in spaces. Used to convert tabs
69
-    * from spaces and the other way around. Defaults to 4.
70
-    * 
71
-    * @param int $amountSpaces
72
-    * @return ConvertHelper_TabsNormalizer
73
-    */
67
+    /**
68
+     * Sets the size of a tab, in spaces. Used to convert tabs
69
+     * from spaces and the other way around. Defaults to 4.
70
+     * 
71
+     * @param int $amountSpaces
72
+     * @return ConvertHelper_TabsNormalizer
73
+     */
74 74
     public function setTabSize(int $amountSpaces) : ConvertHelper_TabsNormalizer
75 75
     {
76 76
         $this->tabSize = $amountSpaces;
@@ -78,15 +78,15 @@  discard block
 block discarded – undo
78 78
         return $this;
79 79
     }
80 80
     
81
-   /**
82
-    * Normalizes tabs in the specified string by indenting everything
83
-    * back to the minimum tab distance. With the second parameter,
84
-    * tabs can optionally be converted to spaces as well (recommended
85
-    * for HTML output).
86
-    *
87
-    * @param string $string
88
-    * @return string
89
-    */
81
+    /**
82
+     * Normalizes tabs in the specified string by indenting everything
83
+     * back to the minimum tab distance. With the second parameter,
84
+     * tabs can optionally be converted to spaces as well (recommended
85
+     * for HTML output).
86
+     *
87
+     * @param string $string
88
+     * @return string
89
+     */
90 90
     public function normalize(string $string) : string
91 91
     {
92 92
         $this->splitLines($string);
@@ -143,10 +143,10 @@  discard block
 block discarded – undo
143 143
         return implode($this->eol, $converted);
144 144
     }
145 145
     
146
-   /**
147
-    * Finds out the minimum and maximum amount of 
148
-    * tabs in the string.
149
-    */
146
+    /**
147
+     * Finds out the minimum and maximum amount of 
148
+     * tabs in the string.
149
+     */
150 150
     protected function countOccurrences() : void
151 151
     {
152 152
         foreach($this->lines as $line) 
Please login to merge, or discard this patch.
src/ConvertHelper/HiddenConverter.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -71,9 +71,9 @@  discard block
 block discarded – undo
71 71
         )
72 72
     );
73 73
     
74
-   /**
75
-    * @var string[]
76
-    */
74
+    /**
75
+     * @var string[]
76
+     */
77 77
     protected $selected = array();
78 78
     
79 79
     public function convert(string $string) : string
@@ -83,16 +83,16 @@  discard block
 block discarded – undo
83 83
         return str_replace(array_keys($chars), array_values($chars), $string);
84 84
     }
85 85
     
86
-   /**
87
-    * Selects a character set to replace. Can be called
88
-    * several times to add additional sets to the collection.
89
-    * 
90
-    * @param string $type See the <code>CHAR_XXX</code> constants.
91
-    * @return ConvertHelper_HiddenConverter
92
-    * 
93
-    * @see ConvertHelper_HiddenConverter::CHARS_CONTROL
94
-    * @see ConvertHelper_HiddenConverter::CHARS_WHITESPACE
95
-    */
86
+    /**
87
+     * Selects a character set to replace. Can be called
88
+     * several times to add additional sets to the collection.
89
+     * 
90
+     * @param string $type See the <code>CHAR_XXX</code> constants.
91
+     * @return ConvertHelper_HiddenConverter
92
+     * 
93
+     * @see ConvertHelper_HiddenConverter::CHARS_CONTROL
94
+     * @see ConvertHelper_HiddenConverter::CHARS_WHITESPACE
95
+     */
96 96
     public function selectCharacters(string $type) : ConvertHelper_HiddenConverter
97 97
     {
98 98
         if(!in_array($type, $this->selected)) {
@@ -102,11 +102,11 @@  discard block
 block discarded – undo
102 102
         return $this;
103 103
     }
104 104
     
105
-   /**
106
-    * Resolves the list of characters to make visible.
107
-    * 
108
-    * @return string[]
109
-    */
105
+    /**
106
+     * Resolves the list of characters to make visible.
107
+     * 
108
+     * @return string[]
109
+     */
110 110
     protected function resolveSelection() : array
111 111
     {
112 112
         $selected = $this->selected;
Please login to merge, or discard this patch.
src/ConvertHelper/QueryParser.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -27,16 +27,16 @@
 block discarded – undo
27 27
         
28 28
     }
29 29
     
30
-   /**
31
-    * We parse the query string ourselves, because the PHP implementation
32
-    * of parse_str has limitations that do not apply to query strings. This
33
-    * is due to the fact that parse_str has to create PHP-compatible variable
34
-    * names from the parameters. URL parameters simply allow way more things
35
-    * than PHP variable names.
36
-    * 
37
-    * @param string $queryString
38
-    * @return array<string,string>
39
-    */
30
+    /**
31
+     * We parse the query string ourselves, because the PHP implementation
32
+     * of parse_str has limitations that do not apply to query strings. This
33
+     * is due to the fact that parse_str has to create PHP-compatible variable
34
+     * names from the parameters. URL parameters simply allow way more things
35
+     * than PHP variable names.
36
+     * 
37
+     * @param string $queryString
38
+     * @return array<string,string>
39
+     */
40 40
     public function parse(string $queryString) : array
41 41
     {
42 42
         // allow HTML entities notation
Please login to merge, or discard this patch.
src/RequestHelper/Exception.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
  */
23 23
 class RequestHelper_Exception extends BaseException
24 24
 {
25
-   /**
26
-    * @var RequestHelper_Response|NULL
27
-    */
25
+    /**
26
+     * @var RequestHelper_Response|NULL
27
+     */
28 28
     protected $response = null;
29 29
 
30 30
     /**
@@ -37,11 +37,11 @@  discard block
 block discarded – undo
37 37
         return $this;
38 38
     }
39 39
     
40
-   /**
41
-    * Retrieves the related response instance, if available.
42
-    * 
43
-    * @return RequestHelper_Response|NULL
44
-    */
40
+    /**
41
+     * Retrieves the related response instance, if available.
42
+     * 
43
+     * @return RequestHelper_Response|NULL
44
+     */
45 45
     public function getResponse() : ?RequestHelper_Response
46 46
     {
47 47
         return $this->response;
Please login to merge, or discard this patch.
src/Highlighter.php 1 patch
Indentation   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -41,71 +41,71 @@  discard block
 block discarded – undo
41 41
  */
42 42
 class Highlighter
43 43
 {
44
-   /**
45
-    * Creates a new GeSHi instance from a source code string.
46
-    * 
47
-    * @param string $sourceCode
48
-    * @param string $format
49
-    * @return GeSHi
50
-    */
44
+    /**
45
+     * Creates a new GeSHi instance from a source code string.
46
+     * 
47
+     * @param string $sourceCode
48
+     * @param string $format
49
+     * @return GeSHi
50
+     */
51 51
     public static function fromString(string $sourceCode, string $format) : GeSHi
52 52
     {
53 53
         return new GeSHi($sourceCode, $format);
54 54
     }
55 55
     
56
-   /**
57
-    * Creates a new GeSHi instance from the contents of a file.
58
-    * 
59
-    * @param string $path
60
-    * @param string $format
61
-    * @return GeSHi
62
-    */
56
+    /**
57
+     * Creates a new GeSHi instance from the contents of a file.
58
+     * 
59
+     * @param string $path
60
+     * @param string $format
61
+     * @return GeSHi
62
+     */
63 63
     public static function fromFile(string $path, string $format) : GeSHi
64 64
     {
65 65
         return self::fromString(FileHelper::readContents($path), $format);
66 66
     }
67 67
     
68
-   /**
69
-    * Parses and highlights the target string.
70
-    * 
71
-    * @param string $sourceCode
72
-    * @param string $format
73
-    * @return string
74
-    */
68
+    /**
69
+     * Parses and highlights the target string.
70
+     * 
71
+     * @param string $sourceCode
72
+     * @param string $format
73
+     * @return string
74
+     */
75 75
     public static function parseString(string $sourceCode, string $format) : string
76 76
     {
77 77
         return self::fromString($sourceCode, $format)->parse_code();
78 78
     }
79 79
     
80
-   /**
81
-    * Parses and highlights the contents of the target file.
82
-    * 
83
-    * @param string $path
84
-    * @param string $format
85
-    * @return string
86
-    */
80
+    /**
81
+     * Parses and highlights the contents of the target file.
82
+     * 
83
+     * @param string $path
84
+     * @param string $format
85
+     * @return string
86
+     */
87 87
     public static function parseFile(string $path, string $format) : string
88 88
     {
89 89
         return self::fromFile($path, $format)->parse_code();
90 90
     }
91 91
     
92
-   /**
93
-    * Adds HTML syntax highlighting to the specified SQL string.
94
-    *
95
-    * @param string $sql
96
-    * @return string
97
-    */
92
+    /**
93
+     * Adds HTML syntax highlighting to the specified SQL string.
94
+     *
95
+     * @param string $sql
96
+     * @return string
97
+     */
98 98
     public static function sql(string $sql) : string
99 99
     {
100 100
         return self::parseString($sql, 'sql');
101 101
     }
102 102
     
103
-   /**
104
-    * Adds HTML syntax highlighting to a JSON string, or a data array/object.
105
-    *
106
-    * @param array<int|string,mixed>|object|string $subject A JSON string, or data array/object to convert to JSON to highlight.
107
-    * @return string
108
-    */
103
+    /**
104
+     * Adds HTML syntax highlighting to a JSON string, or a data array/object.
105
+     *
106
+     * @param array<int|string,mixed>|object|string $subject A JSON string, or data array/object to convert to JSON to highlight.
107
+     * @return string
108
+     */
109 109
     public static function json($subject) : string
110 110
     {
111 111
         if(!is_string($subject))
@@ -118,13 +118,13 @@  discard block
 block discarded – undo
118 118
         return self::parseString($subject, 'javascript');
119 119
     }
120 120
     
121
-   /**
122
-    * Adds HTML syntax highlighting to the specified XML code.
123
-    *
124
-    * @param string $xml The XML to highlight.
125
-    * @param bool $formatSource Whether to format the source with indentation to make it readable.
126
-    * @return string
127
-    */
121
+    /**
122
+     * Adds HTML syntax highlighting to the specified XML code.
123
+     *
124
+     * @param string $xml The XML to highlight.
125
+     * @param bool $formatSource Whether to format the source with indentation to make it readable.
126
+     * @return string
127
+     */
128 128
     public static function xml(string $xml, bool $formatSource=false) : string
129 129
     {
130 130
         if($formatSource)
@@ -141,13 +141,13 @@  discard block
 block discarded – undo
141 141
         return self::parseString($xml, 'xml');
142 142
     }
143 143
     
144
-   /**
145
-    * Adds HTML syntax highlighting to the specified HTML code.
146
-    * 
147
-    * @param string $html
148
-    * @param bool $formatSource
149
-    * @return string
150
-    */
144
+    /**
145
+     * Adds HTML syntax highlighting to the specified HTML code.
146
+     * 
147
+     * @param string $html
148
+     * @param bool $formatSource
149
+     * @return string
150
+     */
151 151
     public static function html(string $html, bool $formatSource=false) : string
152 152
     {
153 153
         if($formatSource)
@@ -164,27 +164,27 @@  discard block
 block discarded – undo
164 164
         return self::parseString($html, 'xml');
165 165
     }
166 166
     
167
-   /**
168
-    * Adds HTML syntax highlighting to a bit of PHP code.
169
-    * 
170
-    * @param string $phpCode
171
-    * @return string
172
-    */
167
+    /**
168
+     * Adds HTML syntax highlighting to a bit of PHP code.
169
+     * 
170
+     * @param string $phpCode
171
+     * @return string
172
+     */
173 173
     public static function php(string $phpCode) : string
174 174
     {
175 175
         return self::parseString($phpCode, 'php');
176 176
     }
177 177
     
178
-   /**
179
-    * Adds HTML syntax highlighting to an URL.
180
-    *
181
-    * NOTE: Includes the necessary CSS styles. When
182
-    * highlighting several URLs in the same page,
183
-    * prefer using the `parseURL` function instead.
184
-    *
185
-    * @param string $url
186
-    * @return string
187
-    */
178
+    /**
179
+     * Adds HTML syntax highlighting to an URL.
180
+     *
181
+     * NOTE: Includes the necessary CSS styles. When
182
+     * highlighting several URLs in the same page,
183
+     * prefer using the `parseURL` function instead.
184
+     *
185
+     * @param string $url
186
+     * @return string
187
+     */
188 188
     public static function url(string $url) : string
189 189
     {
190 190
         $info = parseURL($url);
Please login to merge, or discard this patch.
src/OperationResult/Collection.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
  */
27 27
 class OperationResult_Collection extends OperationResult
28 28
 {
29
-   /**
30
-    * @var OperationResult[]
31
-    */
29
+    /**
30
+     * @var OperationResult[]
31
+     */
32 32
     protected $results = array();
33 33
 
34 34
     /**
@@ -123,9 +123,9 @@  discard block
 block discarded – undo
123 123
         return $this;
124 124
     }
125 125
     
126
-   /**
127
-    * @return OperationResult[]
128
-    */
126
+    /**
127
+     * @return OperationResult[]
128
+     */
129 129
     public function getResults() : array
130 130
     {
131 131
         return $this->results;
Please login to merge, or discard this patch.
src/RequestHelper/Boundaries.php 1 patch
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -22,19 +22,19 @@  discard block
 block discarded – undo
22 22
 {
23 23
     public const ERROR_NO_BOUNDARIES_SPECIFIED = 44401;
24 24
     
25
-   /**
26
-    * @var RequestHelper
27
-    */
25
+    /**
26
+     * @var RequestHelper
27
+     */
28 28
     protected $helper;
29 29
 
30
-   /**
31
-    * @var RequestHelper_Boundaries_Boundary[]
32
-    */
30
+    /**
31
+     * @var RequestHelper_Boundaries_Boundary[]
32
+     */
33 33
     protected $boundaries = array();
34 34
     
35
-   /**
36
-    * @var integer
37
-    */
35
+    /**
36
+     * @var integer
37
+     */
38 38
     protected $contentLength = 0;
39 39
     
40 40
     public function __construct(RequestHelper $helper)
@@ -42,31 +42,31 @@  discard block
 block discarded – undo
42 42
         $this->helper = $helper;
43 43
     }
44 44
     
45
-   /**
46
-    * Retrieves the string that is used to separate mime boundaries in the body.
47
-    * 
48
-    * @return string
49
-    */
45
+    /**
46
+     * Retrieves the string that is used to separate mime boundaries in the body.
47
+     * 
48
+     * @return string
49
+     */
50 50
     public function getMimeBoundary() : string
51 51
     {
52 52
         return $this->helper->getMimeBoundary();
53 53
     }
54 54
     
55
-   /**
56
-    * Retrieves the end of line character(s) used in the body.
57
-    * 
58
-    * @return string
59
-    */
55
+    /**
56
+     * Retrieves the end of line character(s) used in the body.
57
+     * 
58
+     * @return string
59
+     */
60 60
     public function getEOL() : string
61 61
     {
62 62
         return $this->helper->getEOL();
63 63
     }
64 64
     
65
-   /**
66
-    * Retrieves the total content length of all boundary contents.
67
-    * 
68
-    * @return int
69
-    */
65
+    /**
66
+     * Retrieves the total content length of all boundary contents.
67
+     * 
68
+     * @return int
69
+     */
70 70
     public function getContentLength() : int
71 71
     {
72 72
         // this must use strlen, and not mb_strlen: the content length
@@ -75,15 +75,15 @@  discard block
 block discarded – undo
75 75
         return strlen($this->render());
76 76
     }
77 77
     
78
-   /**
79
-    * Adds a file to be sent with the request.
80
-    *
81
-    * @param string $varName The variable name to send the file in
82
-    * @param string $fileName The name of the file as it should be received at the destination
83
-    * @param string $content The raw content of the file
84
-    * @param string $contentType The content type, use the constants to specify this
85
-    * @param string $encoding The encoding of the file, use the constants to specify this
86
-    */
78
+    /**
79
+     * Adds a file to be sent with the request.
80
+     *
81
+     * @param string $varName The variable name to send the file in
82
+     * @param string $fileName The name of the file as it should be received at the destination
83
+     * @param string $content The raw content of the file
84
+     * @param string $contentType The content type, use the constants to specify this
85
+     * @param string $encoding The encoding of the file, use the constants to specify this
86
+     */
87 87
     public function addFile(string $varName, string $fileName, string $content, string $contentType = '', string $encoding = '') : RequestHelper_Boundaries
88 88
     {
89 89
         if(empty($contentType))
@@ -107,13 +107,13 @@  discard block
 block discarded – undo
107 107
         return $this->addBoundary($boundary);
108 108
     }
109 109
     
110
-   /**
111
-    * Adds arbitrary content.
112
-    *
113
-    * @param string $varName
114
-    * @param string $content
115
-    * @param string $contentType
116
-    */
110
+    /**
111
+     * Adds arbitrary content.
112
+     *
113
+     * @param string $varName
114
+     * @param string $content
115
+     * @param string $contentType
116
+     */
117 117
     public function addContent(string $varName, string $content, string $contentType) : RequestHelper_Boundaries
118 118
     {
119 119
         $content = ConvertHelper::string2utf8($content);
@@ -127,13 +127,13 @@  discard block
 block discarded – undo
127 127
         return $this->addBoundary($boundary);
128 128
     }
129 129
     
130
-   /**
131
-    * Adds a variable to be sent with the request. If it
132
-    * already exists, its value is overwritten.
133
-    *
134
-    * @param string $name
135
-    * @param string $value
136
-    */
130
+    /**
131
+     * Adds a variable to be sent with the request. If it
132
+     * already exists, its value is overwritten.
133
+     *
134
+     * @param string $name
135
+     * @param string $value
136
+     */
137 137
     public function addVariable(string $name, string $value) : RequestHelper_Boundaries
138 138
     {
139 139
         $boundary = $this->createBoundary($value)
@@ -149,11 +149,11 @@  discard block
 block discarded – undo
149 149
         return $this;
150 150
     }
151 151
     
152
-   /**
153
-    * Renders the response body with all mime boundaries.
154
-    * 
155
-    * @return string
156
-    */
152
+    /**
153
+     * Renders the response body with all mime boundaries.
154
+     * 
155
+     * @return string
156
+     */
157 157
     public function render() : string
158 158
     {
159 159
         if(empty($this->boundaries)) 
Please login to merge, or discard this patch.
src/SVNHelper/Command/Status.php 1 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/ZIPHelper.php 1 patch
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@  discard block
 block discarded – undo
38 38
         'WriteThreshold' => 100
39 39
     );
40 40
     
41
-   /**
42
-    * @var string
43
-    */
41
+    /**
42
+     * @var string
43
+     */
44 44
     protected $file;
45 45
     
46
-   /**
47
-    * @var ZipArchive|NULL
48
-    */
46
+    /**
47
+     * @var ZipArchive|NULL
48
+     */
49 49
     protected $zip;
50 50
     
51 51
     public function __construct(string $targetFile)
@@ -53,35 +53,35 @@  discard block
 block discarded – undo
53 53
         $this->file = $targetFile;
54 54
     }
55 55
     
56
-   /**
57
-    * Sets an option, among the available options:
58
-    * 
59
-    * <ul>
60
-    * <li>WriteThreshold: The amount of files to add before the zip is automatically written to disk and re-opened to release the file handles. Set to 0 to disable.</li>
61
-    * </ul>
62
-    * 
63
-    * @param string $name
64
-    * @param mixed $value
65
-    * @return ZIPHelper
66
-    */
56
+    /**
57
+     * Sets an option, among the available options:
58
+     * 
59
+     * <ul>
60
+     * <li>WriteThreshold: The amount of files to add before the zip is automatically written to disk and re-opened to release the file handles. Set to 0 to disable.</li>
61
+     * </ul>
62
+     * 
63
+     * @param string $name
64
+     * @param mixed $value
65
+     * @return ZIPHelper
66
+     */
67 67
     public function setOption(string $name, $value) : ZIPHelper
68 68
     {
69 69
         $this->options[$name] = $value;
70 70
         return $this;
71 71
     }
72 72
     
73
-   /**
74
-    * Adds a file to the zip. By default, the file is stored
75
-    * with the same name in the root of the zip. Use the optional
76
-    * parameter to change the location in the zip.
77
-    * 
78
-    * @param string $filePath
79
-    * @param string|null $zipPath If no path is specified, file will be added with the same name in the ZIP's root.
80
-    * @throws ZIPHelper_Exception
81
-    * @return bool
82
-    * 
83
-    * @see FileHelper::ERROR_SOURCE_FILE_DOES_NOT_EXIST
84
-    */
73
+    /**
74
+     * Adds a file to the zip. By default, the file is stored
75
+     * with the same name in the root of the zip. Use the optional
76
+     * parameter to change the location in the zip.
77
+     * 
78
+     * @param string $filePath
79
+     * @param string|null $zipPath If no path is specified, file will be added with the same name in the ZIP's root.
80
+     * @throws ZIPHelper_Exception
81
+     * @return bool
82
+     * 
83
+     * @see FileHelper::ERROR_SOURCE_FILE_DOES_NOT_EXIST
84
+     */
85 85
     public function addFile(string $filePath, ?string $zipPath=null) : bool
86 86
     {
87 87
         $this->open();
@@ -289,14 +289,14 @@  discard block
 block discarded – undo
289 289
         return $this;
290 290
     }
291 291
 
292
-   /**
293
-    * Extracts all files and folders from the zip to the 
294
-    * target folder. If no folder is specified, the files
295
-    * are extracted into the same folder as the zip itself.
296
-    * 
297
-    * @param string|NULL $outputFolder If no folder is specified, uses the target file's folder.
298
-    * @return boolean
299
-    */
292
+    /**
293
+     * Extracts all files and folders from the zip to the 
294
+     * target folder. If no folder is specified, the files
295
+     * are extracted into the same folder as the zip itself.
296
+     * 
297
+     * @param string|NULL $outputFolder If no folder is specified, uses the target file's folder.
298
+     * @return boolean
299
+     */
300 300
     public function extractAll(?string $outputFolder=null) : bool
301 301
     {
302 302
         if(empty($outputFolder)) {
@@ -308,9 +308,9 @@  discard block
 block discarded – undo
308 308
         return $this->zip->extractTo($outputFolder);
309 309
     }
310 310
 
311
-   /**
312
-    * @return ZipArchive
313
-    */
311
+    /**
312
+     * @return ZipArchive
313
+     */
314 314
     public function getArchive() : ZipArchive
315 315
     {
316 316
         $this->open();
@@ -318,14 +318,14 @@  discard block
 block discarded – undo
318 318
         return $this->zip;
319 319
     }
320 320
     
321
-   /**
322
-    * JSON encodes the specified data and adds the json as
323
-    * a file in the ZIP archive.
324
-    * 
325
-    * @param mixed $data
326
-    * @param string $zipPath
327
-    * @return boolean
328
-    */
321
+    /**
322
+     * JSON encodes the specified data and adds the json as
323
+     * a file in the ZIP archive.
324
+     * 
325
+     * @param mixed $data
326
+     * @param string $zipPath
327
+     * @return boolean
328
+     */
329 329
     public function addJSON($data, string $zipPath) : bool
330 330
     {
331 331
         return $this->addString(
Please login to merge, or discard this patch.