Passed
Pull Request — master (#54)
by Vincent
06:15
created

UploadsHelper   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 5
c 1
b 0
f 0
dl 0
loc 15
ccs 7
cts 7
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getConfiguration() 0 3 1
A __construct() 0 5 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