generateIv 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...
12
{
13
1
protected function generateInsecureIv(int $length): string
$permitted_chars 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.
$permitted_chars 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...
26
}
27
1
return $random;
28
}
29
30
1
public function generateIv(bool $allowLessSecureIv = false): string
The expression $success of type boolean|null is loosely compared to false; this is ambiguous if the boolean can be false. You might want to explicitly use !== null instead.
If an expression can have both false, and null as possible values. It
is generally a good practice to always use strict comparison to clearly
distinguish between those two values.
$a=canBeFalseAndNull();// Instead ofif(!$a){}// Better use one of the explicit versions:if($a!==null){}if($a!==false){}if($a!==null&&$a!==false){}
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.