original_string: public function offsetGet($class)
  	{
  		if (!isset($this->factories[$class]) && !isset($this->instances[$class])) {
  			throw new \InvalidArgumentException("$class has not been defined");
  		}
  
  		if (isset($this->instances[$class])) {
  			return $this->instances[$class];
  		}
  
  		array_push($this->resolving, $class);
  		$object = $this->invoke($this->factories[$class]);
  		array_pop($this->resolving);
  
  		return $object;
  	}
code: public function offsetGet($class)
  	{
  		if (!isset($this->factories[$class]) && !isset($this->instances[$class])) {
  			throw new \InvalidArgumentException("$class has not been defined");
  		}
  
  		if (isset($this->instances[$class])) {
  			return $this->instances[$class];
  		}
  
  		array_push($this->resolving, $class);
  		$object = $this->invoke($this->factories[$class]);
  		array_pop($this->resolving);
  
  		return $object;
  	}
code_tokens: public function offsetGet ( $ class ) { if ( ! isset ( $ this -> factories [ $ class ] ) && ! isset ( $ this -> instances [ $ class ] ) ) { throw new \ InvalidArgumentException ( "$class has not been defined" ) ; } if ( isset ( $ this -> instances [ $ class ] ) ) { return $ this -> instances [ $ class ] ; } array_push ( $ this -> resolving , $ class ) ; $ object = $ this -> invoke ( $ this -> factories [ $ class ] ) ; array_pop ( $ this -> resolving ) ; return $ object ; }
docstring: get a dependency for the supplied class
  
  @param $type string
  The type to get
  
  @return mixed
  The dependency/type value
docstring_tokens: get a dependency for the supplied class