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\Fixtures; |
||
| 4 | |||
| 5 | class TestClass |
||
| 6 | { |
||
| 7 | const DUMP_FILE = __FILE__; |
||
| 8 | const DUMP_LINE = 60; |
||
| 9 | |||
| 10 | public $pub; |
||
| 11 | protected $pro; |
||
| 12 | private $pri; |
||
| 13 | |||
| 14 | public static $pubstat; |
||
| 15 | protected static $prostat; |
||
| 16 | private static $pristat; |
||
|
0 ignored issues
–
show
|
|||
| 17 | |||
| 18 | /** |
||
| 19 | * This is a constructor for a TestClass with the first |
||
| 20 | * line of the docstring split into two different lines. |
||
| 21 | * |
||
| 22 | * And here's some more information about it |
||
| 23 | */ |
||
| 24 | public function __construct() |
||
| 25 | { |
||
| 26 | $this->pub = array('pub'); |
||
| 27 | $this->pro = array('pro'); |
||
| 28 | $this->pri = array('pri'); |
||
| 29 | } |
||
| 30 | |||
| 31 | private static function staticMethod() |
||
|
0 ignored issues
–
show
|
|||
| 32 | { |
||
| 33 | } |
||
| 34 | |||
| 35 | final public function finalMethod() |
||
| 36 | { |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param array $x |
||
| 41 | */ |
||
| 42 | private function arrayHint(array $x) |
||
|
0 ignored issues
–
show
|
|||
| 43 | { |
||
| 44 | } |
||
| 45 | |||
| 46 | private function classHint(TestClass $x) |
||
|
0 ignored issues
–
show
|
|||
| 47 | { |
||
| 48 | } |
||
| 49 | |||
| 50 | private function ref(&$x) |
||
|
0 ignored issues
–
show
|
|||
| 51 | { |
||
| 52 | } |
||
| 53 | |||
| 54 | private function defaultMethod($x = 1234) |
||
|
0 ignored issues
–
show
|
|||
| 55 | { |
||
| 56 | } |
||
| 57 | |||
| 58 | final protected static function &mix(array &$x, TestClass $y = null, $z = array(1, 2, 3), $_ = 'string') |
||
|
0 ignored issues
–
show
$_ 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...
The parameter $_ is not named in camelCase.
This check marks parameter 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...
|
|||
| 59 | { |
||
| 60 | \Kint::dump($x, $y, $z); |
||
| 61 | +!\Kint::dump(); |
||
| 62 | ~\d($x); |
||
| 63 | } |
||
| 64 | |||
| 65 | public function __clone() |
||
| 66 | { |
||
| 67 | return new self(); |
||
| 68 | } |
||
| 69 | |||
| 70 | public function __invoke($x) |
||
|
0 ignored issues
–
show
|
|||
| 71 | { |
||
| 72 | return 'woot'; |
||
| 73 | } |
||
| 74 | |||
| 75 | public function __ToStRiNg() |
||
| 76 | { |
||
| 77 | return 'I am totally a string'; |
||
| 78 | } |
||
| 79 | |||
| 80 | public function __get($param) |
||
| 81 | { |
||
| 82 | return 'Ouch!'; |
||
| 83 | } |
||
| 84 | } |
||
| 85 |
This check marks private properties in classes that are never used. Those properties can be removed.