Avoid variables with short names like $to. Configured minimum length is 3.
Short variable names may make your code harder to understand. Variable names should
be self-descriptive. This check looks for variable names who are shorter than
a configured minimum.
Loading history...
46
{
47
1
if (!($from instanceof \DateTime) || !($to instanceof \DateTime))
48
{
49
throw new \InvalidArgumentException('$from and $to are expected to be \\DateTime instances');
Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.