| Total Complexity | 5 |
| Total Lines | 55 |
| Duplicated Lines | 0 % |
| Coverage | 16.66% |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class AuthMoreDataMessage implements \Plasma\Drivers\MySQL\Messages\MessageInterface { |
||
| 17 | /** |
||
| 18 | * @var string|null |
||
| 19 | */ |
||
| 20 | public $authPluginData; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var \Plasma\Drivers\MySQL\ProtocolParser |
||
| 24 | */ |
||
| 25 | protected $parser; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Constructor. |
||
| 29 | * @param \Plasma\Drivers\MySQL\ProtocolParser $parser |
||
| 30 | */ |
||
| 31 | function __construct(\Plasma\Drivers\MySQL\ProtocolParser $parser) { |
||
| 32 | $this->parser = $parser; |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Get the identifier for the packet. |
||
| 37 | * @return string |
||
| 38 | */ |
||
| 39 | 1 | static function getID(): string { |
|
| 40 | 1 | return "\x01"; |
|
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Parses the message, once the complete string has been received. |
||
| 45 | * Returns false if not enough data has been received, or the remaining buffer. |
||
| 46 | * @param string $buffer |
||
| 47 | * @param \Plasma\Drivers\MySQL\ProtocolParser $parser |
||
|
|
|||
| 48 | * @return string|bool |
||
| 49 | * @throws \Plasma\Drivers\MySQL\Messages\ParseException |
||
| 50 | */ |
||
| 51 | function parseMessage(string $buffer) { |
||
| 52 | $this->authPluginData = $buffer; |
||
| 53 | |||
| 54 | return ''; |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * Get the parser which created this message. |
||
| 59 | * @return \Plasma\Drivers\MySQL\ProtocolParser |
||
| 60 | */ |
||
| 61 | function getParser(): \Plasma\Drivers\MySQL\ProtocolParser { |
||
| 63 | } |
||
| 64 | |||
| 65 | /** |
||
| 66 | * Sets the parser state, if necessary. If not, return `-1`. |
||
| 67 | * @return int |
||
| 68 | */ |
||
| 69 | function setParserState(): int { |
||
| 71 | } |
||
| 72 | } |
||
| 73 |