Your project must not contain invalid instantiations

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

in src/Model/Struct.php, line 254
  1. return $enum;
  2. }
  3. $this
  4. ->setStruct(true)
  5. ->setRestriction(true)
  6. ->getValues()->add(new StructValue($this->getGenerator(), $value, $this->getValues()->count(), $this));
    Parameter #1 $generator of class WsdlToPhp\PackageGenerator\Model\StructValue constructor expects WsdlToPhp\PackageGenerator\Generator\Generator, WsdlToPhp\PackageGenerator\Generator\Generator|null given.
    Time to fix: about 1 hour
    Read doc Permalink Copy Prompt
    Last edited by Mikaël DELSOL
  7. }
  8. return $this;
  9. }

Your project must not contain invalid function or method calls 4

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

  1. $parent = $choice->getSuitableParent();
  2. $children = $choice->getChildrenElements();
  3. if ($parent && count($children) && ($struct = $this->getModel($parent)) instanceof Struct) {
  4. $unionNames = [];
  5. foreach ($children as $child) {
  6. $unionNames[] = $child->getAttributeName() ? $child->getAttributeName() : $child->getAttributeRef();
    Cannot call method getAttributeName() on mixed.
    Time to fix: about 9 minutes
    Read doc Permalink Copy Prompt
    Last edited by Mikaël DELSOL
  7. }
  8. foreach ($children as $child) {
  9. $this->parseChoiceChild($choice, $unionNames, $child, $struct);
  10. }
  11. unset($unionNames);
  1. $parent = $choice->getSuitableParent();
  2. $children = $choice->getChildrenElements();
  3. if ($parent && count($children) && ($struct = $this->getModel($parent)) instanceof Struct) {
  4. $unionNames = [];
  5. foreach ($children as $child) {
  6. $unionNames[] = $child->getAttributeName() ? $child->getAttributeName() : $child->getAttributeRef();
    Cannot call method getAttributeRef() on mixed.
    Time to fix: about 9 minutes
    Read doc Permalink Copy Prompt
    Last edited by Mikaël DELSOL
  7. }
  8. foreach ($children as $child) {
  9. $this->parseChoiceChild($choice, $unionNames, $child, $struct);
  10. }
  11. unset($unionNames);
in src/File/Composer.php, line 123
  1. protected function getComposerFileContent(): array
  2. {
  3. $content = [];
  4. $composerFilePath = $this->getComposerFilePath();
  5. if (!empty($composerFilePath)) {
  6. $content = json_decode(file_get_contents($composerFilePath), true);
    Parameter #1 $json of function json_decode expects string, string|false given.
    Time to fix: about 9 minutes
    Read doc Permalink Copy Prompt
    Last edited by Mikael DELSOL
  7. }
  8. return $content;
  9. }
  1. if (!$this->isKnownTypeUnknown($method)) {
  2. return;
  3. }
  4. $parts = $tag->getParts();
  5. $multipleParts = count($parts);
    Parameter #1 $var of function count expects array|Countable, array|null given.
    Time to fix: about 9 minutes
    Read doc Permalink Copy Prompt
    Last edited by Mikaël DELSOL
  6. if (is_array($parts) && $multipleParts > 1) {
  7. $types = [];
  8. foreach ($parts as $part) {
  9. if (!empty($type = $this->getTypeFromPart($part))) {
  10. $types[$part->getAttributeName()] = $type;