public function testHasStandard() { $resolver = new StandardResolver(); $this->assertTrue($resolver->hasStandard('moodle')); $this->assertFalse($resolver->hasStandard('foo')); $resolver = new StandardResolver(['foo' => []]); $this->assertTrue($resolver->hasStandard('moodle')); $this->assertTrue($resolver->hasStandard('foo')); }
protected function initialize(InputInterface $input, OutputInterface $output) { parent::initialize($input, $output); // Resolve the coding standard. $resolver = new StandardResolver(); $this->standard = $input->getOption('standard'); if ($resolver->hasStandard($this->standard)) { $this->standard = $resolver->resolve($this->standard); } $this->finder = Finder::create()->notPath('yui/build')->notPath('amd/build')->name('*.php')->name('*.js')->notName('*-min.js'); }