Skip to content

DateTimeFromFormat is case sensitive #2

@MarkRedeman

Description

@MarkRedeman

Classnames in PHP are case insensitive, so the operator should also be case insensitive.
A quick fix would be to replace,

        if ($node->class->toString() !== "DateTime") {
            return;
        }

with,

        if (strtolower($node->class->toString()) !== "datetime") {
            return;
        }

But this would require us to use strtolower in all operators that check function or class names so I would rather try to find a better way to avoid the case sensitivity issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions