Skip to content

Commit

Permalink
Merge pull request #13 from 365Werk/analysis-WNMmGG
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
HergenD committed Aug 18, 2021
2 parents 5a6835a + 9ed4bee commit 92c66b8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Middleware/IfMatch.php
Expand Up @@ -36,17 +36,17 @@ public function handle(Request $request, Closure $next)
$getEtag = EtagConditionals::getEtag($request, $getResponse);
$ifMatch = $request->header('If-Match');

if($ifMatch === null){
if ($ifMatch === null) {
return response(null, 412);
}

$ifMatchArray = (is_string($ifMatch))?
explode(',', $ifMatch):
$ifMatchArray = (is_string($ifMatch)) ?
explode(',', $ifMatch) :
$ifMatch;

// Strip W/ if weak comparison algorithm can be used
if (config('etagconditionals.if_match_weak')) {
foreach($ifMatchArray as &$match){
foreach ($ifMatchArray as &$match) {
$match = str_replace('W/', '', $match);
}
unset($match);
Expand Down

0 comments on commit 92c66b8

Please sign in to comment.