Skip to content

Commit

Permalink
[phalcon#16102] - renamed property (psr12); better types for register…
Browse files Browse the repository at this point in the history
…edEngines (view)
  • Loading branch information
niden committed Sep 19, 2022
1 parent 26129e8 commit f827003
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
env:
# All versions should be declared here
PHALCON_VERSION: 5.0.0RC4
ZEPHIR_PARSER_VERSION: 1.5.0
ZEPHIR_PARSER_VERSION: 1.5.1
ZEPHIR_VERSION: 0.16.3

# For tests
Expand Down
8 changes: 4 additions & 4 deletions phalcon/Db/Column.zep
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ class Column implements ColumnInterface
*
* @var mixed|null
*/
protected _default = null;
protected defaultValue = null;

/**
* Position is first
Expand Down Expand Up @@ -403,7 +403,7 @@ class Column implements ColumnInterface
* Check if the column is default value
*/
if fetch defaultValue, definition["default"] {
let this->_default = defaultValue;
let this->defaultValue = defaultValue;
}

/**
Expand Down Expand Up @@ -502,7 +502,7 @@ class Column implements ColumnInterface
*/
public function getDefault() -> var
{
return this->_default;
return this->defaultValue;
}

/**
Expand Down Expand Up @@ -562,7 +562,7 @@ class Column implements ColumnInterface
return false;
}

return this->_default !== null;
return this->defaultValue !== null;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion phalcon/Mvc/View.zep
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ class View extends Injectable implements ViewInterface, EventsAwareInterface
/**
* @return array
*/
public function getRegisteredEngines() -> array | null
public function getRegisteredEngines() -> array
{
return this->registeredEngines;
}
Expand Down
6 changes: 3 additions & 3 deletions phalcon/Mvc/View/Simple.zep
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ class Simple extends Injectable implements ViewBaseInterface, EventsAwareInterfa
protected options = [];

/**
* @var array | null
* @var array
*/
protected registeredEngines = null;
protected registeredEngines = [];

/**
* @var string
Expand Down Expand Up @@ -444,7 +444,7 @@ class Simple extends Injectable implements ViewBaseInterface, EventsAwareInterfa

let registeredEngines = this->registeredEngines;

if typeof registeredEngines != "array" {
if empty registeredEngines {
/**
* We use Phalcon\Mvc\View\Engine\Php as default
* Use .phtml as extension for the PHP engine
Expand Down

0 comments on commit f827003

Please sign in to comment.