Skip to content

Commit 226dd74

Browse files
committed
Rename more methods to be more accurate.
1 parent 0bf7714 commit 226dd74

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/EnvMapper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ private function typeNormalize(string $val, \ReflectionProperty $rProp): int|flo
104104
*/
105105
protected function getDefaultValue(\ReflectionProperty $subject): mixed
106106
{
107-
$params = $this->getPropertiesForClass($subject->getDeclaringClass());
107+
$params = $this->getConstructorArgs($subject->getDeclaringClass());
108108

109109
$param = $params[$subject->getName()] ?? null;
110110

@@ -116,15 +116,15 @@ protected function getDefaultValue(\ReflectionProperty $subject): mixed
116116
/**
117117
* @return array<string, \ReflectionParameter>
118118
*/
119-
protected function getPropertiesForClass(\ReflectionClass $rClass): array
119+
protected function getConstructorArgs(\ReflectionClass $rClass): array
120120
{
121-
return $this->constructorParameterList[$rClass->getName()] ??= $this->makePropertiesForClass($rClass);
121+
return $this->constructorParameterList[$rClass->getName()] ??= $this->makeConstructorArgs($rClass);
122122
}
123123

124124
/**
125125
* @return array<string, \ReflectionParameter>
126126
*/
127-
protected function makePropertiesForClass(\ReflectionClass $rClass): array
127+
protected function makeConstructorArgs(\ReflectionClass $rClass): array
128128
{
129129
$props = [];
130130
foreach ($rClass->getConstructor()?->getParameters() ?? [] as $rProp) {

0 commit comments

Comments
 (0)