Skip to content

Commit cff69dd

Browse files
committed
cs fix
1 parent 55e729f commit cff69dd

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

rector.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Rector\CodingStyle\Rector\Closure\StaticClosureRector;
99
use Rector\CodingStyle\Rector\Property\InlineSimplePropertyAnnotationRector;
1010
use Rector\Config\RectorConfig;
11+
use Rector\DeadCode\Rector\Cast\RecastingRemovalRector;
1112
use Rector\Php81\Rector\Array_\FirstClassCallableRector;
1213
use Rector\Set\ValueObject\LevelSetList;
1314
use Rector\Set\ValueObject\SetList;
@@ -40,5 +41,8 @@
4041
__DIR__ . '/spec',
4142
],
4243
FirstClassCallableRector::class,
44+
RecastingRemovalRector::class => [
45+
__DIR__ . '/src/Handler/Logging.php',
46+
],
4347
]);
4448
};

src/Handler/Logging.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use ErrorHeroModule\Handler\Formatter\Json;
99
use ErrorHeroModule\Handler\Writer\Mail;
1010
use ErrorHeroModule\HeroConstant;
11-
use Laminas\Diactoros\Stream;
1211
use Laminas\Http\Header\Cookie;
1312
use Laminas\Http\PhpEnvironment\RemoteAddress;
1413
use Laminas\Http\PhpEnvironment\Request as HttpRequest;
@@ -91,16 +90,10 @@ private function getRequestData(?RequestInterface $request): array
9190
/** @var ParametersInterface $files*/
9291
$files = $request->getFiles();
9392

94-
$content = $request->getContent();
95-
96-
if ($content instanceof Stream) {
97-
$content = (string) $content;
98-
}
99-
10093
$queryData = $query->toArray();
10194
$requestMethod = $request->getMethod();
10295
$bodyData = $post->toArray();
103-
$rawData = str_replace(PHP_EOL, '', $content);
96+
$rawData = str_replace(PHP_EOL, '', (string) $request->getContent());
10497
$filesData = $this->includeFilesToAttachments
10598
? $files->toArray()
10699
: [];

0 commit comments

Comments
 (0)