File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,11 @@ public function getId(): string
3030 return $ this ->id ;
3131 }
3232
33- public function has (string $ path ): bool
33+ public function has (? string $ path ): bool
3434 {
35+ if (!$ path ) {
36+ return true ;
37+ }
3538 try {
3639 $ this ->reference ($ path )->hasValue ();
3740 return true ;
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ public function getId(): string
5151 public function has (?string $ path ): bool
5252 {
5353 if (!$ path ) {
54- return false ;
54+ return true ;
5555 }
5656 foreach ($ this ->documents as $ document ) {
5757 if ($ document ->has ($ path )) {
@@ -63,9 +63,6 @@ public function has(?string $path): bool
6363
6464 public function get (string $ path = null ): mixed
6565 {
66- if (!$ path ) {
67- return false ;
68- }
6966 foreach ($ this ->documents as $ document ) {
7067 if ($ document ->has ($ path )) {
7168 return $ document ->get ($ path );
You can’t perform that action at this time.
0 commit comments