1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-02 17:52:45 +01:00
psalm/docs/running_psalm/issues/DirectConstructorCall.md
2023-02-15 20:14:00 -04:00

287 B

DirectConstructorCall

Emitted when __construct() is called directly as a method. Constructors are supposed to be called implicitely, as a result of new ClassName statement.

<?php
class A {
    public function __construct() {}
}
$a = new A;
$a->__construct(); // wrong