Your project should not use invalid return types 10

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

  1. {
  2. public const MAX_DEEP = 5;
  3. public function getDomDocumentHandler(): AbstractDocument
  4. {
  5. return parent::getDomDocumentHandler();

    Method WsdlToPhp\WsdlHandler\Tag\AbstractTag::getDomDocumentHandler() should return WsdlToPhp\WsdlHandler\AbstractDocument but returns WsdlToPhp\DomHandler\AbstractDomDocumentHandler.

    Time to fix: about 9 minutes
    Read doc Open Issue Permalink
    Last edited by Mikaël DELSOL
  6. }
  7. /**
  8. * This method aims to get the parent element that matches a valid Wsdl element (aka struct).
  9. *
  • mikaelcom

    Ignored on Wed, 11 Dec 2024 05:31:58 GMT
  1. } else {
  2. $parentNode = null;
  3. }
  4. }
  5. return $parentNode;

    Method WsdlToPhp\WsdlHandler\Tag\AbstractTag::getSuitableParent() should return WsdlToPhp\DomHandler\NodeHandler|null but returns WsdlToPhp\DomHandler\AbstractNodeHandler|null.

    Time to fix: about 9 minutes
    Read doc Open Issue Permalink
    Last edited by Mikaël DELSOL
  6. }
  7. public function hasAttributeName(): bool
  8. {
  9. return $this->hasAttribute(Attribute::ATTRIBUTE_NAME);
  • mikaelcom

    Ignored on Mon, 09 Dec 2024 21:08:05 GMT
  1. {
  2. public const ATTRIBUTE_MESSAGE = 'message';
  3. public function getParentOperation(): ?TagOperation
  4. {
  5. return $this->getStrictParent(AbstractDocument::TAG_OPERATION);

    Method WsdlToPhp\WsdlHandler\Tag\AbstractTagOperationElement::getParentOperation() should return WsdlToPhp\WsdlHandler\Tag\TagOperation|null but returns WsdlToPhp\DomHandler\AbstractNodeHandler|null.

    Time to fix: about 9 minutes
    Read doc Open Issue Permalink
    Last edited by Mikaël DELSOL
  6. }
  7. public function hasAttributeMessage(): bool
  8. {
  9. return $this->hasAttribute(self::ATTRIBUTE_MESSAGE);
  • mikaelcom

    Ignored on Mon, 09 Dec 2024 21:08:23 GMT
  1. $message = $this->getDomDocumentHandler()->getElementByNameAndAttributes(AbstractDocument::TAG_MESSAGE, [
  2. 'name' => $messageName,
  3. ], true);
  4. }
  5. return $message;

    Method WsdlToPhp\WsdlHandler\Tag\AbstractTagOperationElement::getMessage() should return WsdlToPhp\WsdlHandler\Tag\TagMessage|null but returns WsdlToPhp\DomHandler\ElementHandler|null.

    Time to fix: about 9 minutes
    Read doc Open Issue Permalink
    Last edited by Mikaël DELSOL
  6. }
  7. public function getParts(): ?array
  8. {
  9. $parts = null;
  • mikaelcom

    Ignored on Mon, 09 Dec 2024 21:08:10 GMT
in src/Tag/Tag.php, line 19
  1. return $this->getFirstRestrictionChild() instanceof Restriction;
  2. }
  3. public function getFirstRestrictionChild(): ?TagRestriction
  4. {
  5. return $this->getChildByNameAndAttributes(AbstractDocument::TAG_RESTRICTION, []);

    Method WsdlToPhp\WsdlHandler\Tag\Tag::getFirstRestrictionChild() should return WsdlToPhp\WsdlHandler\Tag\TagRestriction|null but returns WsdlToPhp\DomHandler\ElementHandler|null.

    Time to fix: about 9 minutes
    Read doc Open Issue Permalink
    Last edited by Mikaël DELSOL
  6. }
  7. /**
  8. * Checks if the given tag is the same direct parent of this current tag.
  9. */
  • mikaelcom

    Ignored on Mon, 09 Dec 2024 21:08:13 GMT
  1. public function getSuitableParent(bool $checkName = true, array $additionalTags = [], int $maxDeep = self::MAX_DEEP, bool $strict = false): ?AbstractNodeHandler
  2. {
  3. if (!$strict) {
  4. $enumerationTag = $this->getStrictParent(AbstractDocument::TAG_ENUMERATION);
  5. if ($enumerationTag instanceof TagEnumeration) {
  6. return $enumerationTag;

    Method WsdlToPhp\WsdlHandler\Tag\TagDocumentation::getSuitableParent() should return WsdlToPhp\DomHandler\NodeHandler|null but returns WsdlToPhp\WsdlHandler\Tag\TagEnumeration.

    Time to fix: about 9 minutes
    Read doc Open Issue Permalink
    Last edited by Mikaël DELSOL
  7. }
  8. }
  9. return parent::getSuitableParent($checkName, $additionalTags, $maxDeep, $strict);
  10. }
  • mikaelcom

    Ignored on Mon, 09 Dec 2024 21:08:29 GMT
  1. return $this->getValueAttributeValue(true);
  2. }
  3. public function getRestrictionParent(): ?TagRestriction
  4. {
  5. return $this->getStrictParent(AbstractDocument::TAG_RESTRICTION);

    Method WsdlToPhp\WsdlHandler\Tag\TagEnumeration::getRestrictionParent() should return WsdlToPhp\WsdlHandler\Tag\TagRestriction|null but returns WsdlToPhp\DomHandler\AbstractNodeHandler|null.

    Time to fix: about 9 minutes
    Read doc Open Issue Permalink
    Last edited by Mikaël DELSOL
  6. }
  7. public function getRestrictionParentType(): string
  8. {
  9. /** @var null|TagRestriction $restrictionParent */
  • mikaelcom

    d on Mon, 09 Dec 2024 21:07:47 GMT
in src/Tag/TagHeader.php, line 19
  1. public const OPTIONAL_HEADER = 'optional';
  2. public const ATTRIBUTE_REQUIRED = 'wsdl:required';
  3. public function getParentInput(): ?TagInput
  4. {
  5. return $this->getStrictParent(AbstractDocument::TAG_INPUT);

    Method WsdlToPhp\WsdlHandler\Tag\TagHeader::getParentInput() should return WsdlToPhp\WsdlHandler\Tag\TagInput|null but returns WsdlToPhp\DomHandler\AbstractNodeHandler|null.

    Time to fix: about 9 minutes
    Read doc Open Issue Permalink
    Last edited by Mikaël DELSOL
  6. }
  7. public function getAttributeRequired(): bool
  8. {
  9. return $this->hasAttribute(self::ATTRIBUTE_REQUIRED) ? $this->getAttribute(self::ATTRIBUTE_REQUIRED)->getValue(true, true, 'bool') : true;
  • mikaelcom

    Ignored on Mon, 09 Dec 2024 21:08:16 GMT
  1. class TagMessage extends Tag
  2. {
  3. public function getPart(string $name): ?TagPart
  4. {
  5. return $this->getChildByNameAndAttributes(AbstractDocument::TAG_PART, [

    Method WsdlToPhp\WsdlHandler\Tag\TagMessage::getPart() should return WsdlToPhp\WsdlHandler\Tag\TagPart|null but returns WsdlToPhp\DomHandler\ElementHandler|null.

    Time to fix: about 9 minutes
    Read doc Open Issue Permalink
    Last edited by Mikaël DELSOL
  6. 'name' => $name,
  7. ]);
  8. }
  9. }
  • mikaelcom

    Ignored on Mon, 09 Dec 2024 21:08:32 GMT
in src/Tag/TagPart.php, line 33
  1. $element = $this->getDomDocumentHandler()->getElementByNameAndAttributes(AbstractDocument::TAG_ELEMENT, [
  2. 'name' => $elementName,
  3. ], true);
  4. }
  5. return $element;

    Method WsdlToPhp\WsdlHandler\Tag\TagPart::getMatchingElement() should return WsdlToPhp\WsdlHandler\Tag\TagElement|null but returns WsdlToPhp\DomHandler\ElementHandler|null.

    Time to fix: about 9 minutes
    Read doc Open Issue Permalink
    Last edited by Mikaël DELSOL
  6. }
  7. /**
  8. * @return null|AttributeHandler|int|string
  9. */
  • mikaelcom

    Ignored on Mon, 09 Dec 2024 21:08:19 GMT

