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.
Test Failed
Push — master ( b4dd81...80eb77 )
by Charlotte
03:13
created

StatementCloseCommand   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Test Coverage

Coverage 84.62%

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 55
ccs 11
cts 13
cp 0.8462
rs 10
c 0
b 0
f 0
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A onNext() 0 1 1
A resetSequence() 0 2 1
A __construct() 0 3 1
A waitForCompletion() 0 2 1
A getEncodedMessage() 0 3 1
1
<?php
2
/**
3
 * Plasma Driver MySQL component
4
 * Copyright 2018-2019 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\Commands;
11
12
/**
13
 * Statement Close command.
14
 * @internal
15
 */
16
class StatementCloseCommand extends PromiseCommand {
17
    /**
18
     * The identifier for this command.
19
     * @var int
20
     * @source
21
     */
22
    const COMMAND_ID = 0x19;
23
    
24
    /**
25
     * @var mixed
26
     */
27
    protected $id;
28
    
29
    /**
30
     * Constructor.
31
     * @param \Plasma\DriverInterface  $driver
32
     * @param mixed                    $id
33
     */
34 38
    function __construct(\Plasma\DriverInterface $driver, $id) {
35 38
        parent::__construct($driver);
36 38
        $this->id = $id;
37 38
    }
38
    
39
    /**
40
     * Get the encoded message for writing to the database connection.
41
     * @return string
42
     */
43 37
    function getEncodedMessage(): string {
44 37
        $this->finished = true;
45 37
        return \chr(static::COMMAND_ID).\Plasma\BinaryBuffer::writeInt4($this->id);
46
    }
47
    
48
    /**
49
     * Sends the next received value into the command.
50
     * @param mixed  $value
51
     * @return void
52
     */
53
    function onNext($value): void {
54
        // Nothing to do
55
    }
56
    
57
    /**
58
     * Whether this command sets the connection as busy.
59
     * @return bool
60
     */
61 37
    function waitForCompletion(): bool {
62 37
        return false;
63
    }
64
    
65
    /**
66
     * Whether the sequence ID should be resetted.
67
     * @return bool
68
     */
69 37
    function resetSequence(): bool {
70 37
        return true;
71
    }
72
}
73