Passed
Push — master ( ca068f...f2d295 )
by Alexey
03:12 queued 16s
created
src/PhpZip/Model/Entry/ZipAbstractEntry.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
      */
233 233
     public function setCreatedOS($platform)
234 234
     {
235
-        $platform = (int) $platform;
235
+        $platform = (int)$platform;
236 236
 
237 237
         if ($platform < 0x00 || $platform > 0xff) {
238 238
             throw new ZipException('Platform out of range');
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
      */
262 262
     public function setExtractedOS($platform)
263 263
     {
264
-        $platform = (int) $platform;
264
+        $platform = (int)$platform;
265 265
 
266 266
         if ($platform < 0x00 || $platform > 0xff) {
267 267
             throw new ZipException('Platform out of range');
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
      */
287 287
     public function setSoftwareVersion($softwareVersion)
288 288
     {
289
-        $this->softwareVersion = (int) $softwareVersion;
289
+        $this->softwareVersion = (int)$softwareVersion;
290 290
 
291 291
         return $this;
292 292
     }
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
      */
408 408
     public function setOffset($offset)
409 409
     {
410
-        $this->offset = (int) $offset;
410
+        $this->offset = (int)$offset;
411 411
 
412 412
         return $this;
413 413
     }
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
      */
517 517
     public function setEncrypted($encrypted)
518 518
     {
519
-        $encrypted = (bool) $encrypted;
519
+        $encrypted = (bool)$encrypted;
520 520
         $this->setGeneralPurposeBitFlag(self::GPBF_ENCRYPTED, $encrypted);
521 521
 
522 522
         return $this;
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
      */
603 603
     public function setDosTime($dosTime)
604 604
     {
605
-        $dosTime = (int) $dosTime;
605
+        $dosTime = (int)$dosTime;
606 606
 
607 607
         if ($dosTime < 0x00000000 || $dosTime > 0xffffffff) {
608 608
             throw new ZipException('DosTime out of range');
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
      */
668 668
     public function setInternalAttributes($attributes)
669 669
     {
670
-        $this->internalAttributes = (int) $attributes;
670
+        $this->internalAttributes = (int)$attributes;
671 671
 
672 672
         return $this;
673 673
     }
@@ -795,7 +795,7 @@  discard block
 block discarded – undo
795 795
      */
796 796
     public function setCrc($crc)
797 797
     {
798
-        $this->crc = (int) $crc;
798
+        $this->crc = (int)$crc;
799 799
 
800 800
         return $this;
801 801
     }
Please login to merge, or discard this patch.
src/PhpZip/Model/Entry/ZipNewFileEntry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
         if ($file === null) {
30 30
             throw new InvalidArgumentException('file is null');
31 31
         }
32
-        $file = (string) $file;
32
+        $file = (string)$file;
33 33
 
34 34
         if (!is_file($file)) {
35 35
             throw new ZipException("File {$file} does not exist.");
Please login to merge, or discard this patch.
src/PhpZip/Util/FilesUtil.php 1 patch
Spacing   +7 added lines, -10 removed lines patch added patch discarded remove patch
@@ -152,18 +152,15 @@  discard block
 block discarded – undo
152 152
     public static function fileSearchWithIgnore($inputDir, $recursive = true, array $ignoreFiles = [])
153 153
     {
154 154
         $directoryIterator = $recursive ?
155
-            new \RecursiveDirectoryIterator($inputDir) :
156
-            new \DirectoryIterator($inputDir);
155
+            new \RecursiveDirectoryIterator($inputDir) : new \DirectoryIterator($inputDir);
157 156
 
158 157
         if (!empty($ignoreFiles)) {
159 158
             $directoryIterator = $recursive ?
160
-                new IgnoreFilesRecursiveFilterIterator($directoryIterator, $ignoreFiles) :
161
-                new IgnoreFilesFilterIterator($directoryIterator, $ignoreFiles);
159
+                new IgnoreFilesRecursiveFilterIterator($directoryIterator, $ignoreFiles) : new IgnoreFilesFilterIterator($directoryIterator, $ignoreFiles);
162 160
         }
163 161
 
164 162
         $iterator = $recursive ?
165
-            new \RecursiveIteratorIterator($directoryIterator) :
166
-            new \IteratorIterator($directoryIterator);
163
+            new \RecursiveIteratorIterator($directoryIterator) : new \IteratorIterator($directoryIterator);
167 164
 
168 165
         $fileList = [];
169 166
 
@@ -187,8 +184,8 @@  discard block
 block discarded – undo
187 184
      */
188 185
     public static function globFileSearch($globPattern, $flags = 0, $recursive = true)
189 186
     {
190
-        $flags = (int) $flags;
191
-        $recursive = (bool) $recursive;
187
+        $flags = (int)$flags;
188
+        $recursive = (bool)$recursive;
192 189
         $files = glob($globPattern, $flags);
193 190
 
194 191
         if (!$recursive) {
@@ -268,8 +265,8 @@  discard block
 block discarded – undo
268 265
         return implode(
269 266
             '/',
270 267
             array_filter(
271
-                explode('/', (string) $path),
272
-                static function ($part) {
268
+                explode('/', (string)$path),
269
+                static function($part) {
273 270
                     return $part !== '.' && $part !== '..';
274 271
                 }
275 272
             )
Please login to merge, or discard this patch.
src/PhpZip/Extra/ExtraFieldsFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
             while ($endPos - $pos >= 4) {
52 52
                 $unpack = unpack('vheaderId/vdataSize', substr($extra, $pos, 4));
53 53
                 $pos += 4;
54
-                $headerId = (int) $unpack['headerId'];
55
-                $dataSize = (int) $unpack['dataSize'];
54
+                $headerId = (int)$unpack['headerId'];
55
+                $dataSize = (int)$unpack['dataSize'];
56 56
                 $extraField = self::create($headerId);
57 57
 
58 58
                 if ($extraField instanceof Zip64ExtraField && $entry !== null) {
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
      */
188 188
     public static function createApkAlignExtra(ZipEntry $entry, $padding)
189 189
     {
190
-        $padding = (int) $padding;
190
+        $padding = (int)$padding;
191 191
         $multiple = 4;
192 192
 
193 193
         if (StringUtil::endsWith($entry->getName(), '.so')) {
Please login to merge, or discard this patch.
src/PhpZip/Extra/Fields/NtfsExtraField.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      */
102 102
     public function setMtime($mtime)
103 103
     {
104
-        $this->mtime = (int) $mtime;
104
+        $this->mtime = (int)$mtime;
105 105
     }
106 106
 
107 107
     /**
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      */
118 118
     public function setAtime($atime)
119 119
     {
120
-        $this->atime = (int) $atime;
120
+        $this->atime = (int)$atime;
121 121
     }
122 122
 
123 123
     /**
@@ -133,6 +133,6 @@  discard block
 block discarded – undo
133 133
      */
134 134
     public function setCtime($ctime)
135 135
     {
136
-        $this->ctime = (int) $ctime;
136
+        $this->ctime = (int)$ctime;
137 137
     }
138 138
 }
Please login to merge, or discard this patch.