mago icon indicating copy to clipboard operation
mago copied to clipboard

Analyzer doesn't like `@method` annotations with `static` return type

Open ADmad opened this issue 3 months ago • 0 comments

E.g code:

<?php
/**
 * @method static foo()
 */
class MagoTest
{
}

Mago analyzer output:

error[malformed-docblock-comment]: Failed to parse class-like docblock comment.
  ┌─ src/mago_test.php:3:12
  │
3 │  * @method static foo()
  │            ^^^^^^^^^^^^ Missing method signature
  │
  = Method must have return type, name, and parameter list
  = Help: Provide return type, method name, and parameter list

Issue seems to occur only when the return type is static, not for other concrete types.

Mago 1.0.0-rc.3

ADmad avatar Nov 16 '25 07:11 ADmad