Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php @ 16:c2387f117808
Routine composer update
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 15:07:59 +0100 |
parents | 1fec387a4317 |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
15:e200cb7efeb3 | 16:c2387f117808 |
---|---|
104 * | 104 * |
105 * @return bool If the definition is inlineable | 105 * @return bool If the definition is inlineable |
106 */ | 106 */ |
107 private function isInlineableDefinition($id, Definition $definition, ServiceReferenceGraph $graph) | 107 private function isInlineableDefinition($id, Definition $definition, ServiceReferenceGraph $graph) |
108 { | 108 { |
109 if ($definition->getErrors() || $definition->isDeprecated() || $definition->isLazy() || $definition->isSynthetic()) { | |
110 return false; | |
111 } | |
112 | |
109 if (!$definition->isShared()) { | 113 if (!$definition->isShared()) { |
110 return true; | 114 return true; |
111 } | 115 } |
112 | 116 |
113 if ($definition->isDeprecated() || $definition->isPublic() || $definition->isPrivate() || $definition->isLazy()) { | 117 if ($definition->isPublic() || $definition->isPrivate()) { |
114 return false; | 118 return false; |
115 } | 119 } |
116 | 120 |
117 if (!$graph->hasNode($id)) { | 121 if (!$graph->hasNode($id)) { |
118 return true; | 122 return true; |
136 | 140 |
137 if (count($ids) > 1 && is_array($factory = $definition->getFactory()) && ($factory[0] instanceof Reference || $factory[0] instanceof Definition)) { | 141 if (count($ids) > 1 && is_array($factory = $definition->getFactory()) && ($factory[0] instanceof Reference || $factory[0] instanceof Definition)) { |
138 return false; | 142 return false; |
139 } | 143 } |
140 | 144 |
141 return true; | 145 return !$ids || $this->container->getDefinition($ids[0])->isShared(); |
142 } | 146 } |
143 } | 147 } |