浏览代码

backport treebehvaior phpdoc change from 4.x to 3.x

Kevin Pfeifer 4 年之前
父节点
当前提交
4235ee5a12
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      src/ORM/Behavior/TreeBehavior.php

+ 6 - 6
src/ORM/Behavior/TreeBehavior.php

@@ -598,12 +598,12 @@ class TreeBehavior extends Behavior
      * Reorders the node without changing its parent.
      * Reorders the node without changing its parent.
      *
      *
      * If the node is the first child, or is a top level node with no previous node
      * If the node is the first child, or is a top level node with no previous node
-     * this method will return false
+     * this method will return the same node without any changes
      *
      *
      * @param \Cake\Datasource\EntityInterface $node The node to move
      * @param \Cake\Datasource\EntityInterface $node The node to move
      * @param int|bool $number How many places to move the node, or true to move to first position
      * @param int|bool $number How many places to move the node, or true to move to first position
      * @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found
      * @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found
-     * @return \Cake\Datasource\EntityInterface|false $node The node after being moved or false on failure
+     * @return \Cake\Datasource\EntityInterface|false $node The node after being moved or false if `$number` is < 1
      */
      */
     public function moveUp(EntityInterface $node, $number = 1)
     public function moveUp(EntityInterface $node, $number = 1)
     {
     {
@@ -624,7 +624,7 @@ class TreeBehavior extends Behavior
      * @param \Cake\Datasource\EntityInterface $node The node to move
      * @param \Cake\Datasource\EntityInterface $node The node to move
      * @param int|bool $number How many places to move the node, or true to move to first position
      * @param int|bool $number How many places to move the node, or true to move to first position
      * @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found
      * @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found
-     * @return \Cake\Datasource\EntityInterface|false $node The node after being moved or false on failure
+     * @return \Cake\Datasource\EntityInterface|false $node The node after being moved
      */
      */
     protected function _moveUp($node, $number)
     protected function _moveUp($node, $number)
     {
     {
@@ -688,12 +688,12 @@ class TreeBehavior extends Behavior
      * Reorders the node without changing the parent.
      * Reorders the node without changing the parent.
      *
      *
      * If the node is the last child, or is a top level node with no subsequent node
      * If the node is the last child, or is a top level node with no subsequent node
-     * this method will return false
+     * this method will return the same node without any changes
      *
      *
      * @param \Cake\Datasource\EntityInterface $node The node to move
      * @param \Cake\Datasource\EntityInterface $node The node to move
      * @param int|bool $number How many places to move the node or true to move to last position
      * @param int|bool $number How many places to move the node or true to move to last position
      * @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found
      * @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found
-     * @return \Cake\Datasource\EntityInterface|false the entity after being moved or false on failure
+     * @return \Cake\Datasource\EntityInterface|false the entity after being moved or false if `$number` is < 1
      */
      */
     public function moveDown(EntityInterface $node, $number = 1)
     public function moveDown(EntityInterface $node, $number = 1)
     {
     {
@@ -714,7 +714,7 @@ class TreeBehavior extends Behavior
      * @param \Cake\Datasource\EntityInterface $node The node to move
      * @param \Cake\Datasource\EntityInterface $node The node to move
      * @param int|bool $number How many places to move the node, or true to move to last position
      * @param int|bool $number How many places to move the node, or true to move to last position
      * @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found
      * @throws \Cake\Datasource\Exception\RecordNotFoundException When node was not found
-     * @return \Cake\Datasource\EntityInterface|false $node The node after being moved or false on failure
+     * @return \Cake\Datasource\EntityInterface|false $node The node after being moved
      */
      */
     protected function _moveDown($node, $number)
     protected function _moveDown($node, $number)
     {
     {