Completed
Push — master ( 04518a...0908bf )
by
01:37
created

FacadeHydration::getDomainClass()   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
use PhpMob\Omise\Facade;
15
16
/**
17
 * @author Ishmael Doss <[email protected]>
18
 */
19
class FacadeHydration extends Hydration
20
{
21
    /**
22
     * {@inheritdoc}
23
     */
24
    public static function getDomainClass($objectName)
25
    {
26
        if ('error' === $objectName) {
27
            return parent::getDomainClass($objectName);
28
        }
29
30
        return "PhpMob\\Omise\\Facade\\".ucfirst($objectName === 'list' ? 'Pagination' : $objectName);
31
    }
32
33
    /**
34
     * {@inheritdoc}
35
     */
36
    public static function getDomainAssertionClass()
37
    {
38
        return Facade::class;
39
    }
40
}
41