Your project should use return types 2

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

  1. public function hasAttributeValue(): bool
  2. {
  3. return $this->hasAttribute(Attribute::ATTRIBUTE_VALUE);
  4. }
  5. public function getValueAttributeValue(bool $withNamespace = false, bool $withinItsType = true, ?string $asType = null)

    Method WsdlToPhp\WsdlHandler\Tag\AbstractTag::getValueAttributeValue() has no return type specified.

    Time to fix: about 9 minutes
    Read doc Open Issue Permalink
    Last edited by Mikaël DELSOL
  6. {
  7. return $this->getAttribute(Attribute::ATTRIBUTE_VALUE) instanceof Attribute ? $this->getAttribute(Attribute::ATTRIBUTE_VALUE)->getValue($withNamespace, $withinItsType, $asType) : '';
  8. }
  9. public function hasAttributeTargetNamespace(): bool
  • mikaelcom

    Ignored on Mon, 09 Dec 2024 21:08:41 GMT
  1. public function hasAttributeTargetNamespace(): bool
  2. {
  3. return $this->hasAttribute(AbstractDocument::ATTRIBUTE_TARGET_NAMESPACE);
  4. }
  5. public function getTargetNamespaceAttributeValue()

    Method WsdlToPhp\WsdlHandler\Tag\AbstractTag::getTargetNamespaceAttributeValue() has no return type specified.

    Time to fix: about 9 minutes
    Read doc Open Issue Permalink
    Last edited by Mikaël DELSOL
  6. {
  7. return $this->getAttribute(AbstractDocument::ATTRIBUTE_TARGET_NAMESPACE) instanceof Attribute ? $this->getAttribute(AbstractDocument::ATTRIBUTE_TARGET_NAMESPACE)->getValue(true) : '';
  8. }
  9. /**
  • mikaelcom

    Ignored on Mon, 09 Dec 2024 21:08:52 GMT