namespace pharext\SourceDir;
-use pharext\Command;
use pharext\Cli\Args;
+use pharext\Exception;
+use pharext\ExecCmd;
+use pharext\License;
+use pharext\PackageInfo;
use pharext\SourceDir;
+use pharext\Tempfile;
/**
* Extension source directory which is a git repo
*/
class Git implements \IteratorAggregate, SourceDir
{
+ use License;
+ use PackageInfo;
+
/**
* Base directory
* @var string
* @return array
*/
public function getPackageInfo() {
- return [];
+ return $this->findPackageInfo($this->getBaseDir());
+ }
+
+ /**
+ * @inheritdoc
+ * @return string
+ */
+ public function getLicense() {
+ if (($file = $this->findLicense($this->getBaseDir()))) {
+ return $this->readLicense($file);
+ }
+ return "UNKNOWN";
}
/**