for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace App\Infra\Log;
use Doctrine\ORM\EntityManager;
class AccessLogger
{
public const TYPE_LOGIN_SUCCESS = 'log.success';
public const TYPE_LOGIN_FAILURE = 'log.fail';
public const SUPPORTED_TYPES = [
self::TYPE_LOGIN_SUCCESS,
self::TYPE_LOGIN_FAILURE
];
/**
* @var EntityManager
*/
private $em;
public function __construct(EntityManager $entityManager)
$this->em = $entityManager;
}
public function log(string $type, string $email, ?string $ip): void
$type
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function log(/** @scrutinizer ignore-unused */ string $type, string $email, ?string $ip): void
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
$email
public function log(string $type, /** @scrutinizer ignore-unused */ string $email, ?string $ip): void
$ip
public function log(string $type, string $email, /** @scrutinizer ignore-unused */ ?string $ip): void
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.