Code Duplication    Length = 11-12 lines in 2 locations

src/RepresentProcessor/Representation/AbstractRepresentation.php 1 location

@@ 42-52 (lines=11) @@
39
     * @param stdClass                      $obj
40
     * @param PagerDutyEntityInterface|null $pagerDutyEntity
41
     */
42
    public function loadRepresentObj(stdClass $obj, PagerDutyEntityInterface $pagerDutyEntity = null)
43
    {
44
        if (null === $pagerDutyEntity) {
45
            $entityClassName = static::getEntityClassName();
46
            $pagerDutyEntity = new $entityClassName();
47
        }
48
        $objArray = (array) $obj;
49
        foreach ($objArray as $key => $value) {
50
            echo $representObject->$key = $value;
51
        }
52
    }
53
}
54

src/RepresentProcessor/Representation/Traits/JSONRepresentationTrait.php 1 location

@@ 64-75 (lines=12) @@
61
     * @param stdClass                      $obj
62
     * @param PagerDutyEntityInterface|null $pagerDutyEntity
63
     */
64
    public function loadRepresentObj(stdClass $obj, PagerDutyEntityInterface $pagerDutyEntity = null)
65
    {
66
        if (null === $pagerDutyEntity) {
67
            $entityClassName = static::getEntityClassName();
68
            $pagerDutyEntity = new $entityClassName();
69
        }
70
        $objArray = (array) $obj;
71
        foreach ($objArray as $key => $value) {
72
            $key = $this->underscoresTransformToCameCase($key);
73
            $representObject->$key = $value;
74
        }
75
    }
76
77
    /**
78
     * Decamelize str cameCase string to underscored.