Completed
Push — master ( 2544e2...bb9b3c )
by Mehmet
03:43 queued 01:30
created

DataTypeAbstract   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 1
cbo 0
dl 0
loc 27
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A throwException() 0 9 1
1
<?php
2
3
namespace Selami\Entity\DataType;
4
5
use InvalidArgumentException;
6
7
abstract class DataTypeAbstract
8
{
9
    /**
10
     * @var string
11
     */
12
    protected $key;
13
    /**
14
     * @var mixed
15
     */
16
    protected $datum;
17
    /**
18
     * @var array
19
     */
20
    protected $options = [];
21
22
    protected $errorMessageTemplate;
23
24
    protected function throwException()
25
    {
26
        $message = sprintf(
27
            $this->errorMessageTemplate,
28
            $this->datum,
29
            $this->key
30
        );
31
        throw new InvalidArgumentException($message);
32
    }
33
}
34