@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | public function fillProperty(string $property, $value): void |
| 30 | 30 | { |
| 31 | 31 | $property = lcfirst(str_replace('_', '', ucwords($property, '_'))); |
| 32 | - if(property_exists(__CLASS__, $property)) |
|
| 32 | + if (property_exists(__CLASS__, $property)) |
|
| 33 | 33 | { |
| 34 | 34 | $method = sprintf('set%s', ucfirst($property)); |
| 35 | 35 | $this->{$method}($value); |
@@ -44,11 +44,11 @@ discard block |
||
| 44 | 44 | $reflection = new \ReflectionClass(__CLASS__); |
| 45 | 45 | $properties = $reflection->getProperties(\ReflectionProperty::IS_PROTECTED); |
| 46 | 46 | $data = []; |
| 47 | - foreach($properties as $property){ |
|
| 47 | + foreach ($properties as $property) { |
|
| 48 | 48 | $prop_name = $property->getName(); |
| 49 | 49 | $method = sprintf('get%s', ucfirst($prop_name)); |
| 50 | 50 | $form_name = strtolower(preg_replace('/[A-Z]/', '_$0', $prop_name)); |
| 51 | - if($reflection->hasMethod($method)){ |
|
| 51 | + if ($reflection->hasMethod($method)) { |
|
| 52 | 52 | $data[$form_name] = $this->{$method}(); |
| 53 | 53 | } |
| 54 | 54 | } |