Skip to content

Fix sniff Magento2.Annotation.MethodAnnotationStructure to exclude false positive fail #34679

Closed
@andrewbess

Description

@andrewbess

We are faced with the problem of false positive fail for the sniff Magento2.Annotation.MethodAnnotationStructure when added #[\ReturnTypeWillChange] attribute to make compatibility with PHP 8.1

example:

/**
 * Check if given type is any type.
 *
 * @param string $type
 * @return bool
 */
#[\ReturnTypeWillChange]
public function isTypeAny($type)

Expected result (*)

Results of the static tests should be passed for this issue

Actual result (*)

FILE: /var/www/html/lib/internal/Magento/Framework/App/Cache/Frontend/Pool.php
------------------------------------------------------------------------------
FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
------------------------------------------------------------------------------
 101 | WARNING | Comment block is missing
 111 | WARNING | Comment block is missing
 121 | WARNING | Comment block is missing
 131 | WARNING | Comment block is missing
 141 | WARNING | Comment block is missing
------------------------------------------------------------------------------

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions