Lint PHP
parent
08ce081a96
commit
81bceb9334
|
@ -40,8 +40,8 @@ use OCP\IUserManager;
|
||||||
use Symfony\Component\Console\Command\Command;
|
use Symfony\Component\Console\Command\Command;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
|
||||||
use Symfony\Component\Console\Output\ConsoleSectionOutput;
|
use Symfony\Component\Console\Output\ConsoleSectionOutput;
|
||||||
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
|
|
||||||
class Index extends Command
|
class Index extends Command
|
||||||
{
|
{
|
||||||
|
@ -264,16 +264,17 @@ class Index extends Command
|
||||||
// Respect the '.nomedia' file. If present don't traverse the folder
|
// Respect the '.nomedia' file. If present don't traverse the folder
|
||||||
if ($folder->nodeExists('.nomedia')) {
|
if ($folder->nodeExists('.nomedia')) {
|
||||||
++$this->nNoMedia;
|
++$this->nNoMedia;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$nodes = $folder->getDirectoryListing();
|
$nodes = $folder->getDirectoryListing();
|
||||||
|
|
||||||
foreach ($nodes as $i=>&$node) {
|
foreach ($nodes as $i => &$node) {
|
||||||
if ($node instanceof Folder) {
|
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) {
|
} 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);
|
$this->parseFile($node, $refresh);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue