projects
/
pharext
/
pharext
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
license helper
[pharext/pharext]
/
src
/
pharext
/
SourceDir
/
Git.php
diff --git
a/src/pharext/SourceDir/Git.php
b/src/pharext/SourceDir/Git.php
index e17a3055c15d1b5fd534e73f3bdbb3f529afbc67..62dc24f9e5162cfde0cf7ff3d6380c4e5a7a2875 100644
(file)
--- a/
src/pharext/SourceDir/Git.php
+++ b/
src/pharext/SourceDir/Git.php
@@
-2,8
+2,8
@@
namespace pharext\SourceDir;
namespace pharext\SourceDir;
-use pharext\Command;
use pharext\Cli\Args;
use pharext\Cli\Args;
+use pharext\License;
use pharext\SourceDir;
/**
use pharext\SourceDir;
/**
@@
-11,6
+11,8
@@
use pharext\SourceDir;
*/
class Git implements \IteratorAggregate, SourceDir
{
*/
class Git implements \IteratorAggregate, SourceDir
{
+ use License;
+
/**
* Base directory
* @var string
/**
* Base directory
* @var string
@@
-41,6
+43,17
@@
class Git implements \IteratorAggregate, SourceDir
return [];
}
return [];
}
+ /**
+ * @inheritdoc
+ * @return string
+ */
+ public function getLicense() {
+ if (($file = $this->findLicense($this->getBaseDir()))) {
+ return $this->readLicense($file);
+ }
+ return "UNKNOWN";
+ }
+
/**
* @inheritdoc
* @return array
/**
* @inheritdoc
* @return array