@@ -15,7 +15,7 @@ class Task {
15
15
16
16
protected $ fileHashList = [];
17
17
18
- public function __construct (string $ basePath , string $ pathMatch , $ details ) {
18
+ public function __construct (\ object $ details , string $ pathMatch , string $ basePath = "" ) {
19
19
$ basePath = $ this ->expandRelativePath ($ basePath );
20
20
$ this ->pathMatch = $ pathMatch ;
21
21
$ this ->absolutePath = implode (DIRECTORY_SEPARATOR , [
@@ -56,12 +56,12 @@ public function build():bool {
56
56
return $ changes ;
57
57
}
58
58
59
- protected function setDetails ($ details ):void {
59
+ protected function setDetails (object $ details ):void {
60
60
$ this ->execute = $ details ->execute ;
61
61
$ this ->name = $ details ->name ?? $ details ->execute ->command ;
62
62
63
- if (isset ($ details ->requires )) {
64
- foreach ($ details ->requires as $ key => $ value ) {
63
+ if (isset ($ details ->require )) {
64
+ foreach ($ details ->require as $ key => $ value ) {
65
65
$ this ->requirements []= new Requirement (
66
66
$ key ,
67
67
$ value
@@ -84,7 +84,7 @@ protected function execute():void {
84
84
}
85
85
86
86
protected function expandRelativePath (string $ basePath ):string {
87
- if ($ basePath [0 ] === " . " ) {
87
+ if ($ basePath [0 ] !== " / " ) {
88
88
$ basePath = getcwd () . substr (
89
89
$ basePath ,
90
90
1
0 commit comments