Scalar types should always be written in the same form. int
not integer
,
bool
not boolean
, float
not real
or double
.
A list of types to fix.
Allowed values: a subset of ['boolean', 'callback', 'double', 'integer', 'real', 'str']
Default value: ['boolean', 'callback', 'double', 'integer', 'real', 'str']
Default configuration.
--- Original
+++ New
<?php
/**
- * @param integer $a
- * @param boolean $b
- * @param real $c
+ * @param int $a
+ * @param bool $b
+ * @param float $c
*
- * @return double
+ * @return float
*/
function sample($a, $b, $c)
{
return sample2($a, $b, $c);
}
With configuration: ['types' => ['boolean']]
.
--- Original
+++ New
<?php
/**
* @param integer $a
- * @param boolean $b
+ * @param bool $b
* @param real $c
*/
function sample($a, $b, $c)
{
return sample2($a, $b, $c);
}
The rule is part of the following rule sets: