mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
cs: Enable more risky rules.
This commit is contained in:
@@ -44,6 +44,8 @@ use function get_class;
|
||||
use function in_array;
|
||||
use function is_array;
|
||||
use function json_decode;
|
||||
use const JSON_PRETTY_PRINT;
|
||||
use const LC_TIME;
|
||||
|
||||
final class ImportPeopleFromCSVCommand extends Command
|
||||
{
|
||||
@@ -771,7 +773,7 @@ final class ImportPeopleFromCSVCommand extends Command
|
||||
. 'have the right to read it.');
|
||||
}
|
||||
|
||||
$resource = fopen($filename, 'r');
|
||||
$resource = fopen($filename, 'rb');
|
||||
|
||||
if (false == $resource) {
|
||||
throw new RuntimeException("The file '{$filename}' could not be opened.");
|
||||
|
@@ -41,6 +41,7 @@ use Symfony\Component\Validator\GroupSequenceProviderInterface;
|
||||
use UnexpectedValueException;
|
||||
use function count;
|
||||
use function in_array;
|
||||
use const SORT_REGULAR;
|
||||
|
||||
/**
|
||||
* AccompanyingPeriod Class.
|
||||
|
@@ -13,6 +13,7 @@ namespace Chill\PersonBundle\EventListener;
|
||||
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Chill\PersonBundle\Entity\PersonAltName;
|
||||
use const MB_CASE_TITLE;
|
||||
|
||||
class PersonEventListener
|
||||
{
|
||||
|
@@ -17,6 +17,8 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use const SORT_FLAG_CASE;
|
||||
use const SORT_STRING;
|
||||
|
||||
/**
|
||||
* A type to select the marital status.
|
||||
|
@@ -18,7 +18,7 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
// Feel free to remove this, extend it, or make something more sophisticated.
|
||||
if (isset($_SERVER['HTTP_CLIENT_IP'])
|
||||
|| isset($_SERVER['HTTP_X_FORWARDED_FOR'])
|
||||
|| !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', 'fe80::1', '::1']) || PHP_SAPI === 'cli-server')
|
||||
|| !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', 'fe80::1', '::1']) || \PHP_SAPI === 'cli-server')
|
||||
) {
|
||||
header('HTTP/1.0 403 Forbidden');
|
||||
|
||||
|
Reference in New Issue
Block a user