Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jun 29, 2017
1 parent 3077e58 commit a6068b0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 21 deletions.
40 changes: 20 additions & 20 deletions src/Illuminate/Container/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ public function bound($abstract)
$this->isAlias($abstract);
}

/**
* {@inheritdoc}
*/
public function has($id)
{
return $this->bound($id);
}

/**
* Determine if the given abstract type has been resolved.
*
Expand Down Expand Up @@ -578,6 +586,18 @@ public function make($abstract, array $parameters = [])
return $this->resolve($abstract, $parameters);
}

/**
* {@inheritdoc}
*/
public function get($id)
{
if ($this->has($id)) {
return $this->resolve($id);
}

throw new EntryNotFoundException;
}

/**
* Resolve the given type from the container.
*
Expand Down Expand Up @@ -1222,24 +1242,4 @@ public function __set($key, $value)
{
$this[$key] = $value;
}

/**
* {@inheritdoc}
*/
public function get($id)
{
if ($this->has($id)) {
return $this->resolve($id);
}

throw new EntryNotFoundException();
}

/**
* {@inheritdoc}
*/
public function has($id)
{
return $this->bound($id);
}
}
1 change: 1 addition & 0 deletions src/Illuminate/Container/EntryNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@

class EntryNotFoundException extends Exception implements NotFoundExceptionInterface
{
//
}
3 changes: 2 additions & 1 deletion src/Illuminate/Contracts/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
}
],
"require": {
"php": ">=7.0"
"php": ">=7.0",
"psr/container": "~1.0"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit a6068b0

Please sign in to comment.