@@ 70-76 (lines=7) @@ | ||
67 | return $instance; |
|
68 | } |
|
69 | ||
70 | private function getClass(Parameter $parameter) { |
|
71 | $type = $parameter->getType(); |
|
72 | if (!($type instanceof ClassType)) { |
|
73 | throw new \InvalidArgumentException("[$type] is not a ClassType"); |
|
74 | } |
|
75 | return $type->getClass(); |
|
76 | } |
|
77 | ||
78 | /** |
|
79 | * @param Parameter $param |
@@ 143-149 (lines=7) @@ | ||
140 | return $this->fields->getField($param); |
|
141 | } |
|
142 | ||
143 | private function getClass(Parameter $parameter) { |
|
144 | $type = $parameter->getType(); |
|
145 | if (!($type instanceof ClassType)) { |
|
146 | throw new \InvalidArgumentException("[$type] is not a ClassType"); |
|
147 | } |
|
148 | return $type->getClass(); |
|
149 | } |
|
150 | ||
151 | private function makePropertyParameter(Parameter $parameter, Property $property) { |
|
152 | return new Parameter($parameter->getName() . '[' . $property->name() . ']', $property->type(), $property->isRequired()); |