Certificate::__construct()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 4
c 1
b 0
f 1
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 10
cc 2
nc 2
nop 1
crap 2
1
<?php
2
3
/*
4
 * This file is part of the Passbook package.
5
 *
6
 * (c) Eymen Gunay <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Passbook\Certificate;
13
14
use Passbook\Exception\FileNotFoundException;
15
16
/**
17
 * Abstract certificate file
18
 *
19
 * @author Eymen Gunay <[email protected]>
20
 */
21
abstract class Certificate extends \SplFileObject implements CertificateInterface
22
{
23 11
    public function __construct($filename)
24
    {
25
        try {
26 11
            parent::__construct($filename);
27 2
        } catch (\RuntimeException $e) {
28 2
            throw new FileNotFoundException($filename);
29
        }
30
    }
31
}
32