Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix @meyerbaptiste comments
  • Loading branch information
dunglas committed Oct 1, 2015
commit a7ca3f231bc426d1f21b86e3e65c37e948b6ee9e
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ private function populateAvailableTypes()
}

/**
* Populates the of available types for a given definition.
* Populates the list of available types for a given definition.
*
* @param string $id
* @param Definition $definition
*/
private function populateAvailableType($id, Definition $definition)
{
if (!($class = $definition->getClass())) {
if (!$definition->getClass()) {
return;
}

Expand Down Expand Up @@ -172,19 +172,19 @@ private function extractAncestors($id, \ReflectionClass $reflectionClass)
}

/**
* Associates if applicable a type and a service id or a class.
* Associates a type and a service id if applicable.
*
* @param string $type
* @param string $value A service id or a class name depending of the value of $class
* @param string $id
*/
private function set($type, $value)
private function set($type, $id)
{
if (isset($this->definedTypes[$type]) || isset($this->notGuessableTypes[$type])) {
return;
}

if (isset($this->types[$type])) {
if ($this->types[$type] === $value) {
if ($this->types[$type] === $id) {
return;
}

Expand All @@ -194,7 +194,7 @@ private function set($type, $value)
return;
}

$this->types[$type] = $value;
$this->types[$type] = $id;
}

/**
Expand Down