The private property $logFile is not used
13 * @access private
14 * @var Flux_LogFile
15 */
16 private $logFile; 17
18 /**
19 * maximum difference allowed between the header's
Description
The class contains unused private property. These private class properties should be removed as they can sometimes lead to confusion while reading the code.
It is also recommended that you review these unused private properties, in case they were added for later use in the code, but the author missed using them.
Bad practice
class User
{
// invalid: $name is never unused
private string $name = 'Hello';
public function getName(): string
{
return 'John';
}
}
Recommended
Make sure to delete private class properties that are not used:
class User
{
public function getMessage(): string
{
return 'Hello';
}
}