-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#16 has() method doesn't look at $resolved values
- Loading branch information
Showing
3 changed files
with
15 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
* Author Email: [email protected] | ||
* Author Site: https://wp-yoda.com/en/ | ||
* | ||
* Version: 1.1.2 | ||
* Version: 1.2.2 | ||
* Source Code: https://github.com/renakdup/simple-dic | ||
* | ||
* Licence: MIT License | ||
|
@@ -80,7 +80,6 @@ public function get( string $id ) { | |
} | ||
|
||
$service = $this->resolve( $id ); | ||
|
||
$this->resolved[ $id ] = $service; | ||
|
||
return $service; | ||
|
@@ -98,7 +97,7 @@ public function get( string $id ) { | |
* @return bool | ||
*/ | ||
public function has( string $id ): bool { | ||
return array_key_exists( $id, $this->services ); | ||
return array_key_exists( $id, $this->resolved ) || array_key_exists( $id, $this->services ); | ||
} | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters