Passed
Push — master ( 1995c6...6ecf81 )
by Radu
01:20
created

File::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 3
nc 2
nop 3
1
<?php
2
namespace WebServCo\Framework;
3
4
final class File extends AbstractFile
5
{
6
    public function __construct($fileName, $fileData, $contentType = 'application/octet-stream')
7
    {
8
        if (is_resource($fileData)) {
9
            $fileData = stream_get_contents($fileData);
10
        }
11
        parent::__construct($fileName, $fileData, $contentType);
12
    }
13
}
14