Completed
Push — master ( 45d3b1...40b0e0 )
by Rafael
04:30
created

DeleteBatchNodePayload::getClientMutationId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
crap 2
1
<?php
2
/*******************************************************************************
3
 *  This file is part of the GraphQL Bundle package.
4
 *
5
 *  (c) YnloUltratech <[email protected]>
6
 *
7
 *  For the full copyright and license information, please view the LICENSE
8
 *  file that was distributed with this source code.
9
 ******************************************************************************/
10
11
namespace Ynlo\GraphQLBundle\Model;
12
13
use Ynlo\GraphQLBundle\Annotation as API;
14
15
/**
16
 * @API\ObjectType()
17
 */
18
class DeleteBatchNodePayload
19
{
20
    /**
21
     * @var ID
22
     *
23
     * @API\Field(type="[ID!]!", description="IDs of the node deleted on success")
24
     */
25
    public $ids = [];
26
27
    /**
28
     * @var null|string
29
     *
30
     * @API\Field(type="string")
31
     */
32
    public $clientMutationId;
33
34
    /**
35
     *
36
     * @param ID[]        $ids
37
     * @param null|string $clientMutationId
38
     */
39
    public function __construct(array $ids, ?string $clientMutationId = null)
40
    {
41
        $this->ids = $ids;
0 ignored issues
show
Documentation Bug introduced by
It seems like $ids of type Ynlo\GraphQLBundle\Model\ID[] is incompatible with the declared type Ynlo\GraphQLBundle\Model\ID of property $ids.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
42
        $this->clientMutationId = $clientMutationId;
43
    }
44
45
    /**
46
     * @return array
47
     */
48
    public function getIds(): array
49
    {
50
        return $this->ids;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->ids returns the type Ynlo\GraphQLBundle\Model\ID which is incompatible with the type-hinted return array.
Loading history...
51
    }
52
53
    /**
54
     * @return null|string
55
     */
56
    public function getClientMutationId()
57
    {
58
        return $this->clientMutationId;
59
    }
60
}
61