From 6823a7b45787e16c448ea12e1373c30f50bc4b2e Mon Sep 17 00:00:00 2001 From: Freek Van der Herten Date: Sat, 17 Feb 2018 21:11:20 +0000 Subject: [PATCH] Apply fixes from StyleCI [ci skip] [skip ci] --- src/Profiles/Profile.php | 3 +-- tests/NonceTest.php | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Profiles/Profile.php b/src/Profiles/Profile.php index f9b4fba..0f2fd98 100644 --- a/src/Profiles/Profile.php +++ b/src/Profiles/Profile.php @@ -42,7 +42,6 @@ public function reportTo(string $uri): self { $this->directives['report-uri'] = [$uri]; - $reportToContents = json_encode([ 'url' => $uri, 'group-name' => class_basename(static::class), @@ -61,7 +60,7 @@ public function shouldBeApplied(Request $request, Response $response): bool public function addNonceForDirective(string $directive): self { - return $this->addDirective($directive, "'nonce-" . app('csp-nonce') . "'"); + return $this->addDirective($directive, "'nonce-".app('csp-nonce')."'"); } public function applyTo(Response $response) diff --git a/tests/NonceTest.php b/tests/NonceTest.php index 1e9a79a..890529d 100644 --- a/tests/NonceTest.php +++ b/tests/NonceTest.php @@ -11,8 +11,8 @@ public function calling_the_nonce_function_will_generate_the_same_result() $this->assertEquals(strlen($nonce), 32); - foreach(range(1,5) as $i) { + foreach (range(1, 5) as $i) { $this->assertEquals($nonce, cspNonce()); } } -} \ No newline at end of file +}