Skip to content

PHPStan does not report incorrect case for internal PHP classes #3815

@Riimu

Description

@Riimu

Bug report

It seems that despite the fact that PHPStan is reporting about the incorrect capitalization of internal function names, it does not report about the incorrect capitalization of internal class names.

Code snippet that reproduces the problem

https://phpstan.org/r/4de01f22-be72-4178-9ea2-62ea978a0791

<?php declare(strict_types = 1);

class HelloWorld
{
	public function sayHello(DATETIME $date): void
	{
		DATE('c');
	}
}
Line Error
7 Call to function date() with incorrect case: DATE

Expected output

Line Error
5 Class DateTime referenced with incorrect case: DATETIME.
7 Call to function date() with incorrect case: DATE

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions