Skip to content

SlevomatCodingStandard.Functions.RequireMultiLineCall incorrectly detects line length #1816

Description

@roslov

Slevomat version: 8.25.0

Sniff: SlevomatCodingStandard.Functions.RequireMultiLineCall

There is a line in a legacy code:

        return !preg_match("/$regex/", (string) $value) ? "недопустимый формат, поле '$name'" : null;

The real line length is 101 chars.

Image Image

But the sniff calculates it as 123.

Image

Probably, we need to replace strlen with mb_strlen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions