Completed
Push — master ( 8e0025...04518a )
by
05:55
created

FacadeHydration::makeDomainClass()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 3
eloc 4
nc 2
nop 1
1
<?php
2
3
/*
4
 * This file is part of the PhpMob package.
5
 *
6
 * (c) Ishmael Doss <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace PhpMob\Omise\Hydrator;
13
14
/**
15
 * @author Ishmael Doss <[email protected]>
16
 */
17
class FacadeHydration extends Hydration
18
{
19
    /**
20
     * @param $objectName
21
     *
22
     * @return string
23
     */
24
    protected function makeDomainClass($objectName)
25
    {
26
        if ('error' === $objectName) {
27
            return parent::makeDomainClass($objectName);
28
        }
29
30
        return "PhpMob\\Omise\\Facade\\".ucfirst($objectName === 'list' ? 'Pagination' : $objectName);
31
    }
32
}
33