@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | public static $statusTexts = [ |
10 | 10 | 100 => 'Continue', |
11 | 11 | 101 => 'Switching Protocols', |
12 | - 102 => 'Processing', // RFC2518 |
|
12 | + 102 => 'Processing', // RFC2518 |
|
13 | 13 | 103 => 'Early Hints', |
14 | 14 | 200 => 'OK', |
15 | 15 | 201 => 'Created', |
@@ -18,9 +18,9 @@ discard block |
||
18 | 18 | 204 => 'No Content', |
19 | 19 | 205 => 'Reset Content', |
20 | 20 | 206 => 'Partial Content', |
21 | - 207 => 'Multi-Status', // RFC4918 |
|
22 | - 208 => 'Already Reported', // RFC5842 |
|
23 | - 226 => 'IM Used', // RFC3229 |
|
21 | + 207 => 'Multi-Status', // RFC4918 |
|
22 | + 208 => 'Already Reported', // RFC5842 |
|
23 | + 226 => 'IM Used', // RFC3229 |
|
24 | 24 | 300 => 'Multiple Choices', |
25 | 25 | 301 => 'Moved Permanently', |
26 | 26 | 302 => 'Found', |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | 304 => 'Not Modified', |
29 | 29 | 305 => 'Use Proxy', |
30 | 30 | 307 => 'Temporary Redirect', |
31 | - 308 => 'Permanent Redirect', // RFC7238 |
|
31 | + 308 => 'Permanent Redirect', // RFC7238 |
|
32 | 32 | 400 => 'Bad Request', |
33 | 33 | 401 => 'Unauthorized', |
34 | 34 | 402 => 'Payment Required', |
@@ -47,34 +47,34 @@ discard block |
||
47 | 47 | 415 => 'Unsupported Media Type', |
48 | 48 | 416 => 'Range Not Satisfiable', |
49 | 49 | 417 => 'Expectation Failed', |
50 | - 418 => 'I\'m a teapot', // RFC2324 |
|
51 | - 421 => 'Misdirected Request', // RFC7540 |
|
52 | - 422 => 'Unprocessable Entity', // RFC4918 |
|
53 | - 423 => 'Locked', // RFC4918 |
|
54 | - 424 => 'Failed Dependency', // RFC4918 |
|
55 | - 425 => 'Too Early', // RFC-ietf-httpbis-replay-04 |
|
56 | - 426 => 'Upgrade Required', // RFC2817 |
|
57 | - 428 => 'Precondition Required', // RFC6585 |
|
58 | - 429 => 'Too Many Requests', // RFC6585 |
|
59 | - 431 => 'Request Header Fields Too Large', // RFC6585 |
|
60 | - 451 => 'Unavailable For Legal Reasons', // RFC7725 |
|
50 | + 418 => 'I\'m a teapot', // RFC2324 |
|
51 | + 421 => 'Misdirected Request', // RFC7540 |
|
52 | + 422 => 'Unprocessable Entity', // RFC4918 |
|
53 | + 423 => 'Locked', // RFC4918 |
|
54 | + 424 => 'Failed Dependency', // RFC4918 |
|
55 | + 425 => 'Too Early', // RFC-ietf-httpbis-replay-04 |
|
56 | + 426 => 'Upgrade Required', // RFC2817 |
|
57 | + 428 => 'Precondition Required', // RFC6585 |
|
58 | + 429 => 'Too Many Requests', // RFC6585 |
|
59 | + 431 => 'Request Header Fields Too Large', // RFC6585 |
|
60 | + 451 => 'Unavailable For Legal Reasons', // RFC7725 |
|
61 | 61 | 500 => 'Internal Server Error', |
62 | 62 | 501 => 'Not Implemented', |
63 | 63 | 502 => 'Bad Gateway', |
64 | 64 | 503 => 'Service Unavailable', |
65 | 65 | 504 => 'Gateway Timeout', |
66 | 66 | 505 => 'HTTP Version Not Supported', |
67 | - 506 => 'Variant Also Negotiates', // RFC2295 |
|
68 | - 507 => 'Insufficient Storage', // RFC4918 |
|
69 | - 508 => 'Loop Detected', // RFC5842 |
|
70 | - 510 => 'Not Extended', // RFC2774 |
|
71 | - 511 => 'Network Authentication Required', // RFC6585 |
|
67 | + 506 => 'Variant Also Negotiates', // RFC2295 |
|
68 | + 507 => 'Insufficient Storage', // RFC4918 |
|
69 | + 508 => 'Loop Detected', // RFC5842 |
|
70 | + 510 => 'Not Extended', // RFC2774 |
|
71 | + 511 => 'Network Authentication Required', // RFC6585 |
|
72 | 72 | ]; |
73 | 73 | |
74 | 74 | const HTTP_CONTINUE = 100; |
75 | 75 | const HTTP_SWITCHING_PROTOCOLS = 101; |
76 | - const HTTP_PROCESSING = 102; // RFC2518 |
|
77 | - const HTTP_EARLY_HINTS = 103; // RFC8297 |
|
76 | + const HTTP_PROCESSING = 102; // RFC2518 |
|
77 | + const HTTP_EARLY_HINTS = 103; // RFC8297 |
|
78 | 78 | const HTTP_OK = 200; |
79 | 79 | const HTTP_CREATED = 201; |
80 | 80 | const HTTP_ACCEPTED = 202; |
@@ -82,9 +82,9 @@ discard block |
||
82 | 82 | const HTTP_NO_CONTENT = 204; |
83 | 83 | const HTTP_RESET_CONTENT = 205; |
84 | 84 | const HTTP_PARTIAL_CONTENT = 206; |
85 | - const HTTP_MULTI_STATUS = 207; // RFC4918 |
|
86 | - const HTTP_ALREADY_REPORTED = 208; // RFC5842 |
|
87 | - const HTTP_IM_USED = 226; // RFC3229 |
|
85 | + const HTTP_MULTI_STATUS = 207; // RFC4918 |
|
86 | + const HTTP_ALREADY_REPORTED = 208; // RFC5842 |
|
87 | + const HTTP_IM_USED = 226; // RFC3229 |
|
88 | 88 | const HTTP_MULTIPLE_CHOICES = 300; |
89 | 89 | const HTTP_MOVED_PERMANENTLY = 301; |
90 | 90 | const HTTP_FOUND = 302; |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | const HTTP_USE_PROXY = 305; |
94 | 94 | const HTTP_RESERVED = 306; |
95 | 95 | const HTTP_TEMPORARY_REDIRECT = 307; |
96 | - const HTTP_PERMANENTLY_REDIRECT = 308; // RFC7238 |
|
96 | + const HTTP_PERMANENTLY_REDIRECT = 308; // RFC7238 |
|
97 | 97 | const HTTP_BAD_REQUEST = 400; |
98 | 98 | const HTTP_UNAUTHORIZED = 401; |
99 | 99 | const HTTP_PAYMENT_REQUIRED = 402; |
@@ -112,21 +112,21 @@ discard block |
||
112 | 112 | const HTTP_UNSUPPORTED_MEDIA_TYPE = 415; |
113 | 113 | const HTTP_REQUESTED_RANGE_NOT_SATISFIABLE = 416; |
114 | 114 | const HTTP_EXPECTATION_FAILED = 417; |
115 | - const HTTP_I_AM_A_TEAPOT = 418; // RFC2324 |
|
116 | - const HTTP_MISDIRECTED_REQUEST = 421; // RFC7540 |
|
117 | - const HTTP_UNPROCESSABLE_ENTITY = 422; // RFC4918 |
|
118 | - const HTTP_LOCKED = 423; // RFC4918 |
|
119 | - const HTTP_FAILED_DEPENDENCY = 424; // RFC4918 |
|
115 | + const HTTP_I_AM_A_TEAPOT = 418; // RFC2324 |
|
116 | + const HTTP_MISDIRECTED_REQUEST = 421; // RFC7540 |
|
117 | + const HTTP_UNPROCESSABLE_ENTITY = 422; // RFC4918 |
|
118 | + const HTTP_LOCKED = 423; // RFC4918 |
|
119 | + const HTTP_FAILED_DEPENDENCY = 424; // RFC4918 |
|
120 | 120 | |
121 | 121 | /** |
122 | 122 | * @deprecated |
123 | 123 | */ |
124 | - const HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425; // RFC2817 |
|
125 | - const HTTP_TOO_EARLY = 425; // RFC-ietf-httpbis-replay-04 |
|
126 | - const HTTP_UPGRADE_REQUIRED = 426; // RFC2817 |
|
127 | - const HTTP_PRECONDITION_REQUIRED = 428; // RFC6585 |
|
128 | - const HTTP_TOO_MANY_REQUESTS = 429; // RFC6585 |
|
129 | - const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; // RFC6585 |
|
124 | + const HTTP_RESERVED_FOR_WEBDAV_ADVANCED_COLLECTIONS_EXPIRED_PROPOSAL = 425; // RFC2817 |
|
125 | + const HTTP_TOO_EARLY = 425; // RFC-ietf-httpbis-replay-04 |
|
126 | + const HTTP_UPGRADE_REQUIRED = 426; // RFC2817 |
|
127 | + const HTTP_PRECONDITION_REQUIRED = 428; // RFC6585 |
|
128 | + const HTTP_TOO_MANY_REQUESTS = 429; // RFC6585 |
|
129 | + const HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE = 431; // RFC6585 |
|
130 | 130 | const HTTP_UNAVAILABLE_FOR_LEGAL_REASONS = 451; |
131 | 131 | const HTTP_INTERNAL_SERVER_ERROR = 500; |
132 | 132 | const HTTP_NOT_IMPLEMENTED = 501; |
@@ -134,10 +134,10 @@ discard block |
||
134 | 134 | const HTTP_SERVICE_UNAVAILABLE = 503; |
135 | 135 | const HTTP_GATEWAY_TIMEOUT = 504; |
136 | 136 | const HTTP_VERSION_NOT_SUPPORTED = 505; |
137 | - const HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL = 506; // RFC2295 |
|
138 | - const HTTP_INSUFFICIENT_STORAGE = 507; // RFC4918 |
|
139 | - const HTTP_LOOP_DETECTED = 508; // RFC5842 |
|
140 | - const HTTP_NOT_EXTENDED = 510; // RFC2774 |
|
137 | + const HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL = 506; // RFC2295 |
|
138 | + const HTTP_INSUFFICIENT_STORAGE = 507; // RFC4918 |
|
139 | + const HTTP_LOOP_DETECTED = 508; // RFC5842 |
|
140 | + const HTTP_NOT_EXTENDED = 510; // RFC2774 |
|
141 | 141 | const HTTP_NETWORK_AUTHENTICATION_REQUIRED = 511; |
142 | 142 | |
143 | 143 | /** |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | { |
18 | 18 | protected static $types = [ |
19 | 19 | JsonContent::class => ['array', JsonSerializable::class], |
20 | - HtmlContent::class => ['boolean', 'integer','double', 'string'], |
|
20 | + HtmlContent::class => ['boolean', 'integer', 'double', 'string'], |
|
21 | 21 | NullContent::class => ['NULL'], |
22 | 22 | FileContent::class => [SplFileInfo::class], |
23 | 23 | ]; |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | |
45 | 45 | public static function isTypeOf($data, $type) : bool |
46 | 46 | { |
47 | - if (is_object($data) && !\in_array($type, ['boolean', 'integer','double', 'string','array','NULL'])) { |
|
47 | + if (is_object($data) && !\in_array($type, ['boolean', 'integer', 'double', 'string', 'array', 'NULL'])) { |
|
48 | 48 | $class = new ReflectionClass($data); |
49 | 49 | $typeRef = new ReflectionClass($type); |
50 | 50 | if ($typeRef->isInterface()) { |
@@ -13,12 +13,12 @@ discard block |
||
13 | 13 | */ |
14 | 14 | protected static $mimes = [ |
15 | 15 | # Image Type |
16 | - 'jpe' => 'image/jpeg' , |
|
17 | - 'jpeg' => 'image/jpeg' , |
|
18 | - 'jpg' => 'image/jpeg' , |
|
19 | - 'svg' => 'image/svg+xml' , |
|
20 | - 'png' => 'image/png' , |
|
21 | - 'gif' => 'image/gif' , |
|
16 | + 'jpe' => 'image/jpeg', |
|
17 | + 'jpeg' => 'image/jpeg', |
|
18 | + 'jpg' => 'image/jpeg', |
|
19 | + 'svg' => 'image/svg+xml', |
|
20 | + 'png' => 'image/png', |
|
21 | + 'gif' => 'image/gif', |
|
22 | 22 | 'ico' => 'image/x-icon', |
23 | 23 | 'webp' => 'image/webp', |
24 | 24 | |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | 'js' => 'text/javascript', |
27 | 27 | 'css' => 'text/css', |
28 | 28 | 'txt' => 'text/plain', |
29 | - 'html' => 'text/html' , |
|
30 | - 'csv' => 'text/csv' , |
|
29 | + 'html' => 'text/html', |
|
30 | + 'csv' => 'text/csv', |
|
31 | 31 | 'xml' => 'text/xml', |
32 | 32 | |
33 | 33 | # App type |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | |
40 | 40 | # Archive |
41 | 41 | 'zip' => 'application/zip', |
42 | - 'gtar' => 'application/x-gtar' , |
|
43 | - 'gz' => 'application/x-gzip' , |
|
42 | + 'gtar' => 'application/x-gtar', |
|
43 | + 'gz' => 'application/x-gzip', |
|
44 | 44 | '7z' => 'application/x-7z-compressed', |
45 | 45 | 'rar' => 'application/x-rar-compressed', |
46 | 46 |
@@ -21,7 +21,7 @@ |
||
21 | 21 | { |
22 | 22 | if ($content->isFile()) { |
23 | 23 | $response->setType($content->getExtension()); |
24 | - $response->setHeader('Content-Disposition', 'attachment;filename="' . $content->getBasename().'"'); |
|
24 | + $response->setHeader('Content-Disposition', 'attachment;filename="'.$content->getBasename().'"'); |
|
25 | 25 | $response->setHeader('Cache-Control', 'max-age=0'); |
26 | 26 | $response->send(file_get_contents($content->getRealPath())); |
27 | 27 | } else { |
@@ -8,5 +8,5 @@ |
||
8 | 8 | */ |
9 | 9 | abstract class Response extends BaseResponse |
10 | 10 | { |
11 | - public abstract function onRequest(Request $request, Response $response); |
|
11 | + public abstract function onRequest(Request $request, Response $response); |
|
12 | 12 | } |
@@ -94,11 +94,11 @@ discard block |
||
94 | 94 | * @param boolean $full |
95 | 95 | * @return \Iterator |
96 | 96 | */ |
97 | - public static function readFiles(string $path, bool $recursive=false, ?string $regex=null, bool $full=true, int $mode = RecursiveIteratorIterator::LEAVES_ONLY) : \Iterator |
|
97 | + public static function readFiles(string $path, bool $recursive = false, ?string $regex = null, bool $full = true, int $mode = RecursiveIteratorIterator::LEAVES_ONLY) : \Iterator |
|
98 | 98 | { |
99 | 99 | $parent = Path::format($path); |
100 | 100 | foreach (static::read($path, $recursive, $regex, false, $mode) as $subpath) { |
101 | - $path = $full?$subpath:$parent.DIRECTORY_SEPARATOR.$subpath; |
|
101 | + $path = $full ? $subpath : $parent.DIRECTORY_SEPARATOR.$subpath; |
|
102 | 102 | if (is_file($path)) { |
103 | 103 | yield $subpath; |
104 | 104 | } |
@@ -114,11 +114,11 @@ discard block |
||
114 | 114 | * @param boolean $full |
115 | 115 | * @return \Iterator |
116 | 116 | */ |
117 | - public static function readDirs(string $path, bool $recursive=false, ?string $regex=null, bool $full=false, int $mode = RecursiveIteratorIterator::LEAVES_ONLY): \Iterator |
|
117 | + public static function readDirs(string $path, bool $recursive = false, ?string $regex = null, bool $full = false, int $mode = RecursiveIteratorIterator::LEAVES_ONLY): \Iterator |
|
118 | 118 | { |
119 | 119 | $parent = Path::format($path); |
120 | 120 | foreach (static::read($path, $recursive, $regex, false, $mode) as $subpath) { |
121 | - $path = $full?$subpath:$parent.DIRECTORY_SEPARATOR.$subpath; |
|
121 | + $path = $full ? $subpath : $parent.DIRECTORY_SEPARATOR.$subpath; |
|
122 | 122 | if (is_dir($path)) { |
123 | 123 | yield $subpath; |
124 | 124 | } |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | * @param boolean $full |
135 | 135 | * @return \Iterator |
136 | 136 | */ |
137 | - public static function read(string $path, bool $recursive=false, ?string $regex=null, bool $full=true, int $mode = RecursiveIteratorIterator::LEAVES_ONLY): \Iterator |
|
137 | + public static function read(string $path, bool $recursive = false, ?string $regex = null, bool $full = true, int $mode = RecursiveIteratorIterator::LEAVES_ONLY): \Iterator |
|
138 | 138 | { |
139 | 139 | $directory = Path::format($path); |
140 | 140 | if ($directory && \is_dir($directory)) { |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | } |
151 | 151 | |
152 | 152 | |
153 | - protected static function buildIterator(string $directory, bool $recursive=false, ?string $regex = null, int $mode): \Iterator |
|
153 | + protected static function buildIterator(string $directory, bool $recursive = false, ?string $regex = null, int $mode): \Iterator |
|
154 | 154 | { |
155 | 155 | $it = new \RecursiveDirectoryIterator($directory, \RecursiveDirectoryIterator::SKIP_DOTS); |
156 | 156 | if ($regex !== null) { |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | */ |
172 | 172 | public static function cut(string $path, string $basepath):string |
173 | 173 | { |
174 | - $path = PathTrait::toAbsolutePath($path); |
|
174 | + $path = PathTrait::toAbsolutePath($path); |
|
175 | 175 | $basepath = PathTrait::toAbsolutePath($basepath); |
176 | 176 | if (strpos($path, $basepath.DIRECTORY_SEPARATOR) === 0) { |
177 | 177 | return substr($path, \strlen($basepath) + 1); |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | * @param boolean $move |
189 | 189 | * @return boolean |
190 | 190 | */ |
191 | - public static function copy(string $path, string $toPath, ?string $regex=null, bool $move = false):bool |
|
191 | + public static function copy(string $path, string $toPath, ?string $regex = null, bool $move = false):bool |
|
192 | 192 | { |
193 | 193 | $directory = Path::format($path); |
194 | 194 | static::makes($toPath); |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | * @param string|null $regex |
228 | 228 | * @return boolean |
229 | 229 | */ |
230 | - public static function move(string $path, string $toPath, ?string $regex=null):bool |
|
230 | + public static function move(string $path, string $toPath, ?string $regex = null):bool |
|
231 | 231 | { |
232 | 232 | return static::copy($path, $toPath, $regex, true); |
233 | 233 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public static function delete(string $filename):bool |
27 | 27 | { |
28 | - if (($path=Path::format($filename)) !== null) { |
|
28 | + if (($path = Path::format($filename)) !== null) { |
|
29 | 29 | if (!is_writable($path)) { |
30 | 30 | return false; |
31 | 31 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public static function move(string $src, string $dest):bool |
45 | 45 | { |
46 | - if (($path=Path::format($src)) !== null && is_writable(dirname($dest))) { |
|
46 | + if (($path = Path::format($src)) !== null && is_writable(dirname($dest))) { |
|
47 | 47 | return rename($path, $dest); |
48 | 48 | } |
49 | 49 | return false; |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | */ |
59 | 59 | public static function copy(string $src, string $dest):bool |
60 | 60 | { |
61 | - if (($path=Path::format($src)) !== null && is_writable(dirname($dest))) { |
|
61 | + if (($path = Path::format($src)) !== null && is_writable(dirname($dest))) { |
|
62 | 62 | return copy($path, $dest); |
63 | 63 | } |
64 | 64 | return false; |
@@ -86,9 +86,9 @@ discard block |
||
86 | 86 | * @param string $name |
87 | 87 | * @return string|null |
88 | 88 | */ |
89 | - public static function get(string $filename):?string |
|
89 | + public static function get(string $filename): ?string |
|
90 | 90 | { |
91 | - if (is_readable($filename) && ($path=Path::format($filename)) !== null) { |
|
91 | + if (is_readable($filename) && ($path = Path::format($filename)) !== null) { |
|
92 | 92 | return file_get_contents($path); |
93 | 93 | } |
94 | 94 | return null; |
@@ -19,9 +19,9 @@ |
||
19 | 19 | } |
20 | 20 | |
21 | 21 | use FileHelper { |
22 | - delete as protected deleteFile; |
|
23 | - FileHelper::copy insteadof DirectoryHelper; |
|
24 | - FileHelper::move insteadof DirectoryHelper; |
|
22 | + delete as protected deleteFile; |
|
23 | + FileHelper::copy insteadof DirectoryHelper; |
|
24 | + FileHelper::move insteadof DirectoryHelper; |
|
25 | 25 | } |
26 | 26 | |
27 | 27 |
@@ -34,7 +34,7 @@ |
||
34 | 34 | */ |
35 | 35 | public static function delete(string $path):bool |
36 | 36 | { |
37 | - if (($path=Path::format($path)) !== null) { |
|
37 | + if (($path = Path::format($path)) !== null) { |
|
38 | 38 | if (is_file($path)) { |
39 | 39 | return static::deleteFile($path); |
40 | 40 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | * @param string $name |
57 | 57 | * @return string|null |
58 | 58 | */ |
59 | - public static function get(string $filename):?string; |
|
59 | + public static function get(string $filename): ?string; |
|
60 | 60 | |
61 | 61 | |
62 | 62 | /** |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | * @param boolean $full |
78 | 78 | * @return \Iterator |
79 | 79 | */ |
80 | - public static function readFiles(string $path, bool $recursive=false, ?string $regex=null, bool $full=true, int $mode = RecursiveIteratorIterator::LEAVES_ONLY) : \Iterator; |
|
80 | + public static function readFiles(string $path, bool $recursive = false, ?string $regex = null, bool $full = true, int $mode = RecursiveIteratorIterator::LEAVES_ONLY) : \Iterator; |
|
81 | 81 | |
82 | 82 | /** |
83 | 83 | * 读目录下文件夹 |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | * @param boolean $full |
89 | 89 | * @return \Iterator |
90 | 90 | */ |
91 | - public static function readDirs(string $path, bool $recursive=false, ?string $regex=null, bool $full=false, int $mode = RecursiveIteratorIterator::LEAVES_ONLY): \Iterator; |
|
91 | + public static function readDirs(string $path, bool $recursive = false, ?string $regex = null, bool $full = false, int $mode = RecursiveIteratorIterator::LEAVES_ONLY): \Iterator; |
|
92 | 92 | |
93 | 93 | /** |
94 | 94 | * 读目录,包括文件,文件夹 |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | * @param boolean $full |
100 | 100 | * @return \Iterator |
101 | 101 | */ |
102 | - public static function read(string $path, bool $recursive=false, ?string $regex=null, bool $full=true, int $mode = RecursiveIteratorIterator::LEAVES_ONLY): \Iterator; |
|
102 | + public static function read(string $path, bool $recursive = false, ?string $regex = null, bool $full = true, int $mode = RecursiveIteratorIterator::LEAVES_ONLY): \Iterator; |
|
103 | 103 | |
104 | 104 | /** |
105 | 105 | * 截断部分目录 |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | * @param boolean $move |
120 | 120 | * @return boolean |
121 | 121 | */ |
122 | - public static function copyDir(string $path, string $toPath, ?string $regex=null, bool $move = false):bool; |
|
122 | + public static function copyDir(string $path, string $toPath, ?string $regex = null, bool $move = false):bool; |
|
123 | 123 | |
124 | 124 | /** |
125 | 125 | * 移动文件夹 |
@@ -129,5 +129,5 @@ discard block |
||
129 | 129 | * @param string|null $regex |
130 | 130 | * @return boolean |
131 | 131 | */ |
132 | - public static function moveDir(string $path, string $toPath, ?string $regex=null):bool; |
|
132 | + public static function moveDir(string $path, string $toPath, ?string $regex = null):bool; |
|
133 | 133 | } |