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
/
Basic.php
diff --git
a/src/pharext/SourceDir/Basic.php
b/src/pharext/SourceDir/Basic.php
index 414c2015765a884f7c993316aca569f97645692c..fa180fee5896eede4bcefb5aebf2032a9c45e07b 100644
(file)
--- a/
src/pharext/SourceDir/Basic.php
+++ b/
src/pharext/SourceDir/Basic.php
@@
-3,6
+3,7
@@
namespace pharext\SourceDir;
use pharext\Cli\Args;
namespace pharext\SourceDir;
use pharext\Cli\Args;
+use pharext\License;
use pharext\SourceDir;
use FilesystemIterator;
use pharext\SourceDir;
use FilesystemIterator;
@@
-14,6
+15,8
@@
use RecursiveIteratorIterator;
class Basic implements IteratorAggregate, SourceDir
{
class Basic implements IteratorAggregate, SourceDir
{
+ use License;
+
private $path;
public function __construct($path) {
private $path;
public function __construct($path) {
@@
-28,6
+31,13
@@
class Basic implements IteratorAggregate, SourceDir
return [];
}
return [];
}
+ public function getLicense() {
+ if (($file = $this->findLicense($this->getBaseDir()))) {
+ return $this->readLicense($file);
+ }
+ return "UNKNOWN";
+ }
+
public function getArgs() {
return [];
}
public function getArgs() {
return [];
}