Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Analyser/Analyser.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ className: $violation->className,

// Same-layer dependencies are always allowed, whether the shared
// layer is the dependency's primary layer or a secondary one.
// The explicit primary-layer check is not redundant: for a dep
// whose primary layer is a PSR-4 catch-all, $depLayers is
// regex-resolved only and need not contain the primary layer.
$isSameLayer = $primaryLayer === $classNode->layer
|| in_array($classNode->layer, $depLayers, true);

Expand Down
Loading