Passed
Pull Request — master (#3407)
by Antoine
03:51
created

Link   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 16
c 1
b 0
f 0
dl 0
loc 43
rs 10
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A getDescription() 0 3 1
A getServer() 0 3 1
A getParameters() 0 3 1
A getRequestBody() 0 3 1
A getOperationId() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the API Platform project.
5
 *
6
 * (c) Kévin Dunglas <[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 ApiPlatform\Core\OpenApi;
15
16
class Link
17
{
18
    // public $operationRef;
0 ignored issues
show
Unused Code Comprehensibility introduced by
60% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
19
    private $operationId;
20
    private $parameters;
21
    private $requestBody;
22
    private $description;
23
    private $server;
24
25
    // string $operationRef, ?
0 ignored issues
show
Unused Code Comprehensibility introduced by
43% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
26
    public function __construct(string $operationId, array $parameters = [], array $requestBody = [], string $description = '', Server $server = null)
27
    {
28
        // $this->operationRef = $operationRef;
0 ignored issues
show
Unused Code Comprehensibility introduced by
45% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
29
        $this->operationId = $operationId;
30
        $this->parameters = $parameters;
31
        $this->requestBody = $requestBody;
32
        $this->description = $description;
33
        $this->server = $server;
34
    }
35
36
    public function getOperationId()
37
    {
38
        return $this->operationId;
39
    }
40
41
    public function getParameters()
42
    {
43
        return $this->parameters;
44
    }
45
46
    public function getRequestBody()
47
    {
48
        return $this->requestBody;
49
    }
50
51
    public function getDescription()
52
    {
53
        return $this->description;
54
    }
55
56
    public function getServer()
57
    {
58
        return $this->server;
59
    }
60
}
61