Type hint model param

This commit is contained in:
ADmad 2015-03-04 21:15:24 +05:30
parent a1286e9e7d
commit 7173f21dc8

View file

@ -111,7 +111,7 @@ class TreeBehavior extends ModelBehavior {
* @param int|string $id Record ID * @param int|string $id Record ID
* @return void * @return void
*/ */
protected function _setChildrenLevel($Model, $id) { protected function _setChildrenLevel(Model $Model, $id) {
$settings = $Model->Behaviors->Tree->settings[$Model->alias]; $settings = $Model->Behaviors->Tree->settings[$Model->alias];
$primaryKey = $Model->primaryKey; $primaryKey = $Model->primaryKey;
$depths = array($id => (int)$Model->data[$Model->alias][$settings['level']]); $depths = array($id => (int)$Model->data[$Model->alias][$settings['level']]);