Passed
Branch master (b4f9b9)
by Maxime
02:07
created

Size::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 1
Metric Value
c 1
b 1
f 1
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Mhor\MediaInfo\Attribute;
4
5
use Mhor\MediaInfo\DumpTrait;
6
7
class Size implements AttributeInterface
8
{
9
    use DumpTrait;
10
11
    /**
12
     * @var int
13
     */
14
    private $bit;
15
16
    /**
17
     * @param int $size
18
     */
19 4
    public function __construct($size)
20
    {
21 4
        $this->bit = $size;
22 4
    }
23
24
    /**
25
     * @return int
26
     */
27 1
    public function getBit()
28
    {
29 1
        return $this->bit;
30
    }
31
32
    /**
33
     * @return string
34
     */
35 1
    public function __toString()
36
    {
37 1
        return (string) $this->bit;
38
    }
39
}
40