vendor/symfony/maker-bundle/src/Maker/AbstractMaker.php line 38

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Symfony MakerBundle package.
  4.  *
  5.  * (c) Fabien Potencier <fabien@symfony.com>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. namespace Symfony\Bundle\MakerBundle\Maker;
  11. use Symfony\Bundle\MakerBundle\ConsoleStyle;
  12. use Symfony\Bundle\MakerBundle\DependencyBuilder;
  13. use Symfony\Bundle\MakerBundle\MakerInterface;
  14. use Symfony\Component\Console\Command\Command;
  15. use Symfony\Component\Console\Input\InputInterface;
  16. /**
  17.  * Convenient abstract class for makers.
  18.  */
  19. abstract class AbstractMaker implements MakerInterface
  20. {
  21.     public function interact(InputInterface $inputConsoleStyle $ioCommand $command)
  22.     {
  23.     }
  24.     protected function writeSuccessMessage(ConsoleStyle $io)
  25.     {
  26.         $io->newLine();
  27.         $io->writeln(' <bg=green;fg=white>          </>');
  28.         $io->writeln(' <bg=green;fg=white> Success! </>');
  29.         $io->writeln(' <bg=green;fg=white>          </>');
  30.         $io->newLine();
  31.     }
  32.     protected function addDependencies(array $dependenciesstring $message null): string
  33.     {
  34.         $dependencyBuilder = new DependencyBuilder();
  35.         foreach ($dependencies as $class => $name) {
  36.             $dependencyBuilder->addClassDependency($class$name);
  37.         }
  38.         return $dependencyBuilder->getMissingPackagesMessage(
  39.             $this->getCommandName(),
  40.             $message
  41.         );
  42.     }
  43. }