GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 0f7f9f...659573 )
by Charlotte
02:27
created

QueryResult::getAffectedRows()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 2
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Plasma Core component
4
 * Copyright 2018 PlasmaPHP, All Rights Reserved
5
 *
6
 * Website: https://github.com/PlasmaPHP
7
 * License: https://github.com/PlasmaPHP/core/blob/master/LICENSE
8
*/
9
10
namespace Plasma;
11
12
/**
13
 * A class representing a regular query result (no SELECT), with no event emitter.
14
 */
15
class QueryResult implements QueryResultInterface {
16
    /**
17
     * @var int
18
     */
19
    protected $affectedRows;
20
    
21
    /**
22
     * @var int
23
     */
24
    protected $warningsCount;
25
    
26
    /**
27
     * @var int|null
28
     */
29
    protected $insertID;
30
    
31
    /**
32
     * Constructor.
33
     * @param int       $affectedRows
34
     * @param int       $warningsCount
35
     * @param int|null  $insertID
36
     */
37 6
    function __construct(int $affectedRows, int $warningsCount, ?int $insertID) {
38 6
        $this->affectedRows = $affectedRows;
39 6
        $this->warningsCount = $warningsCount;
40 6
        $this->insertID = $insertID;
41 6
    }
42
    
43
    /**
44
     * Get the number of affected rows (for UPDATE, DELETE, etc.).
45
     * @return int
46
     */
47 1
    function getAffectedRows(): int {
48 1
        return $this->affectedRows;
49
    }
50
    
51
    /**
52
     * Get the number of warnings sent by the server.
53
     * @return int
54
     */
55 1
    function getWarningsCount(): int {
56 1
        return $this->warningsCount;
57
    }
58
    
59
    /**
60
     * Get the field definitions, if any. `SELECT` statements only.
61
     * @return array|null
62
     */
63 1
    function getFieldDefinitions(): ?array {
64 1
        return null;
65
    }
66
    
67
    /**
68
     * Get the used insert ID for the row, if any. `INSERT` statements only.
69
     * @return int|null
70
     */
71 1
    function getInsertID(): ?int {
72 1
        return $this->insertID;
73
    }
74
}
75