Skip to content

Commit

Permalink
Update method and dependency management
Browse files Browse the repository at this point in the history
Refactor `generateParameterCode` to handle attributes irrespective of PHP version. Update composer dependencies to the latest versions for improved compatibility and security.
  • Loading branch information
koriym committed Nov 15, 2024
1 parent 7f1328f commit acaab0d
Show file tree
Hide file tree
Showing 2 changed files with 405 additions and 244 deletions.
6 changes: 1 addition & 5 deletions src/MethodSignatureString.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,7 @@ private function formatArg($name, $value): string
private function generateParameterCode(ReflectionParameter $param): string
{
// Support attributes
$attributesStr = '';
if (PHP_MAJOR_VERSION >= 8) {
$attributesStr = $this->getAttributeStr($param);
}

$attributesStr = $this->getAttributeStr($param);
$typeStr = ($this->typeString)($param->getType());
$typeStrWithSpace = $typeStr ? $typeStr . ' ' : $typeStr;
$variadicStr = $param->isVariadic() ? '...' : '';
Expand Down
Loading

0 comments on commit acaab0d

Please sign in to comment.