Ejemplo n.º 1
0
 protected function marshallParts(InputInterface $input) : array
 {
     $parts = $input->getOption('part');
     $invalidParts = array_diff($parts, $this->validParts);
     Assertion::noContent($invalidParts, sprintf('Invalid parts specified: %s', implode(', ', $invalidParts)));
     if (in_array(static::PART_ALL, $parts)) {
         $parts = $this->puzzle->getPartMethods();
     }
     return $parts;
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function __construct(string $name = "Not Quite Lisp", array $parts = ['floor' => 'Santa is at floor <info>%d</info>', 'basement' => 'Santa entered the basement after stepping into <info>%d</info> floors'])
 {
     parent::__construct($name, $parts);
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function __construct(string $name = "Probably a Fire Hazard", array $parts = ['lights' => 'There are <info>%d</info> lights lit', 'brightness' => 'The total brightness is <info>%d</info>'])
 {
     parent::__construct($name, $parts);
 }
Ejemplo n.º 4
0
 /**
  * {@inheritdoc}
  */
 public function __construct(string $name = "Perfectly Spherical Houses in a Vacuum", array $parts = ['houses' => 'Santa delivered at least one present in <info>%d</info> houses', 'robo' => 'Santa together with Robo-Santa delivered at least one present in <info>%d</info> houses'])
 {
     parent::__construct($name, $parts);
 }