cs: Enable more risky rules.

This commit is contained in:
Pol Dellaiera 2021-11-30 12:03:02 +01:00
parent a43784c3a1
commit 6ce511889f
No known key found for this signature in database
GPG Key ID: D476DFE9C67467CA
2 changed files with 3 additions and 4 deletions

View File

@ -49,8 +49,8 @@ $riskyRules = [
'fopen_flag_order' => false,
'fopen_flags' => false,
// 'logical_operators' => false,
'modernize_types_casting' => false,
'no_homoglyph_names' => false,
// 'modernize_types_casting' => false,
// 'no_homoglyph_names' => false,
// 'no_unneeded_final_method' => false,
'non_printable_character' => false,
'ordered_traits' => false,

View File

@ -24,7 +24,6 @@ use Symfony\Component\Form\Extension\Core\Type\FormType;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\Role\Role;
use function count;
use function intval;
/**
* Class ReportController.
@ -145,7 +144,7 @@ class ReportController extends AbstractController
);
}
if (intval($person_id) !== intval($report->getPerson()->getId())) {
if ((int) $person_id !== (int) ($report->getPerson()->getId())) {
throw new RuntimeException(
$this->get('translator')->trans('This is not the report of the person.'),
1