Skip to content

Commit

Permalink
Enhance namespace resolver (#140)
Browse files Browse the repository at this point in the history
* Fix namespace resolver

* Remove PHP tags from filecontents
  • Loading branch information
CodeTechNL authored Jan 22, 2024
1 parent 415147b commit 32b9440
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Commands/Permission.php
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ private function extractNamespace($file)
$handle = fopen($file, 'r');
if ($handle) {
while (($line = fgets($handle)) !== false) {
$line = str($line)->remove('<?php')->remove('<?')->trim();
if (str_starts_with($line, 'namespace')) {
$parts = explode(' ', $line);
$ns = rtrim(trim($parts[1]), ';');
Expand Down

0 comments on commit 32b9440

Please sign in to comment.