Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

lint/style/prefer-dirname-levels

In the modernize set. Unsafe fix: it can change behaviour. Gated by php-version.

What it does

Replace nested dirname() calls with one call and a $levels argument.

Configuration

[lint.rules]
"style/prefer-dirname-levels" = "error"

To skip it in some files, add an override or a @pun-ignore-file comment.

Replaces

More lint/style rules · Edit this page

Last updated on

Was this page helpful?