From 32b9440a4fd7c2686b7888447a35ef2d975debda Mon Sep 17 00:00:00 2001 From: CodeTechNL <65519422+CodeTechNL@users.noreply.github.com> Date: Mon, 22 Jan 2024 17:19:04 +0100 Subject: [PATCH] Enhance namespace resolver (#140) * Fix namespace resolver * Remove PHP tags from filecontents --- src/Commands/Permission.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Commands/Permission.php b/src/Commands/Permission.php index 3b17268..8fc5c33 100644 --- a/src/Commands/Permission.php +++ b/src/Commands/Permission.php @@ -239,6 +239,7 @@ private function extractNamespace($file) $handle = fopen($file, 'r'); if ($handle) { while (($line = fgets($handle)) !== false) { + $line = str($line)->remove('remove('trim(); if (str_starts_with($line, 'namespace')) { $parts = explode(' ', $line); $ns = rtrim(trim($parts[1]), ';');