cleanArchives() public méthode

Remove old build archives.
public cleanArchives ( string $projectRoot, integer $maxAge = null, integer $keepMax = 10, boolean $quiet = true ) : int[]
$projectRoot string
$maxAge integer
$keepMax integer
$quiet boolean
Résultat int[] The numbers of deleted and kept builds.
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $projectRoot = $this->getProjectRoot();
     if (!$projectRoot) {
         throw new RootNotFoundException();
     }
     $builder = new LocalBuild(array(), $this->stdErr);
     $result = $builder->cleanBuilds($projectRoot, $input->getOption('max-age'), $input->getOption('keep'), $input->getOption('include-active'), false);
     if (!$result[0] && !$result[1]) {
         $this->stdErr->writeln("There are no builds to delete");
     } else {
         if ($result[0]) {
             $this->stdErr->writeln("Deleted <info>{$result[0]}</info> build(s)");
         }
         if ($result[1]) {
             $this->stdErr->writeln("Kept <info>{$result[1]}</info> build(s)");
         }
     }
     $archivesResult = $builder->cleanArchives($projectRoot);
     if ($archivesResult[0]) {
         $this->stdErr->writeln("Deleted <info>{$archivesResult[0]}</info> archive(s)");
     }
 }
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $projectRoot = $this->getProjectRoot();
     if (empty($projectRoot)) {
         $output->writeln("<error>You must run this command from a project folder.</error>");
         return;
     }
     $builder = new LocalBuild(array(), $output);
     $result = $builder->cleanBuilds($projectRoot, $input->getOption('max-age'), $input->getOption('keep'), $input->getOption('include-active'), false);
     if (!$result[0] && !$result[1]) {
         $output->writeln("There are no builds to delete");
     } else {
         if ($result[0]) {
             $output->writeln("Deleted <info>{$result[0]}</info> build(s)");
         }
         if ($result[1]) {
             $output->writeln("Kept <info>{$result[1]}</info> build(s)");
         }
     }
     $archivesResult = $builder->cleanArchives($projectRoot);
     if ($archivesResult[0]) {
         $output->writeln("Deleted <info>{$archivesResult[0]}</info> archive(s)");
     }
 }