1
|
|
|
<?php declare(strict_types=1); |
2
|
|
|
|
3
|
|
|
namespace Limoncello\Testing; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* Copyright 2015-2020 [email protected] |
7
|
|
|
* |
8
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
9
|
|
|
* you may not use this file except in compliance with the License. |
10
|
|
|
* You may obtain a copy of the License at |
11
|
|
|
* |
12
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0 |
13
|
|
|
* |
14
|
|
|
* Unless required by applicable law or agreed to in writing, software |
15
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS, |
16
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
17
|
|
|
* See the License for the specific language governing permissions and |
18
|
|
|
* limitations under the License. |
19
|
|
|
*/ |
20
|
|
|
|
21
|
|
|
use Limoncello\Contracts\Commands\IoInterface; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* @package Limoncello\Testing |
25
|
|
|
*/ |
26
|
|
|
interface CommandsDebugIoInterface extends IoInterface |
27
|
|
|
{ |
28
|
|
|
/** @var int Log record key */ |
29
|
|
|
const RECORD_KEY_TYPE = 0; |
30
|
|
|
|
31
|
|
|
/** @var int Log record key */ |
32
|
|
|
const RECORD_KEY_VERBOSITY = self::RECORD_KEY_TYPE + 1; |
33
|
|
|
|
34
|
|
|
/** @var int Log record key */ |
35
|
|
|
const RECORD_KEY_DATE_TIME = self::RECORD_KEY_VERBOSITY + 1; |
36
|
|
|
|
37
|
|
|
/** @var int Log record key */ |
38
|
|
|
const RECORD_KEY_MESSAGE = self::RECORD_KEY_DATE_TIME + 1; |
39
|
|
|
|
40
|
|
|
/** @var int Log record type value */ |
41
|
|
|
const TYPE_INFO = 0; |
42
|
|
|
|
43
|
|
|
/** @var int Log record type value */ |
44
|
|
|
const TYPE_WARNING = self::TYPE_INFO + 1; |
45
|
|
|
|
46
|
|
|
/** @var int Log record type value */ |
47
|
|
|
const TYPE_ERROR = self::TYPE_WARNING + 1; |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* @return array |
51
|
|
|
*/ |
52
|
|
|
public function getRecords(): array; |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* @return array |
56
|
|
|
*/ |
57
|
|
|
public function getInfoRecords(): array; |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* @return array |
61
|
|
|
*/ |
62
|
|
|
public function getWarningRecords(): array; |
63
|
|
|
|
64
|
|
|
/** |
65
|
|
|
* @return array |
66
|
|
|
*/ |
67
|
|
|
public function getErrorRecords(): array; |
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* @return self |
|
|
|
|
71
|
|
|
*/ |
72
|
|
|
public function clearRecords(): self; |
73
|
|
|
} |
74
|
|
|
|
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.