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

FacadeHydration   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 22
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDomainClass() 0 8 3
A getDomainAssertionClass() 0 4 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