Run php-cs-fixer

This commit is contained in:
KHOUBZA Younes
2022-07-03 12:20:44 +01:00
parent f7b91f4985
commit babb9120f7
8 changed files with 32 additions and 17 deletions
+9 -3
View File
@@ -143,7 +143,9 @@ final class FlasherServiceProvider extends ServiceProvider
$eventDispatcher = $app->make('flasher.event_dispatcher');
$session = $app->make('session');
$storageBag = new StorageBag(new SessionBag($session)); // @phpstan-ignore-line
/** @phpstan-ignore-next-line */
$storageBag = new StorageBag(new SessionBag($session));
$criteria = $config->get('filter_criteria', array()); // @phpstan-ignore-line
return new StorageManager($storageBag, $eventDispatcher, $criteria); // @phpstan-ignore-line
@@ -159,8 +161,12 @@ final class FlasherServiceProvider extends ServiceProvider
$eventDispatcher = new EventDispatcher();
$config = $app->make('flasher.config');
$translator = new Translator($app->make('translator')); // @phpstan-ignore-line
$autoTranslate = $config->get('auto_translate', true); // @phpstan-ignore-line
/** @phpstan-ignore-next-line */
$translator = new Translator($app->make('translator'));
/** @phpstan-ignore-next-line */
$autoTranslate = $config->get('auto_translate', true);
$translatorListener = new TranslationListener($translator, $autoTranslate);
$eventDispatcher->addSubscriber($translatorListener);
@@ -38,9 +38,9 @@ final class PresetListener implements EventSubscriberInterface
}
/**
* @return void
*
* @throws PresetNotFoundException
*
* @return void
*/
public function __invoke(PersistEvent $event)
{
@@ -58,9 +58,9 @@ final class PresetListener implements EventSubscriberInterface
}
/**
* @return void
*
* @throws PresetNotFoundException
*
* @return void
*/
private function attachPresets(Envelope $envelope)
{
@@ -78,7 +78,7 @@ final class PresetListener implements EventSubscriberInterface
'type' => 'info',
'title' => null,
'message' => null,
'options' => array()
'options' => array(),
), $preset);
if (null === $envelope->getType()) {
@@ -436,7 +436,7 @@ class NotificationBuilder implements NotificationBuilderInterface
{
$flash = false;
if (\is_bool($parameters)) { // @phpstan-ignore-line
if (\is_bool($parameters)) { /** @phpstan-ignore-line */
$flash = $parameters;
$parameters = array();
@trigger_error('Since php-flasher/flasher v1.5: automatically flashing a preset is deprecated and will be removed in v2.0. You should use addPreset() or chain the preset call with flash() instead.', \E_USER_DEPRECATED);
+9 -3
View File
@@ -9,7 +9,9 @@ namespace Flasher\Prime\Translation;
final class Messages
{
/** @var array<string, string> */
/**
* @var array<string, string>
*/
public static $ar = array(
'success' => 'نجاح',
'error' => 'خطأ',
@@ -24,7 +26,9 @@ final class Messages
'resource' => 'الملف',
);
/** @var array<string, string> */
/**
* @var array<string, string>
*/
public static $en = array(
'success' => 'Success',
'error' => 'Error',
@@ -39,7 +43,9 @@ final class Messages
'resource' => 'resource',
);
/** @var array<string, string> */
/**
* @var array<string, string>
*/
public static $fr = array(
'success' => 'Succès',
'error' => 'Erreur',
-1
View File
@@ -24,7 +24,6 @@ if (false) { /** @phpstan-ignore-line */
*/
protected function flasherBuild(ContainerBuilder $container)
{
}
/**
-1
View File
@@ -9,7 +9,6 @@ namespace Flasher\Symfony\Http;
use Flasher\Prime\Http\RequestInterface;
use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface;
use Symfony\Component\HttpFoundation\Session\Session;
final class Request implements RequestInterface
+3 -3
View File
@@ -46,7 +46,7 @@ final class Response implements ResponseInterface
{
$contentType = $this->response->headers->get('Content-Type');
if (!is_string($contentType)) {
if (!\is_string($contentType)) {
return false;
}
@@ -60,7 +60,7 @@ final class Response implements ResponseInterface
{
$contentDisposition = $this->response->headers->get('Content-Disposition', '');
if (!is_string($contentDisposition)) {
if (!\is_string($contentDisposition)) {
return false;
}
@@ -74,7 +74,7 @@ final class Response implements ResponseInterface
{
$content = $this->response->getContent();
return is_string($content) ? $content : '';
return \is_string($content) ? $content : '';
}
/**
+5
View File
@@ -1,5 +1,10 @@
<?php
/*
* This file is part of the PHPFlasher package.
* (c) Younes KHOUBZA <younes.khoubza@gmail.com>
*/
namespace Flasher\Tests\Laravel;
use Flasher\Laravel\Translation\Translator;