Your project must not contain invalid function or method calls 5

More information: https://insight.symfony.com/what-we-analyse/php.invalid_call

in src/Container.php, line 116
  1. $this->factories[$id] = \is_object($factory) && ! ($factory instanceof Closure)
  2. ? \get_class($factory)
  3. : $factory;
  4. $entry = $this->resolver->resolve($this->factories[$id]);
    Unable to resolve the template type TObj in call to method Projek\Container\Resolver::resolve()
    Last edited by Fery Wardiyanto
  5. if (\is_object($entry) && $this->isInjectable($entry)) {
  6. $entry->setContainer($this);
  7. }
in src/Container.php, line 190
  1. if ($condition) {
  2. $instance = $condition($instance) ?: $instance;
  3. }
  4. return $this->resolver->handle($instance, $args);
    Parameter #1 $callable of method Projek\Container\Resolver::handle() expects callable(): mixed, (callable(): mixed)|TObj of object given.
    Last edited by Fery Wardiyanto
  5. }
  6. /**
  7. * Extending an entry.
  8. *
  1. ? \explode('::', $entry)
  2. : $this->createInstance($entry, $args);
  3. }
  4. if (\is_array($entry) && \is_string($entry[0])) {
  5. $entry[0] = $this->resolve($entry[0], $args);
    Unable to resolve the template type TObj in call to method Projek\Container\Resolver::resolve()
    Last edited by Fery Wardiyanto
  6. }
  7. if (\is_object($entry) || \is_callable($entry)) {
  8. return $entry;
  9. }
  1. // Otherwise convert it to closure.
  2. $callable = Closure::fromCallable($callable);
  3. }
  4. $ref = $this->createCallableReflection($callable);
    Parameter #1 $callable of method Projek\Container\Resolver::createCallableReflection() expects array{string, string}|Closure|string, callable(): mixed given.
    Last edited by Fery Wardiyanto
  5. $caller = $ref->getName();
  6. /** @var array{object|null, TArgs} */
  7. $params = [];
  1. }
  2. try {
  3. $params[] = $this->resolveArgs($ref, $args);
  4. return $ref->invokeArgs(...$params);
    Method ReflectionFunction::invokeArgs() invoked with 3 parameters, 1-2 required.
    Last edited by Fery Wardiyanto
  5. } catch (Exception $err) {
  6. throw new Exception($caller . '(): ' . $err->getMessage(), $err->getPrevious());
  7. }
  8. }

Your project should not use invalid return types 3

More information: https://insight.symfony.com/what-we-analyse/php.invalid_return_typehint

in src/Container.php, line 190
  1. if ($condition) {
  2. $instance = $condition($instance) ?: $instance;
  3. }
  4. return $this->resolver->handle($instance, $args);
    Method Projek\Container::make() should return object but returns mixed.
    Last edited by Fery Wardiyanto
  5. }
  6. /**
  7. * Extending an entry.
  8. *
  1. if (\is_array($entry) && \is_string($entry[0])) {
  2. $entry[0] = $this->resolve($entry[0], $args);
  3. }
  4. if (\is_object($entry) || \is_callable($entry)) {
  5. return $entry;
    Method Projek\Container\Resolver::resolve() should return (callable(): mixed)|TObj of object but returns (callable(): mixed)|object.
    Last edited by Fery Wardiyanto
  6. }
  7. throw new InvalidArgumentException(
  8. \sprintf('Cannot resolve invalid entry of "%s"', \gettype($entry))
  9. );
  1. $args[$position] = $param->getDefaultValue();
  2. }
  3. }
  4. return $args;
    Method Projek\Container\Resolver::resolveArgs() should return TArgs of array<int, mixed> but returns array<int, mixed>.
    Last edited by Fery Wardiyanto
  5. }
  6. }