From 81bceb9334a53d7b8bd73704de8a6585ab36a6f3 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Mon, 21 Nov 2022 02:18:06 -0800 Subject: [PATCH] Lint PHP --- lib/Command/Index.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/Command/Index.php b/lib/Command/Index.php index 8c62d71c..3208ff16 100644 --- a/lib/Command/Index.php +++ b/lib/Command/Index.php @@ -40,8 +40,8 @@ use OCP\IUserManager; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\ConsoleSectionOutput; +use Symfony\Component\Console\Output\OutputInterface; class Index extends Command { @@ -264,16 +264,17 @@ class Index extends Command // Respect the '.nomedia' file. If present don't traverse the folder if ($folder->nodeExists('.nomedia')) { ++$this->nNoMedia; + return; } $nodes = $folder->getDirectoryListing(); - foreach ($nodes as $i=>&$node) { + foreach ($nodes as $i => &$node) { if ($node instanceof Folder) { - $this->parseFolder($node, $refresh, $progress_i * count($nodes) + $i, $progress_n * count($nodes)); + $this->parseFolder($node, $refresh, $progress_i * \count($nodes) + $i, $progress_n * \count($nodes)); } elseif ($node instanceof File) { - $this->outputSection->overwrite(sprintf("%.2f%%", $progress_i/$progress_n*100).' scanning '.$node->getPath()); + $this->outputSection->overwrite(sprintf('%.2f%%', $progress_i / $progress_n * 100).' scanning '.$node->getPath()); $this->parseFile($node, $refresh); } }