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 ( 3db31b...96398e )
by Charlotte
02:14
created

ParseException::setState()   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 1
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 Driver MySQL component
4
 * Copyright 2018 PlasmaPHP, All Rights Reserved
5
 *
6
 * Website: https://github.com/PlasmaPHP
7
 * License: https://github.com/PlasmaPHP/driver-mysql/blob/master/LICENSE
8
*/
9
10
namespace Plasma\Drivers\MySQL\Messages;
11
12
/**
13
 * Represents an exception during message parsing.
14
 * @internal
15
 */
16
class ParseException extends \Plasma\Exception {
17
    /**
18
     * @var int|null
19
     */
20
    protected $state;
21
    
22
    /**
23
     * @var string
24
     */
25
    protected $remainingBuffer = null;
26
    
27
    /**
28
     * Sets the new parser state
29
     * @param int  $state
30
     * @return void
31
     */
32 1
    function setState(int $state): void {
33 1
        $this->state = $state;
34 1
    }
35
    
36
    /**
37
     * Get the new parser state.
38
     * @return int|null
39
     */
40 2
    function getState(): ?int {
41 2
        return $this->state;
42
    }
43
    
44
    /**
45
     * Sets the remaining buffer.
46
     * @param string  $buffer
47
     * @return void
48
     */
49 1
    function setBuffer(string $buffer): void {
50 1
        $this->remainingBuffer = $buffer;
51 1
    }
52
    
53
    /**
54
     * Get the remaining buffer.
55
     * @return string|null
56
     */
57 2
    function getBuffer(): ?string {
58 2
        return $this->remainingBuffer;
59
    }
60
}
61