Completed
Push — master ( 461e07...b4459a )
by Alexandr
03:37
created

AbstractScalarType::getType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
ccs 0
cts 0
cp 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
/*
3
* This file is a part of graphql-youshido project.
4
*
5
* @author Alexandr Viniychuk <[email protected]>
6
* created: 11/27/15 1:00 AM
7
*/
8
9
namespace Youshido\GraphQL\Type\Scalar;
10
11
use Youshido\GraphQL\Type\AbstractType;
12
use Youshido\GraphQL\Type\Config\TypeConfigInterface;
13
use Youshido\GraphQL\Type\TypeMap;
14
15
abstract class AbstractScalarType extends AbstractType
16
{
17
18 12
    public function getName()
19
    {
20 12
        $className = get_class($this);
21
22 12
        return substr($className, strrpos($className, '\\') + 1, -4);
23
    }
24
25 20
    final public function getKind()
26
    {
27 20
        return TypeMap::KIND_SCALAR;
28
    }
29
30
    public function getType()
31
    {
32
        return $this;
33
    }
34
35
    public function build($config) {}
36
37
}
38