CodeExplorer addNewInstance example
elseif (!
$isSimpleInstance) { $instantiation = '$instance';
} $return = '';
if ($isSimpleInstance) { $return = 'return ';
} else { $instantiation .= ' = ';
} return $this->
addNewInstance($definition, ' '.
$return.
$instantiation,
$id,
$asGhostObject);
} private function isTrivialInstance(Definition
$definition): bool
{ if ($definition->
hasErrors()) { return true;
} if ($definition->
isSynthetic() ||
$definition->
getFile() ||
$definition->
getMethodCalls() ||
$definition->
getProperties() ||
$definition->
getConfigurator()) { return false;
} if ($definition->
isDeprecated() ||
$definition->
isLazy() ||
$definition->
getFactory() || 3 < \
count($definition->
getArguments())) { elseif (!
$isSimpleInstance) { $instantiation = '$instance';
} $return = '';
if ($isSimpleInstance) { $return = 'return ';
} else { $instantiation .= ' = ';
} return $this->
addNewInstance($definition, ' '.
$return.
$instantiation,
$id,
$asGhostObject);
} private function isTrivialInstance(Definition
$definition): bool
{ if ($definition->
hasErrors()) { return true;
} if ($definition->
isSynthetic() ||
$definition->
getFile() ||
$definition->
getMethodCalls() ||
$definition->
getProperties() ||
$definition->
getConfigurator()) { return false;
} if ($definition->
isDeprecated() ||
$definition->
isLazy() ||
$definition->
getFactory() || 3 < \
count($definition->
getArguments())) { elseif (!
$isSimpleInstance) { $instantiation = '$instance';
} $return = '';
if ($isSimpleInstance) { $return = 'return ';
} else { $instantiation .= ' = ';
} return $this->
addNewInstance($definition, ' '.
$return.
$instantiation,
$id);
} private function isTrivialInstance(Definition
$definition): bool
{ if ($definition->
hasErrors()) { return true;
} if ($definition->
isSynthetic() ||
$definition->
getFile() ||
$definition->
getMethodCalls() ||
$definition->
getProperties() ||
$definition->
getConfigurator()) { return false;
} if ($definition->
isDeprecated() ||
$definition->
isLazy() ||
$definition->
getFactory() || 3 < \
count($definition->
getArguments())) {