kint-php /
kint
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Kint\Test; |
||
| 4 | |||
| 5 | use Kint; |
||
| 6 | use Kint\Object\BlobObject; |
||
| 7 | use Kint\Renderer\TextRenderer; |
||
| 8 | use PHPUnit_Framework_TestCase; |
||
| 9 | use PHPUnit_Util_InvalidArgumentHelper; |
||
| 10 | |||
| 11 | abstract class KintTestCase extends PHPUnit_Framework_TestCase |
||
|
0 ignored issues
–
show
The property $kint_status is not named in camelCase.
This check marks property names that have not been written in camelCase. In camelCase names are written without any punctuation, the start of each new word being marked
by a capital letter. Thus the name database connection string becomes Loading history...
The property $char_encodings is not named in camelCase.
This check marks property names that have not been written in camelCase. In camelCase names are written without any punctuation, the start of each new word being marked
by a capital letter. Thus the name database connection string becomes Loading history...
The property $text_decorations is not named in camelCase.
This check marks property names that have not been written in camelCase. In camelCase names are written without any punctuation, the start of each new word being marked
by a capital letter. Thus the name database connection string becomes Loading history...
The property $text_plugin_whitelist is not named in camelCase.
This check marks property names that have not been written in camelCase. In camelCase names are written without any punctuation, the start of each new word being marked
by a capital letter. Thus the name database connection string becomes Loading history...
|
|||
| 12 | { |
||
| 13 | protected $kint_status; |
||
|
0 ignored issues
–
show
$kint_status does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. Loading history...
|
|||
| 14 | protected $char_encodings; |
||
|
0 ignored issues
–
show
$char_encodings does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. Loading history...
|
|||
| 15 | protected $text_decorations; |
||
|
0 ignored issues
–
show
$text_decorations does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. Loading history...
|
|||
| 16 | protected $text_plugin_whitelist; |
||
|
0 ignored issues
–
show
$text_plugin_whitelist does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).
This check examines a number of code elements and verifies that they conform to the given naming conventions. You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods. Loading history...
|
|||
| 17 | |||
| 18 | View Code Duplication | public function setUp() |
|
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. Loading history...
|
|||
| 19 | { |
||
| 20 | $this->kint_status = Kint::settings(); |
||
| 21 | $this->char_encodings = BlobObject::$char_encodings; |
||
| 22 | $this->text_decorations = TextRenderer::$decorations; |
||
| 23 | $this->text_plugin_whitelist = TextRenderer::$parser_plugin_whitelist; |
||
| 24 | } |
||
| 25 | |||
| 26 | View Code Duplication | public function tearDown() |
|
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. Loading history...
|
|||
| 27 | { |
||
| 28 | Kint::settings($this->kint_status); |
||
| 29 | BlobObject::$char_encodings = $this->char_encodings; |
||
| 30 | TextRenderer::$decorations = $this->text_decorations; |
||
| 31 | TextRenderer::$parser_plugin_whitelist = $this->text_plugin_whitelist; |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Asserts that a condition is true. |
||
| 36 | * |
||
| 37 | * @param array $expected |
||
| 38 | * @param string $actual |
||
| 39 | * @param string $message |
||
| 40 | * |
||
| 41 | * @throws PHPUnit_Framework_Exception |
||
| 42 | */ |
||
| 43 | public function assertLike(array $expected, $actual, $message = '') |
||
| 44 | { |
||
| 45 | if (!is_string($actual)) { |
||
| 46 | throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'string'); |
||
| 47 | } |
||
| 48 | |||
| 49 | self::assertThat($actual, new ContainsInOrderConstraint($expected), $message); |
||
| 50 | } |
||
| 51 | } |
||
| 52 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.