Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
HergenD authored and StyleCIBot committed Aug 18, 2021
1 parent 5a6835a commit 9ed4bee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Middleware/IfMatch.php
Original file line number Diff line number Diff line change
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 9ed4bee

Please sign in to comment.