Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
johanjanssens committed May 2, 2016
1 parent b9b1238 commit e245163
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion code/controller/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function getView()

//Create the view
$config = array(
'url' => clone $this->getObject('request')->getUrl(),
'url' => clone $this->getObject('request')->getUrl(),
'layout' => $this->getRequest()->getQuery()->get('layout', 'identifier'),
'auto_fetch' => $this instanceof ControllerModellable
);
Expand Down
4 changes: 2 additions & 2 deletions code/model/paginator/paginator.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function set($name, $value)
}
}

/**
/**
* Implements lazy loading of the pages config property.
*
* @param string
Expand All @@ -79,7 +79,7 @@ public function get($name, $default = null)
return parent::get($name);
}

/**
/**
* Get a list of pages
*
* @return array Returns and array of pages information
Expand Down
4 changes: 3 additions & 1 deletion code/template/filter/abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ public function parseAttributes($string)
(?<value>((?&value_double)|(?&value_none)))
)
(?<n>(?&name))[\s]*(=[\s]*(?<v>(?&value)))?#xs';

if (preg_match_all($pattern, $string, $matches, PREG_SET_ORDER))
{
foreach ($matches as $match) {
foreach ($matches as $match)
{
if (!empty($match['n'])) {
$result[$match['n']] = isset($match['v']) ? trim($match['v'], '\'"') : '';
}
Expand Down
6 changes: 3 additions & 3 deletions code/template/filter/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ public function filter(&$text, TemplateInterface $template)
/**
* Add the action if left empty
*
* @param string $text Template text
* @param string The action url
* @param string $text Template text
* @param string $action The action url
* @return TemplateFilterForm
*/
Expand All @@ -97,7 +97,7 @@ protected function _addAction(&$text, $action)
{
foreach ($matches as $match)
{
$str = str_replace('action=""', 'action="' . $action . '"', $match[0]);
$str = str_replace('action=""', 'action="' . $action . '"', $match[0]);
$text = str_replace($match[0], $str, $text);
}
}
Expand Down

0 comments on commit e245163

Please sign in to comment.