X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=vendor%2Fsymfony%2Fyaml%2FCommand%2FLintCommand.php;h=36e7e8b97ce18920666fd6cf485551e36ca541f7;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=4f2dc637df03a786395a4208beb40ecc117eab3d;hpb=af6d1fb995500ae68849458ee10d66abbdcfb252;p=yaffs-website diff --git a/vendor/symfony/yaml/Command/LintCommand.php b/vendor/symfony/yaml/Command/LintCommand.php index 4f2dc637d..36e7e8b97 100644 --- a/vendor/symfony/yaml/Command/LintCommand.php +++ b/vendor/symfony/yaml/Command/LintCommand.php @@ -12,6 +12,8 @@ namespace Symfony\Component\Yaml\Command; use Symfony\Component\Console\Command\Command; +use Symfony\Component\Console\Exception\InvalidArgumentException; +use Symfony\Component\Console\Exception\RuntimeException; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; @@ -86,14 +88,14 @@ EOF if (!$filename) { if (!$stdin = $this->getStdin()) { - throw new \RuntimeException('Please provide a filename or pipe file content to STDIN.'); + throw new RuntimeException('Please provide a filename or pipe file content to STDIN.'); } return $this->display($io, array($this->validate($stdin, $flags))); } if (!$this->isReadable($filename)) { - throw new \RuntimeException(sprintf('File or directory "%s" is not readable.', $filename)); + throw new RuntimeException(sprintf('File or directory "%s" is not readable.', $filename)); } $filesInfo = array(); @@ -133,13 +135,13 @@ EOF case 'json': return $this->displayJson($io, $files); default: - throw new \InvalidArgumentException(sprintf('The format "%s" is not supported.', $this->format)); + throw new InvalidArgumentException(sprintf('The format "%s" is not supported.', $this->format)); } } private function displayTxt(SymfonyStyle $io, array $filesInfo) { - $countFiles = count($filesInfo); + $countFiles = \count($filesInfo); $erroredFiles = 0; foreach ($filesInfo as $info) { @@ -186,7 +188,7 @@ EOF } foreach ($this->getDirectoryIterator($fileOrDirectory) as $file) { - if (!in_array($file->getExtension(), array('yml', 'yaml'))) { + if (!\in_array($file->getExtension(), array('yml', 'yaml'))) { continue; } @@ -227,7 +229,7 @@ EOF }; if (null !== $this->directoryIteratorProvider) { - return call_user_func($this->directoryIteratorProvider, $directory, $default); + return \call_user_func($this->directoryIteratorProvider, $directory, $default); } return $default($directory); @@ -240,7 +242,7 @@ EOF }; if (null !== $this->isReadableProvider) { - return call_user_func($this->isReadableProvider, $fileOrDirectory, $default); + return \call_user_func($this->isReadableProvider, $fileOrDirectory, $default); } return $default($fileOrDirectory);