Skip to content

Commit

Permalink
Merge pull request #7 from armellin/master
Browse files Browse the repository at this point in the history
Cleaner assignment to `$this->whiteIps`
  • Loading branch information
wdalmut authored Jun 12, 2016
2 parents 45a8675 + 980d12c commit 4d510a1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Listener/SoftLockListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,13 @@ public function __construct($maintenancePage, $maintenanceLock, array $whitePath
{
$this->maintenancePage = $maintenancePage;
$this->lock = file_exists($maintenanceLock);
$this->whiteIps = $this->whiteIps;
$this->whiteIps = $whiteIps;

array_walk($whitePaths, function(&$elem) {
$elem = "/" . str_replace("/", "\\/", $elem) . "/";
});

$this->whitePaths = array_replace(array("/^\/_/"), $whitePaths);
$this->whiteIps = array_replace(array(), $whiteIps);
}

public function setRequestStack($requestStack)
Expand Down

0 comments on commit 4d510a1

Please sign in to comment.