public function removePattern(string
$pattern, ?string
$scope = null
) { if ($pattern === ''
) { return $this;
} // Start with all files or those in scope
$files =
$scope === null ?
$this->files : self::
filterFiles($this->files,
$scope);
// Remove any files that match the pattern
return $this->
removeFiles(self::
matchFiles($files,
$pattern));
} /**
* Keeps only the files from the list that match
* (within the optional scope).
*
* @param string $pattern Regex or pseudo-regex string
* @param string|null $scope A directory to limit the scope
*
* @return $this
*/