projek-xyz/container

View on GitHub

Showing 5 of 5 total issues

Missing class import via use statement (line '128', column '20').
Open

$ref = new \ReflectionClass($className);
Severity: Minor
Found in src/Container/Resolver.php by phpmd

Missing class import via use statement (line '163', column '24').
Open

return new \ReflectionFunction($callable);
Severity: Minor
Found in src/Container/Resolver.php by phpmd

Missing class import via use statement (line '167', column '24').
Open

$ref = new \ReflectionMethod($callable[0], $callable[1]);
Severity: Minor
Found in src/Container/Resolver.php by phpmd

Avoid assigning values to variables in if clauses and the like (line '194', column '35').
Open

private function resolveArgs(\ReflectionFunctionAbstract $reflection, array $args = []): array
{
foreach ($reflection->getParameters() as $param) {
// Just skip if parameter already provided.
if (\array_key_exists($position = $param->getPosition(), $args)) {
Severity: Minor
Found in src/Container/Resolver.php by phpmd

Avoid assigning values to variables in if clauses and the like (line '221', column '32').
Open

public function extend(string $id, \Closure $callback): object
{
$entry = $this->get($id);
 
// We treat any callable as a factory function which is might be returns
Severity: Minor
Found in src/Container.php by phpmd
Severity
Category
Status
Source
Language