Passed
Push — feature/publishable ( c26268...7bd202 )
by Daniel
18:12 queued 11:31
created

UploadsHelper::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 5
ccs 4
cts 4
cp 1
rs 10
cc 1
nc 1
nop 2
crap 1
1
<?php
2
3
/*
4
 * This file is part of the Silverback API Component Bundle Project
5
 *
6
 * (c) Daniel West <[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
declare(strict_types=1);
13
14
namespace Silverback\ApiComponentBundle\Helper;
15
16
use Doctrine\Common\Annotations\Reader;
17
use Doctrine\Persistence\ManagerRegistry;
18
use Silverback\ApiComponentBundle\Annotation\Uploads;
19
20
/**
21
 * @author Daniel West <[email protected]>
22
 */
23
final class UploadsHelper extends AbstractHelper
24
{
25 9
    public function __construct(Reader $reader, ManagerRegistry $registry)
26
    {
27 9
        $this->reader = $reader;
28 9
        $this->initRegistry($registry);
29 9
        $this->initReader($reader);
30 9
    }
31
32
    /**
33
     * @param object|string $class
34
     */
35 9
    public function getConfiguration($class): Uploads
36
    {
37 9
        return $this->getAnnotationConfiguration($class, Uploads::class);
38
    }
39
}
40