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-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Variable "%s" not allowed in double quoted string; use sprintf() or concatenation instead
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ecs.php b/ecs.php
new file mode 100644
index 00000000..9fcf9bda
--- /dev/null
+++ b/ecs.php
@@ -0,0 +1,39 @@
+parameters();
+
+ $parameters->set(Option::PATHS, [
+ __DIR__ . '/src'
+ ]);
+
+ $parameters->set(Option::SKIP, [
+ PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer::class,
+ PhpCsFixer\Fixer\ControlStructure\YodaStyleFixer::class,
+ PhpCsFixer\Fixer\Whitespace\MethodChainingIndentationFixer::class,
+ PhpCsFixer\Fixer\Operator\NotOperatorWithSuccessorSpaceFixer::class,
+ Symplify\CodingStandard\Fixer\Spacing\MethodChainingNewlineFixer::class,
+ ]);
+
+ $containerConfigurator->import(SetList::ARRAY);
+ $containerConfigurator->import(SetList::CLEAN_CODE);
+ $containerConfigurator->import(SetList::COMMENTS);
+ $containerConfigurator->import(SetList::COMMON);
+ $containerConfigurator->import(SetList::CONTROL_STRUCTURES);
+ $containerConfigurator->import(SetList::DOCBLOCK);
+ $containerConfigurator->import(SetList::NAMESPACES);
+ $containerConfigurator->import(SetList::PSR_12);
+ $containerConfigurator->import(SetList::SPACES);
+ $containerConfigurator->import(SetList::STRICT);
+ $containerConfigurator->import(SetList::SYMPLIFY);
+
+ $services = $containerConfigurator->services();
+ $services->set(PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer::class)
+ ->call('configure', [[
+ 'syntax' => 'long',
+ ]]);
+};
\ No newline at end of file
diff --git a/src/Laravel/.phpcs.xml.dist b/src/Laravel/.phpcs.xml.dist
deleted file mode 100644
index 93d245bc..00000000
--- a/src/Laravel/.phpcs.xml.dist
+++ /dev/null
@@ -1,625 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- src
- tests
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- error
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Variable "%s" not allowed in double quoted string; use sprintf() or concatenation instead
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Laravel/Config/Config.php b/src/Laravel/Config/Config.php
index 52ac8e3e..6bef240d 100644
--- a/src/Laravel/Config/Config.php
+++ b/src/Laravel/Config/Config.php
@@ -2,8 +2,8 @@
namespace Flasher\Laravel\Config;
-use Illuminate\Config\Repository;
use Flasher\Prime\Config\ConfigInterface;
+use Illuminate\Config\Repository;
final class Config implements ConfigInterface
{
@@ -19,6 +19,6 @@ final class Config implements ConfigInterface
public function get($key, $default = null)
{
- return $this->config->get('flasher'.$this->separator.$key, $default);
+ return $this->config->get('flasher' . $this->separator . $key, $default);
}
}
diff --git a/src/Laravel/Facade/Flasher.php b/src/Laravel/Facade/Flasher.php
index 6b43215b..749fcf42 100644
--- a/src/Laravel/Facade/Flasher.php
+++ b/src/Laravel/Facade/Flasher.php
@@ -6,11 +6,8 @@ use Illuminate\Support\Facades\Facade;
class Flasher extends Facade
{
- /**
- * @inheritdoc
- */
protected static function getFacadeAccessor()
{
return 'flasher';
}
-}
\ No newline at end of file
+}
diff --git a/src/Laravel/FlasherServiceProvider.php b/src/Laravel/FlasherServiceProvider.php
index 8c0cd051..e93d4c1b 100644
--- a/src/Laravel/FlasherServiceProvider.php
+++ b/src/Laravel/FlasherServiceProvider.php
@@ -2,8 +2,8 @@
namespace Flasher\Laravel;
-use Illuminate\Support\ServiceProvider;
use Flasher\Laravel\ServiceProvider\ServiceProviderManager;
+use Illuminate\Support\ServiceProvider;
final class FlasherServiceProvider extends ServiceProvider
{
@@ -45,33 +45,21 @@ final class FlasherServiceProvider extends ServiceProvider
return $this->app;
}
- /**
- * {@inheritdoc}
- */
public function mergeConfigFrom($path, $key)
{
parent::mergeConfigFrom($path, $key);
}
- /**
- * {@inheritdoc}
- */
public function publishes(array $paths, $groups = null)
{
parent::publishes($paths, $groups);
}
- /**
- * {@inheritdoc}
- */
public function loadTranslationsFrom($path, $namespace)
{
parent::loadTranslationsFrom($path, $namespace);
}
- /**
- * {@inheritdoc}
- */
public function loadViewsFrom($path, $namespace)
{
parent::loadViewsFrom($path, $namespace);
diff --git a/src/Laravel/Middleware/SessionMiddleware.php b/src/Laravel/Middleware/SessionMiddleware.php
index 82121e2c..cbaed177 100755
--- a/src/Laravel/Middleware/SessionMiddleware.php
+++ b/src/Laravel/Middleware/SessionMiddleware.php
@@ -26,11 +26,6 @@ final class SessionMiddleware
*/
private $renderer;
- /**
- * @param ConfigInterface $config
- * @param FlasherInterface $flasher
- * @param ResponseManagerInterface $renderer
- */
public function __construct(ConfigInterface $config, FlasherInterface $flasher, ResponseManagerInterface $renderer)
{
$this->config = $config;
@@ -41,16 +36,11 @@ final class SessionMiddleware
/**
* Run the request filter.
*
- * @param Request $request
- * @param Closure $next
- *
* @return mixed
*/
public function handle(Request $request, Closure $next)
{
- /**
- * @var Response $response
- */
+ /** @var Response $response */
$response = $next($request);
if ($request->isXmlHttpRequest() || true !== $this->config->get('auto_create_from_session')) {
@@ -76,7 +66,7 @@ final class SessionMiddleware
$content = $response->getContent();
$htmlResponse = $this->renderer->render(array(), array(
- 'format' => 'html',
+ 'format' => 'html',
'content' => $content,
));
@@ -85,7 +75,7 @@ final class SessionMiddleware
}
$pos = strripos($content, '