@@ -90,6 +90,9 @@ discard block |
||
| 90 | 90 | } |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | + /** |
|
| 94 | + * @param string $method |
|
| 95 | + */ |
|
| 93 | 96 | private function getClassImplementingMethod($class, $method) |
| 94 | 97 | { |
| 95 | 98 | $reflectionClass = new ClassReflection($class); |
@@ -141,7 +144,7 @@ discard block |
||
| 141 | 144 | * the constructor if it can be set to null. |
| 142 | 145 | * |
| 143 | 146 | * @param $classWithConstructor |
| 144 | - * @param $function |
|
| 147 | + * @param string $function |
|
| 145 | 148 | * @param $parameter |
| 146 | 149 | * @return bool |
| 147 | 150 | */ |
@@ -173,6 +176,9 @@ discard block |
||
| 173 | 176 | return $parameters[$param->getName()]->getType(); |
| 174 | 177 | } |
| 175 | 178 | |
| 179 | + /** |
|
| 180 | + * @param string $setterName |
|
| 181 | + */ |
|
| 176 | 182 | private function getAcceptNullForSetter($class, $setterName) |
| 177 | 183 | { |
| 178 | 184 | $reflectionClass = new ClassReflection($class); |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | public function mapDataToForms($data, $form) |
| 18 | 18 | { |
| 19 | 19 | $form = iterator_to_array($form); |
| 20 | - foreach($form as $key => $formElement) { |
|
| 20 | + foreach ($form as $key => $formElement) { |
|
| 21 | 21 | if ($formElement instanceof Button) { |
| 22 | 22 | continue; |
| 23 | 23 | } |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | |
| 57 | 57 | private function setAllThePropertiesOnTheObject($obj, $form) |
| 58 | 58 | { |
| 59 | - foreach($form as $propertyName => $formElement) { |
|
| 59 | + foreach ($form as $propertyName => $formElement) { |
|
| 60 | 60 | if ($formElement instanceof Button) { |
| 61 | 61 | continue; |
| 62 | 62 | } |
@@ -115,8 +115,8 @@ discard block |
||
| 115 | 115 | $reflectionParameters = $reflectionConstructor->getParameters(); |
| 116 | 116 | $nbOfRequiredParameters = $reflectionConstructor->getNumberOfRequiredParameters(); |
| 117 | 117 | $params = []; |
| 118 | - $i=0; |
|
| 119 | - foreach($reflectionParameters as $name => $param) { |
|
| 118 | + $i = 0; |
|
| 119 | + foreach ($reflectionParameters as $name => $param) { |
|
| 120 | 120 | if ($i === $nbOfRequiredParameters) { |
| 121 | 121 | break; |
| 122 | 122 | } |