BooleanField   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A cast() 0 6 2
1
<?php
2
3
namespace Tacone\Bees\Field;
4
5
class BooleanField extends Field
6
{
7
    public function cast()
8
    {
9
        $value = $this->value();
10
        if ($value === "false") return false;
11
        return (boolean)$value;
12
    }
13
}
14