SchemaIntegerAttribute   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 4
c 2
b 0
f 0
dl 0
loc 9
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A parseContextual() 0 7 2
1
<?php
2
3
namespace Ipag\Sdk\Model\Schema;
4
5
use Ipag\Sdk\Model\Schema\Exception\SchemaAttributeParseException;
6
7
/**
8
 * @codeCoverageIgnore
9
 */
10
class SchemaIntegerAttribute extends SchemaAttribute
11
{
12
    public function parseContextual($value)
13
    {
14
        if (is_integer($value)) {
15
            return $value;
16
        }
17
18
        throw new SchemaAttributeParseException($this, "Provided value '$value' is not an integer");
19
    }
20
}