if ($asFile) { $file =
$methodName.'.php';
$code =
str_replace("protected static function {
$methodName}(", 'public static function do(',
$code);
} else { $file = null;
} if ($definition->
hasErrors() &&
$e =
$definition->
getErrors()) { $code .=
sprintf(" throw new RuntimeException(%s);\n",
$this->
export(reset($e)));
} else { $this->serviceCalls =
[];
$this->inlinedDefinitions =
$this->
getDefinitionsFromArguments([$definition], null,
$this->serviceCalls
);
if ($definition->
isDeprecated()) { $deprecation =
$definition->
getDeprecation($id);
$code .=
sprintf(" trigger_deprecation(%s, %s, %s);\n\n",
$this->
export($deprecation['package'
]),
$this->
export($deprecation['version'
]),
$this->
export($deprecation['message'
]));
} elseif ($definition->
hasTag($this->hotPathTag
) || !
$definition->
hasTag($this->preloadTags
[1
])) { foreach ($this->inlinedDefinitions
as $def) { foreach ($this->
getClasses($def,
$id) as $class) { $this->preload
[$class] =
$class;
} } }