|
@@ -140,7 +140,7 @@ discard block |
|
|
block discarded – undo |
|
140
|
140
|
*/ |
|
141
|
141
|
public function addFile($file, $strip = true) |
|
142
|
142
|
{ |
|
143
|
|
- $realfile = realpath($this->path . DIRECTORY_SEPARATOR . $file); |
|
|
143
|
+ $realfile = realpath($this->path.DIRECTORY_SEPARATOR.$file); |
|
144
|
144
|
$this->files[$file] = [$realfile, (bool) $strip]; |
|
145
|
145
|
} |
|
146
|
146
|
|
|
@@ -153,11 +153,11 @@ discard block |
|
|
block discarded – undo |
|
153
|
153
|
*/ |
|
154
|
154
|
public function addDirectory($directory, $exclude = null, $strip = true) |
|
155
|
155
|
{ |
|
156
|
|
- $realpath = realpath($this->path . DIRECTORY_SEPARATOR . $directory); |
|
|
156
|
+ $realpath = realpath($this->path.DIRECTORY_SEPARATOR.$directory); |
|
157
|
157
|
$iterator = new \RecursiveDirectoryIterator($realpath, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::UNIX_PATHS); |
|
158
|
158
|
|
|
159
|
159
|
if ((is_string($exclude) || is_array($exclude)) && !empty($exclude)) { |
|
160
|
|
- $iterator = new \RecursiveCallbackFilterIterator($iterator, function ($current) use ($exclude, $realpath) { |
|
|
160
|
+ $iterator = new \RecursiveCallbackFilterIterator($iterator, function($current) use ($exclude, $realpath) { |
|
161
|
161
|
if ($current->isDir()) { |
|
162
|
162
|
return true; |
|
163
|
163
|
} |
|
@@ -199,7 +199,7 @@ discard block |
|
|
block discarded – undo |
|
199
|
199
|
throw new \InvalidArgumentException(sprintf('Index file type "%s" is invalid, must be one of: cli, web', $type)); |
|
200
|
200
|
} |
|
201
|
201
|
|
|
202
|
|
- $this->index[$type] = [$file, realpath($this->path . DIRECTORY_SEPARATOR . $file)]; |
|
|
202
|
+ $this->index[$type] = [$file, realpath($this->path.DIRECTORY_SEPARATOR.$file)]; |
|
203
|
203
|
} |
|
204
|
204
|
|
|
205
|
205
|
/** |