Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
mnapoli authored and StyleCIBot committed Aug 19, 2017
1 parent 2d36040 commit 36e9708
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/Compiler/ObjectCreationCompiler.php
Expand Up @@ -195,6 +195,7 @@ private function assertClassIsInstantiable(ObjectDefinition $definition)
$definition->getName()
));
}

throw InvalidDefinition::create($definition, sprintf(
'Entry "%s" cannot be compiled: the class is not instantiable',
$definition->getName()
Expand Down
1 change: 1 addition & 0 deletions src/Container.php
Expand Up @@ -353,6 +353,7 @@ private function resolveDefinition(Definition $definition, array $parameters = [
$value = $this->definitionResolver->resolve($definition, $parameters);
} catch (Exception $exception) {
unset($this->entriesBeingResolved[$entryName]);

throw $exception;
}

Expand Down
8 changes: 4 additions & 4 deletions src/Definition/Definition.php
Expand Up @@ -20,8 +20,8 @@ interface Definition extends RequestedEntry
*/
public function getName() : string;

/**
* Definitions can be cast to string for debugging information.
*/
public function __toString();
/**
* Definitions can be cast to string for debugging information.
*/
public function __toString();
}
1 change: 1 addition & 0 deletions src/Definition/Helper/CreateDefinitionHelper.php
Expand Up @@ -184,6 +184,7 @@ private function fixParameters(ObjectDefinition $definition, string $method, arr
// Parameter indexed by the parameter name, we reindex it with its position
if (is_string($index)) {
$callable = [$definition->getClassName(), $method];

try {
$reflectionParameter = new \ReflectionParameter($callable, $index);
} catch (\ReflectionException $e) {
Expand Down
1 change: 1 addition & 0 deletions src/Definition/Resolver/InstanceInjector.php
Expand Up @@ -34,6 +34,7 @@ public function resolve(Definition $definition, array $parameters = [])
get_class($definition->getInstance()),
$e->getMessage()
);

throw new DependencyException($message, 0, $e);
}
}
Expand Down

0 comments on commit 36e9708

Please sign in to comment.