Skip to content

classes should not have a constructor method with the same name as the class #231

@bkdotcom

Description

@bkdotcom

I got a false positive on this one.

class Foo
{

    /**
     * This is the constructor
     */
    public function __construct()
    {
    }

    /**
     * this is not a constructor

     * @return boolean
     */
    public function foo()
    {
        return false;
    }
}

The constructor is __construct() foo() is just a regular 'ol function and as such should not raise said error

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions