1 | <?php |
||
2 | declare(strict_types=1); |
||
3 | |||
4 | /** |
||
5 | * Base Infra Class |
||
6 | * @category Ticaje |
||
7 | * @author Max Demian <[email protected]> |
||
8 | */ |
||
9 | |||
10 | namespace Ticaje\AeSdk\Infrastructure\Builder; |
||
11 | |||
12 | /** |
||
13 | * Trait ServiceRequestBuilder |
||
14 | * @package Ticaje\AeSdk\Infrastructure\Builder |
||
15 | */ |
||
16 | trait ServiceRequestBuilder |
||
17 | { |
||
18 | /** |
||
19 | * @return array |
||
20 | * This method is a mix between business concern and infrastructure's |
||
21 | */ |
||
22 | private function build() |
||
23 | { |
||
24 | $result = []; |
||
25 | $attributes = get_object_vars($this); |
||
26 | array_walk($attributes, function ($value, $attribute) use (&$result) { |
||
27 | $result[$this->unCamelize($attribute)] = $value; |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
28 | }); |
||
29 | return $result; |
||
30 | } |
||
31 | } |
||
32 |