X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Fpharext%2FSourceDir%2FBasic.php;h=fa180fee5896eede4bcefb5aebf2032a9c45e07b;hb=e44f0adc7b18845a2cd3dc63fdab5d9bcdc10f76;hp=414c2015765a884f7c993316aca569f97645692c;hpb=4b95e2c390f07d2eb22d099c33b68c7f9ff97777;p=pharext%2Fpharext diff --git a/src/pharext/SourceDir/Basic.php b/src/pharext/SourceDir/Basic.php index 414c201..fa180fe 100644 --- a/src/pharext/SourceDir/Basic.php +++ b/src/pharext/SourceDir/Basic.php @@ -3,6 +3,7 @@ namespace pharext\SourceDir; use pharext\Cli\Args; +use pharext\License; use pharext\SourceDir; use FilesystemIterator; @@ -14,6 +15,8 @@ use RecursiveIteratorIterator; class Basic implements IteratorAggregate, SourceDir { + use License; + private $path; public function __construct($path) { @@ -28,6 +31,13 @@ class Basic implements IteratorAggregate, SourceDir return []; } + public function getLicense() { + if (($file = $this->findLicense($this->getBaseDir()))) { + return $this->readLicense($file); + } + return "UNKNOWN"; + } + public function getArgs() { return []; }