Completed
Push — master ( 499778...79f24a )
by Emily
9s
created

ScalarType

Complexity

Total Complexity 0

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 0
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 12

1 Method

Rating   Name   Duplication   Size   Complexity  
cast() 0 1 ?
1
<?php
2
/**
3
 * This file is part of the Composite Utils package.
4
 *
5
 * (c) Emily Shepherd <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the
8
 * LICENSE.md file that was distributed with this source code.
9
 *
10
 * @package spaark/composite-utils
11
 * @author Emily Shepherd <[email protected]>
12
 * @license MIT
13
 */
14
15
namespace Spaark\CompositeUtils\Model\Reflection\Type;
16
17
use Spaark\CompositeUtils\Traits\StaticEquatableTrait;
18
19
/**
20
 * Represents all Scalar Types, extended by more specific types
21
 */
22
abstract class ScalarType extends NativeType
23
{
24
    use StaticEquatableTrait;
25
26
    /**
27
     * Casts given value to the datatype
28
     *
29
     * @param mixed $value
30
     * @return mixed
31
     */
32
    abstract public function cast($value);
33
}
34