@@ -55,8 +55,7 @@ discard block |
||
55 | 55 | * @class User |
56 | 56 | * @package Platine\Framework\Auth\Entity |
57 | 57 | */ |
58 | -class User extends Entity implements IdentityInterface |
|
59 | -{ |
|
58 | +class User extends Entity implements IdentityInterface { |
|
60 | 59 | |
61 | 60 | /** |
62 | 61 | * {@inheritdoc} |
@@ -97,8 +96,7 @@ discard block |
||
97 | 96 | /** |
98 | 97 | * {@inheritdoc} |
99 | 98 | */ |
100 | - public function getId() |
|
101 | - { |
|
99 | + public function getId() { |
|
102 | 100 | return $this->mapper()->getColumn('id'); |
103 | 101 | } |
104 | 102 |
@@ -71,7 +71,7 @@ |
||
71 | 71 | 'updated_at' => '?date', |
72 | 72 | ]); |
73 | 73 | |
74 | - $mapper->filter('status', function (Query $q, $status) { |
|
74 | + $mapper->filter('status', function(Query $q, $status) { |
|
75 | 75 | $q->where('status')->is($status); |
76 | 76 | }); |
77 | 77 | } |
@@ -54,8 +54,7 @@ |
||
54 | 54 | * @class Permission |
55 | 55 | * @package Platine\Framework\Auth\Entity |
56 | 56 | */ |
57 | -class Permission extends Entity |
|
58 | -{ |
|
57 | +class Permission extends Entity { |
|
59 | 58 | |
60 | 59 | /** |
61 | 60 | * {@inheritdoc} |
@@ -54,8 +54,7 @@ |
||
54 | 54 | * @class Role |
55 | 55 | * @package Platine\Framework\Auth\Entity |
56 | 56 | */ |
57 | -class Role extends Entity |
|
58 | -{ |
|
57 | +class Role extends Entity { |
|
59 | 58 | |
60 | 59 | /** |
61 | 60 | * {@inheritdoc} |
@@ -51,8 +51,7 @@ |
||
51 | 51 | * @class IdentityInterface |
52 | 52 | * @package Platine\Framework\Auth |
53 | 53 | */ |
54 | -interface IdentityInterface |
|
55 | -{ |
|
54 | +interface IdentityInterface { |
|
56 | 55 | |
57 | 56 | /** |
58 | 57 | * Return the id of the current user |
@@ -54,15 +54,13 @@ |
||
54 | 54 | * @class DatabaseConfigRepository |
55 | 55 | * @package Platine\Framework\Config\Model |
56 | 56 | */ |
57 | -class DatabaseConfigRepository extends Repository |
|
58 | -{ |
|
57 | +class DatabaseConfigRepository extends Repository { |
|
59 | 58 | |
60 | 59 | /** |
61 | 60 | * Create new instance |
62 | 61 | * @param EntityManager $manager |
63 | 62 | */ |
64 | - public function __construct(EntityManager $manager) |
|
65 | - { |
|
63 | + public function __construct(EntityManager $manager) { |
|
66 | 64 | parent::__construct($manager, ConfigEntity::class); |
67 | 65 | } |
68 | 66 | } |
@@ -54,8 +54,7 @@ |
||
54 | 54 | * @class ConfigEntity |
55 | 55 | * @package Platine\Framework\Config\Model |
56 | 56 | */ |
57 | -class ConfigEntity extends Entity |
|
58 | -{ |
|
57 | +class ConfigEntity extends Entity { |
|
59 | 58 | |
60 | 59 | /** |
61 | 60 | * {@inheritdoc} |
@@ -54,8 +54,7 @@ |
||
54 | 54 | * @class DatabaseConfigLoaderInterface |
55 | 55 | * @package Platine\Framework\Config |
56 | 56 | */ |
57 | -interface DatabaseConfigLoaderInterface extends LoaderInterface |
|
58 | -{ |
|
57 | +interface DatabaseConfigLoaderInterface extends LoaderInterface { |
|
59 | 58 | |
60 | 59 | /** |
61 | 60 | * Load the configuration from database |
@@ -318,7 +318,7 @@ |
||
318 | 318 | // if ($lastModule) { |
319 | 319 | $last[$lastModule][$module] = $this->loader->load($this->env, $module); |
320 | 320 | //} else { |
321 | - // $last[$root][$module] = $this->loader->load($this->env, $module); |
|
321 | + // $last[$root][$module] = $this->loader->load($this->env, $module); |
|
322 | 322 | //} |
323 | 323 | //$last = array_merge_recursive($last, $last[$lastModule][$module]); |
324 | 324 |
@@ -58,8 +58,7 @@ discard block |
||
58 | 58 | * @template T |
59 | 59 | * @implements ArrayAccess<string, mixed> |
60 | 60 | */ |
61 | -class DbConfig implements ArrayAccess |
|
62 | -{ |
|
61 | +class DbConfig implements ArrayAccess { |
|
63 | 62 | /** |
64 | 63 | * The configuration loader to use |
65 | 64 | * @var DatabaseConfigLoaderInterface |
@@ -83,8 +82,7 @@ discard block |
||
83 | 82 | * @param DatabaseConfigLoaderInterface $loader the loader to use |
84 | 83 | * @param string $env the name of the environment |
85 | 84 | */ |
86 | - public function __construct(DatabaseConfigLoaderInterface $loader, string $env = '') |
|
87 | - { |
|
85 | + public function __construct(DatabaseConfigLoaderInterface $loader, string $env = '') { |
|
88 | 86 | $this->loader = $loader; |
89 | 87 | $this->env = $env; |
90 | 88 | } |
@@ -106,8 +104,7 @@ discard block |
||
106 | 104 | * not find the configuration item |
107 | 105 | * @return mixed |
108 | 106 | */ |
109 | - public function get(string $key, $default = null) |
|
110 | - { |
|
107 | + public function get(string $key, $default = null) { |
|
111 | 108 | $results = $this->parseKey($key); |
112 | 109 | $group = $results['group']; |
113 | 110 | |
@@ -245,16 +242,14 @@ discard block |
||
245 | 242 | /** |
246 | 243 | * {@inheritdoc} |
247 | 244 | */ |
248 | - public function offsetExists($key) |
|
249 | - { |
|
245 | + public function offsetExists($key) { |
|
250 | 246 | return $this->has($key); |
251 | 247 | } |
252 | 248 | |
253 | 249 | /** |
254 | 250 | * {@inheritdoc} |
255 | 251 | */ |
256 | - public function offsetGet($key) |
|
257 | - { |
|
252 | + public function offsetGet($key) { |
|
258 | 253 | return $this->get($key); |
259 | 254 | } |
260 | 255 | |
@@ -264,16 +259,14 @@ discard block |
||
264 | 259 | * @param mixed $value |
265 | 260 | * @return void |
266 | 261 | */ |
267 | - public function offsetSet($key, $value) |
|
268 | - { |
|
262 | + public function offsetSet($key, $value) { |
|
269 | 263 | $this->set($key, $value); |
270 | 264 | } |
271 | 265 | |
272 | 266 | /** |
273 | 267 | * {@inheritdoc} |
274 | 268 | */ |
275 | - public function offsetUnset($key) |
|
276 | - { |
|
269 | + public function offsetUnset($key) { |
|
277 | 270 | $this->set($key, null); |
278 | 271 | } |
279 | 272 | |
@@ -362,8 +355,7 @@ discard block |
||
362 | 355 | * @param mixed $value |
363 | 356 | * @return mixed |
364 | 357 | */ |
365 | - protected function getFormattedConfigValue($value) |
|
366 | - { |
|
358 | + protected function getFormattedConfigValue($value) { |
|
367 | 359 | if (is_array($value) || is_object($value)) { |
368 | 360 | return serialize($value); |
369 | 361 | } |
@@ -54,8 +54,7 @@ discard block |
||
54 | 54 | * @class DatabaseConfigLoader |
55 | 55 | * @package Platine\Framework\Config |
56 | 56 | */ |
57 | -class DatabaseConfigLoader implements DatabaseConfigLoaderInterface |
|
58 | -{ |
|
57 | +class DatabaseConfigLoader implements DatabaseConfigLoaderInterface { |
|
59 | 58 | |
60 | 59 | /** |
61 | 60 | * The Repository instance |
@@ -68,8 +67,7 @@ discard block |
||
68 | 67 | * Create new instance |
69 | 68 | * @param DatabaseConfigRepository $repository |
70 | 69 | */ |
71 | - public function __construct(DatabaseConfigRepository $repository) |
|
72 | - { |
|
70 | + public function __construct(DatabaseConfigRepository $repository) { |
|
73 | 71 | $this->repository = $repository; |
74 | 72 | } |
75 | 73 | |
@@ -92,8 +90,7 @@ discard block |
||
92 | 90 | /** |
93 | 91 | * {@inheritdoc} |
94 | 92 | */ |
95 | - public function insertConfig(array $data) |
|
96 | - { |
|
93 | + public function insertConfig(array $data) { |
|
97 | 94 | $entity = $this->repository->create($data); |
98 | 95 | return $this->repository->insert($entity); |
99 | 96 | } |
@@ -153,8 +150,7 @@ discard block |
||
153 | 150 | * @param string $type |
154 | 151 | * @return mixed |
155 | 152 | */ |
156 | - protected function convertToDataType($value, string $type) |
|
157 | - { |
|
153 | + protected function convertToDataType($value, string $type) { |
|
158 | 154 | switch ($type) { |
159 | 155 | case 'integer': |
160 | 156 | $value = intval($value); |