fix: noverify --fix
This commit is contained in:
parent
5aff28d2b8
commit
117640a755
44 changed files with 174 additions and 174 deletions
18
src/Path.php
18
src/Path.php
|
|
@ -138,7 +138,7 @@ class Path
|
|||
*/
|
||||
public static function optimize($path) //
|
||||
{
|
||||
$result = array();
|
||||
$result = [];
|
||||
foreach ($path as $n) {
|
||||
switch ($n) {
|
||||
// Может быть относительным или абсолютным путем
|
||||
|
|
@ -254,7 +254,7 @@ class Path
|
|||
$self_path = $self->getParts();
|
||||
$list_path = $list->getParts();
|
||||
|
||||
$result = array();
|
||||
$result = [];
|
||||
$count = count($list_path);
|
||||
for ($i = 0; $i < $count; $i++) {
|
||||
if (($i >= count($self_path)) || $list_path[$i] != $self_path[$i]) {
|
||||
|
|
@ -286,7 +286,7 @@ class Path
|
|||
static function fromJoin($_rest) {
|
||||
$args = func_get_args();
|
||||
|
||||
$result = array();
|
||||
$result = [];
|
||||
$parts0 = new Path(array_shift($args));
|
||||
$result [] = $parts0->getParts();
|
||||
foreach ($args as $file) {
|
||||
|
|
@ -371,9 +371,9 @@ class Path
|
|||
*
|
||||
* @returnarray
|
||||
*/
|
||||
public function getContent($allow = null, $ignore = array())
|
||||
public function getContent($allow = null, $ignore = [])
|
||||
{
|
||||
$ignore = array_merge(array(".", ".."), $ignore);
|
||||
$ignore = array_merge([".", ".."], $ignore);
|
||||
return self::fileList($this->__toString(), $allow, $ignore);
|
||||
}
|
||||
|
||||
|
|
@ -385,10 +385,10 @@ class Path
|
|||
*
|
||||
* @return array
|
||||
*/
|
||||
function getContentRec($allow = null, $ignore = array())
|
||||
function getContentRec($allow = null, $ignore = [])
|
||||
{
|
||||
$result = array ();
|
||||
$ignore = array_merge(array (".", ".."), $ignore);
|
||||
$result = [];
|
||||
$ignore = array_merge([".", ".."], $ignore);
|
||||
self::fileListAll($result, $this->__toString(), $allow, $ignore);
|
||||
return $result;
|
||||
}
|
||||
|
|
@ -397,7 +397,7 @@ class Path
|
|||
protected static function fileList($base, &$allow, &$ignore)
|
||||
{
|
||||
if ($base == '') $base = '.';
|
||||
$result = array ();
|
||||
$result = [];
|
||||
$handle = opendir($base);
|
||||
if (is_resource($handle)) {
|
||||
while (true) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue