Skip to content

Commit

Permalink
Allow uppercase visibility
Browse files Browse the repository at this point in the history
To make it easier for our users, just allow any case for visibility.

fixes #2434
  • Loading branch information
jaapio committed Jun 14, 2024
1 parent 7048d89 commit 28c67a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/phpDocumentor/Configuration/ApiSpecification.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

use function array_map;
use function sprintf;
use function strtolower;

/**
* @psalm-import-type ConfigurationApiMap from Version3
Expand Down Expand Up @@ -133,7 +134,7 @@ public function calculateVisiblity(): int
$visibility = 0;

foreach ($this->visibility as $item) {
match ($item) {
match (strtolower($item)) {
'api' => $visibility |= self::VISIBILITY_API,
'public' => $visibility |= self::VISIBILITY_PUBLIC,
'protected' => $visibility |= self::VISIBILITY_PROTECTED,
Expand Down

0 comments on commit 28c67a6

Please sign in to comment.