remove rendered at stamp middleware and fix storage add method

This commit is contained in:
Khoubza Younes
2020-12-06 06:39:07 +01:00
parent 3a9c6dcf4f
commit a244ff8a37
3 changed files with 0 additions and 25 deletions
@@ -1,18 +0,0 @@
<?php
namespace Flasher\Prime\Middleware;
use Flasher\Prime\Envelope;
use Flasher\Prime\Stamp\RenderedAtStamp;
final class AddRenderedAtStampMiddleware implements MiddlewareInterface
{
public function handle(Envelope $envelope, callable $next)
{
if (null === $envelope->get('Flasher\Prime\Stamp\RenderedAtStamp')) {
$envelope->withStamp(new RenderedAtStamp());
}
return $next($envelope);
}
}
@@ -16,8 +16,3 @@ services:
public: false
tags:
- 'flasher.middleware'
Flasher\Prime\Middleware\AddRenderedAtStampMiddleware:
public: false
tags:
- 'flasher.middleware'
-2
View File
@@ -38,8 +38,6 @@ final class Storage implements StorageInterface
public function add($envelopes)
{
$envelopes = is_array($envelopes) ? $envelopes : func_get_args();
$envelopes = array_merge($envelopes, $this->all());
$store = $this->all();
foreach ($envelopes as $envelope) {