Skip to content

Commit

Permalink
Fixing TODO statements and unused use namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
moufmouf committed Aug 24, 2014
1 parent 88f3983 commit a525dbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
11 changes: 4 additions & 7 deletions src/Interop/Container/Pimple/FallbackContainerAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
namespace Interop\Container\Pimple;

use Interop\Container\ContainerInterface;
use Interop\Container\ParentAwareContainerInterface;

/**
* This class wraps a container into an object that can be used as an array
Expand Down Expand Up @@ -71,25 +70,23 @@ public function has($identifier) {
}

/**
* Not available in fallback container
* Forwarded to Pimple original container (although it should be avoided)
*
* @param string $id The unique identifier for the parameter or object
* @param mixed $value The value of the parameter or a closure to defined an object
*/
public function offsetSet($id, $value)
{
// TODO: we could fallback to the original Pimple here.
// same thing in __call.
throw new \Exception("Setting an instance in a root container is not allowed. You can only do that is pure Pimple containers.");
$this->container->offsetSet($id, $value);
}

/**
* Not available in fallback container
* Forwarded to Pimple original container (although it should be avoided)
*
* @param string $id The unique identifier for the parameter or object
*/
public function offsetUnset($id)
{
throw new \Exception("Unsetting an instance in a root container is not allowed. You can only do that is pure Pimple containers.");
$this->container->offsetUnset($id);
}
}
1 change: 0 additions & 1 deletion src/Interop/Container/Pimple/PimpleInterop.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
namespace Interop\Container\Pimple;

use Interop\Container\ContainerInterface;
use Interop\Container\ParentAwareContainerInterface;

/**
* This class extends the Pimple class.
Expand Down

0 comments on commit a525dbe

Please sign in to comment.