namespace pharext\SourceDir;
use pharext\Cli\Args;
+use pharext\License;
use pharext\SourceDir;
use FilesystemIterator;
class Basic implements IteratorAggregate, SourceDir
{
+ use License;
+
private $path;
public function __construct($path) {
return [];
}
+ public function getLicense() {
+ if (($file = $this->findLicense($this->getBaseDir()))) {
+ return $this->readLicense($file);
+ }
+ return "UNKNOWN";
+ }
+
public function getArgs() {
return [];
}
$rii = new RecursiveIteratorIterator($rci);
foreach ($rii as $path => $child) {
if (!$child->isDir()) {
- yield $path;
+ yield realpath($path);
}
}
}