Skip to content

Commit

Permalink
improved code
Browse files Browse the repository at this point in the history
  • Loading branch information
potfur committed Mar 28, 2015
1 parent b0af58f commit 4b46a31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Moss/Http/Router/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ public function __construct($pattern, $controller, array $arguments = [], array
$matches = [];
preg_match_all(self::REGEX, $this->pattern, $matches, \PREG_SET_ORDER);

$this->regex = $this->buildRegexp($this->pattern, $matches);
$this->requirements = $this->buildRequirements($matches);
$this->builders = $this->buildBuilders($this->pattern, $matches);
$this->regex = $this->buildRegexp($this->pattern, (array) $matches);
$this->requirements = $this->buildRequirements((array) $matches);
$this->builders = $this->buildBuilders($this->pattern, (array) $matches);

$this->arguments = array_fill_keys(array_keys($this->requirements), null);

Expand Down
2 changes: 1 addition & 1 deletion Moss/Http/Session/FlashBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function add($message, $type = 'error')
*/
public function has($type = null)
{
if (!$type) {
if ($type === null) {
return !empty($this->session[$this->prefix]);
}

Expand Down

0 comments on commit 4b46a31

Please sign in to comment.