Completed
Pull Request — master (#49)
by John
08:22
created

UriBuilder   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 47
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B __construct() 0 16 5
1
<?php
2
/*
3
 * This file is part of the KleijnWeb\SwaggerBundle package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
9
namespace KleijnWeb\SwaggerBundle\Document;
10
11
/**
12
 * @author John Kleijn <[email protected]>
13
 */
14
class UriBuilder
15
{
16
17
    /**
18
     * @var string
19
     */
20
    private $proto;
0 ignored issues
show
Unused Code introduced by
The property $proto is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
21
22
    /**
23
     * @var string
24
     */
25
    private $host;
0 ignored issues
show
Unused Code introduced by
The property $host is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
26
27
    /**
28
     * @var string
29
     */
30
    private $base;
0 ignored issues
show
Unused Code introduced by
The property $base is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
31
32
    /**
33
     * @var SwaggerDocument
34
     */
35
    private $document;
36
37
    /**
38
     * Construct the wrapper
39
     *
40
     * @param SwaggerDocument $document
41
     * @param array           $options
42
     */
43
    public function __construct(SwaggerDocument $document, array $options = [])
44
    {
45
        $this->document = $document;
46
        foreach ($options as $key => $value) {
47
            switch ($key) {
48
                case 'proto':
49
                    break;
50
                case 'host':
51
                    break;
52
                case 'base':
53
                    break;
54
                default:
55
                    throw new \InvalidArgumentException("Unknown option '$key'");
56
            }
57
        }
58
    }
59
60
}
61