Skip to content

Commit

Permalink
Merge pull request phalcon#11948 from sergeyklay/2.1.x
Browse files Browse the repository at this point in the history
Code  cleanup
  • Loading branch information
sergeyklay authored Jul 3, 2016
2 parents 722d7ff + dc6c9f6 commit 5e0b084
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
18 changes: 7 additions & 11 deletions phalcon/flash/session.zep
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,16 @@ class Session extends FlashBase implements FlashInterface
messages = session->get("_flashMessages");

if typeof type == "string" {
if !isset messages[type] {
return [];
}

if !fetch returnMessages, messages[type] {
let returnMessages = [];
}
if fetch returnMessages, messages[type] {
if remove === true {
unset(messages[type]);
session->set("_flashMessages", messages);
}

if remove === true {
unset(messages[type]);
session->set("_flashMessages", messages);
return returnMessages;
}

return returnMessages;
return [];
}

if remove === true {
Expand Down
12 changes: 6 additions & 6 deletions phalcon/mvc/view/simple.zep
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ class Simple extends Injectable implements ViewBaseInterface
*/
protected _engines = false;

/**
* @var array|null
*/
protected _registeredEngines { get };

protected _activeRenderPath;
Expand Down Expand Up @@ -376,17 +379,14 @@ class Simple extends Injectable implements ViewBaseInterface
* Renders a partial view
*
* <code>
* //Show a partial inside another view
* // Show a partial inside another view
* $this->partial('shared/footer');
* </code>
*
* <code>
* //Show a partial inside another view with parameters
* $this->partial('shared/footer', array('content' => $html));
* // Show a partial inside another view with parameters
* $this->partial('shared/footer', ['content' => $html]);
* </code>
*
* @param string partialPath
* @param array params
*/
public function partial(string! partialPath, var params = null)
{
Expand Down

0 comments on commit 5e0b084

Please sign in to comment.