mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-26 12:39:10 -04:00
ALPHA 3.0.2a
This commit is contained in:
@@ -32,7 +32,7 @@ class CustomFilterIterator extends \FilterIterator
|
||||
public function __construct(\Iterator $iterator, array $filters)
|
||||
{
|
||||
foreach ($filters as $filter) {
|
||||
if (!is_callable($filter)) {
|
||||
if (!\is_callable($filter)) {
|
||||
throw new \InvalidArgumentException('Invalid PHP callback.');
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,7 @@ class CustomFilterIterator extends \FilterIterator
|
||||
$fileinfo = $this->current();
|
||||
|
||||
foreach ($this->filters as $filter) {
|
||||
if (false === call_user_func($filter, $fileinfo)) {
|
||||
if (false === \call_user_func($filter, $fileinfo)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class PathFilterIterator extends MultiplePcreFilterIterator
|
||||
{
|
||||
$filename = $this->current()->getRelativePathname();
|
||||
|
||||
if ('\\' === DIRECTORY_SEPARATOR) {
|
||||
if ('\\' === \DIRECTORY_SEPARATOR) {
|
||||
$filename = str_replace('\\', '/', $filename);
|
||||
}
|
||||
|
||||
|
||||
@@ -48,8 +48,8 @@ class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator
|
||||
parent::__construct($path, $flags);
|
||||
$this->ignoreUnreadableDirs = $ignoreUnreadableDirs;
|
||||
$this->rootPath = $path;
|
||||
if ('/' !== DIRECTORY_SEPARATOR && !($flags & self::UNIX_PATHS)) {
|
||||
$this->directorySeparator = DIRECTORY_SEPARATOR;
|
||||
if ('/' !== \DIRECTORY_SEPARATOR && !($flags & self::UNIX_PATHS)) {
|
||||
$this->directorySeparator = \DIRECTORY_SEPARATOR;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ class SortableIterator implements \IteratorAggregate
|
||||
$this->sort = function ($a, $b) {
|
||||
return $a->getMTime() - $b->getMTime();
|
||||
};
|
||||
} elseif (is_callable($sort)) {
|
||||
} elseif (\is_callable($sort)) {
|
||||
$this->sort = $sort;
|
||||
} else {
|
||||
throw new \InvalidArgumentException('The SortableIterator takes a PHP callable or a valid built-in sort algorithm as an argument.');
|
||||
|
||||
Reference in New Issue
Block a user