Issues (195)

Infrastructure/Builder/ServiceRequestBuilder.php (1 issue)

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
It seems like unCamelize() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

27
            $result[$this->/** @scrutinizer ignore-call */ unCamelize($attribute)] = $value;
Loading history...
28
        });
29
        return $result;
30
    }
31
}
32