Skip to content

Commit

Permalink
Added public keyword to binding consts
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Wright <[email protected]>
  • Loading branch information
betterthanclay committed Aug 21, 2024
1 parent b54df90 commit 7be707c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* Added public keyword to binding consts

## v0.11.6 (2024-08-21)
* Made class constants PascalCase

Expand Down
6 changes: 3 additions & 3 deletions src/Veneer/Binding.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@ public function generateBindingClass(


// Constants
$consts['Veneer'] = 'const Veneer = \'' . addslashes($this->proxyClass) . '\';';
$consts['VeneerTarget'] = 'const VeneerTarget = Inst::class;';
$consts['Veneer'] = 'public const Veneer = \'' . addslashes($this->proxyClass) . '\';';
$consts['VeneerTarget'] = 'public const VeneerTarget = Inst::class;';

foreach ($ref->getReflectionConstants() as $const) {
$key = $const->getName();
Expand All @@ -331,7 +331,7 @@ public function generateBindingClass(
}

if ($const->isPublic()) {
$consts[$key] = 'const ' . $key . ' = Inst::' . $key . ';';
$consts[$key] = 'public const ' . $key . ' = Inst::' . $key . ';';
}
}

Expand Down

0 comments on commit 7be707c

Please sign in to comment.