Skip to content

Commit

Permalink
Use php 5.3 syntax
Browse files Browse the repository at this point in the history
When will I learn?
  • Loading branch information
lukemorton committed Feb 22, 2014
1 parent 1b74795 commit 153c7e1
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions src/Lily/Application/RoutedApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,14 @@ private function wrapRegex($uri)

private function uriRegex($uri)
{
return
array_reduce(
array(
array($this, 'escapeLiterals'),
array($this, 'addOptionalPartRegex'),
array($this, 'addParamRegex'),
array($this, 'addSuperSplatRegex'),
array($this, 'addSplatRegex'),
array($this, 'wrapRegex'),
),
function ($uri, $callback) {
return call_user_func($callback, $uri);
},
$uri);
return // blame php 5.3 support for this nesting:
$this->wrapRegex(
$this->addSplatRegex(
$this->addSuperSplatRegex(
$this->addParamRegex(
$this->addOptionalPartRegex(
$this->escapeLiterals(
$uri))))));
}

private function removeNumeric(array $mixedArray)
Expand Down

0 comments on commit 153c7e1

Please sign in to comment.