/** * Get the source files as an associative array. * * @return array */ public function getSourceFiles() { $sourceFiles = array(); $ignore = $this->configuration->get('ignore'); if (is_dir($this->get('source'))) { $recursiveIterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->get('source'))); foreach ($recursiveIterator as $file) { if (!$ignore || !preg_match($ignore, $file->getPathname())) { $sourceFiles[$file->getFilename()] = $file->getPathname(); } } } return $sourceFiles; }
/** * Set a single option for this command. * * @param string $name Name of the option to set. * @param mixed $value Value for that option. * * @return \Clinner\Command\Command This instance, for a fluent API. */ public function setOption($name, $value) { $this->_options->set($name, $value); return $this; }
/** * @dataProvider getInitialValues */ public function testIsEmpty($initialValues) { $valueHolder = new ValueHolder($initialValues); $this->assertEquals(empty($initialValues), $valueHolder->isEmpty()); }