From ea8f5ea313c9e5246302a3d6ccbd578e41526551 Mon Sep 17 00:00:00 2001 From: overtrue Date: Fri, 17 Apr 2020 07:11:46 +0800 Subject: [PATCH] Fixed #71 --- src/Linter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Linter.php b/src/Linter.php index d3d2af83..8355efcb 100644 --- a/src/Linter.php +++ b/src/Linter.php @@ -67,7 +67,7 @@ public function __construct($path, array $excludes = [], array $extensions = ['p { $this->path = (array)$path; $this->excludes = $excludes; - $this->extensions = \array_map(function($extension){ + $this->extensions = \array_map(function ($extension) { return \sprintf('*.%s', \ltrim($extension, '.')); }, $extensions); } @@ -161,7 +161,7 @@ public function getFiles() foreach ($this->path as $path) { if (is_dir($path)) { $this->files = array_merge($this->files, $this->getFilesFromDir($path)); - } else if (is_file($path)) { + } elseif (is_file($path)) { $this->files[$path] = new SplFileInfo($path, $path, $path); } }