@@ -55,14 +55,12 @@ discard block |
||
| 55 | 55 | * @class BaseParam |
| 56 | 56 | * @package Platine\Framework\Form\Param |
| 57 | 57 | */ |
| 58 | -class BaseParam implements JsonSerializable |
|
| 59 | -{ |
|
| 58 | +class BaseParam implements JsonSerializable { |
|
| 60 | 59 | /** |
| 61 | 60 | * Create new instance |
| 62 | 61 | * @param array<string, mixed> $data |
| 63 | 62 | */ |
| 64 | - public function __construct(array $data = []) |
|
| 65 | - { |
|
| 63 | + public function __construct(array $data = []) { |
|
| 66 | 64 | $params = array_merge($this->getDefault(), $data); |
| 67 | 65 | $this->load($params); |
| 68 | 66 | } |
@@ -118,8 +116,7 @@ discard block |
||
| 118 | 116 | * Convert parameter to JSON array |
| 119 | 117 | * @return array<string, mixed> |
| 120 | 118 | */ |
| 121 | - public function jsonSerialize() |
|
| 122 | - { |
|
| 119 | + public function jsonSerialize() { |
|
| 123 | 120 | return $this->data(); |
| 124 | 121 | } |
| 125 | 122 | |
@@ -128,8 +125,7 @@ discard block |
||
| 128 | 125 | * @param string $name |
| 129 | 126 | * @return mixed|null |
| 130 | 127 | */ |
| 131 | - public function __get($name) |
|
| 132 | - { |
|
| 128 | + public function __get($name) { |
|
| 133 | 129 | if (property_exists($this, $name)) { |
| 134 | 130 | return $this->{$name}; |
| 135 | 131 | } |