[TASK] Fix PHPdoc of methods and type hint comments
authorOliver Hader <oliver@typo3.org>
Wed, 7 Nov 2012 22:39:16 +0000 (23:39 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Wed, 7 Nov 2012 22:40:56 +0000 (23:40 +0100)
Change-Id: I3c3078b6e69f937d4383eb8677dbd60f249d2c8d
Releases: 6.0
Reviewed-on: http://review.typo3.org/16276
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
typo3/sysext/backend/Classes/Tree/TreeNode.php
typo3/sysext/core/Classes/Tree/TableConfiguration/AbstractTableConfigurationTreeDataProvider.php
typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeDataProvider.php

index ef616a5..8999973 100644 (file)
@@ -64,7 +64,6 @@ class TreeNode implements \TYPO3\CMS\Backend\Tree\ComparableNodeInterface, \Seri
         * This is useful for the deserialization.
         *
         * @param array $data
-        * @return void
         */
        public function __construct(array $data = array()) {
                if (count($data)) {
@@ -137,7 +136,7 @@ class TreeNode implements \TYPO3\CMS\Backend\Tree\ComparableNodeInterface, \Seri
        /**
         * Sets the parent node
         *
-        * @param \TYPO3\CMS\Backend\Tree\TreeNode $parentNode
+        * @param NULL|\TYPO3\CMS\Backend\Tree\TreeNode $parentNode
         * @return void
         */
        public function setParentNode(\TYPO3\CMS\Backend\Tree\TreeNode $parentNode = NULL) {
index bfb7d2d..b4f3470 100644 (file)
@@ -31,7 +31,6 @@ namespace TYPO3\CMS\Core\Tree\TableConfiguration;
  *
  * @author Steffen Ritter <info@steffen-ritter.net>
  * @package TYPO3
- * @subpackage t3lib_tree
  */
 abstract class AbstractTableConfigurationTreeDataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider {
 
@@ -46,13 +45,18 @@ abstract class AbstractTableConfigurationTreeDataProvider extends \TYPO3\CMS\Bac
        protected $levelMaximum = 2;
 
        /**
-        * @var t3lib_tree_AbstractNode
+        * @var \TYPO3\CMS\Backend\Tree\TreeNode
         */
        protected $treeData = NULL;
 
        /**
         * @var string
         */
+       protected $treeId;
+
+       /**
+        * @var string
+        */
        protected $nonSelectableLevelList = '0';
 
        /**
@@ -138,7 +142,7 @@ abstract class AbstractTableConfigurationTreeDataProvider extends \TYPO3\CMS\Bac
        /**
         * Gets the expanded state of a given node
         *
-        * @param t3lib_tree_AbstractNode $node
+        * @param \TYPO3\CMS\Backend\Tree\TreeNode $node
         * @return boolean
         */
        protected function isExpanded(\TYPO3\CMS\Backend\Tree\TreeNode $node) {
@@ -250,6 +254,4 @@ abstract class AbstractTableConfigurationTreeDataProvider extends \TYPO3\CMS\Bac
        }
 
 }
-
-
 ?>
\ No newline at end of file
index 86015c6..7e01815 100644 (file)
@@ -185,7 +185,7 @@ class DatabaseTreeDataProvider extends \TYPO3\CMS\Core\Tree\TableConfiguration\A
        /**
         * Gets the root node
         *
-        * @return t3lib_tree_tca_DatabaseNode
+        * @return \TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode
         */
        public function getRoot() {
                return $this->buildRepresentationForNode($this->treeData);
@@ -216,7 +216,7 @@ class DatabaseTreeDataProvider extends \TYPO3\CMS\Core\Tree\TableConfiguration\A
         * @param string $tableWhere
         * @return void
         */
-       public function setTableWhere(string $tableWhere) {
+       public function setTableWhere($tableWhere) {
                $this->tableWhere = $tableWhere;
        }
 
@@ -233,12 +233,13 @@ class DatabaseTreeDataProvider extends \TYPO3\CMS\Core\Tree\TableConfiguration\A
         * Builds a complete node including childs
         *
         * @param \TYPO3\CMS\Backend\Tree\TreeNode $basicNode
-        * @param NULL|t3lib_tree_tca_DatabaseNode $parent
+        * @param NULL|\TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode $parent
         * @param integer $level
-        * @return An object
+        * @return \TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode Node object
         */
-       protected function buildRepresentationForNode(\TYPO3\CMS\Backend\Tree\TreeNode $basicNode, \t3lib_tree_tca_DatabaseNode $parent = NULL, $level = 0) {
-               $node = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('t3lib_tree_tca_DatabaseNode');
+       protected function buildRepresentationForNode(\TYPO3\CMS\Backend\Tree\TreeNode $basicNode, \TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode $parent = NULL, $level = 0) {
+               /** @var $node \TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeNode */
+               $node = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Tree\\TableConfiguration\\DatabaseTreeNode');
                $row = array();
                if ($basicNode->getId() == 0) {
                        $node->setSelected(FALSE);
@@ -261,6 +262,7 @@ class DatabaseTreeDataProvider extends \TYPO3\CMS\Core\Tree\TableConfiguration\A
                $node->setParentNode($parent);
                if ($basicNode->hasChildNodes()) {
                        $node->setHasChildren(TRUE);
+                       /** @var $childNodes \TYPO3\CMS\Backend\Tree\SortedTreeNodeCollection */
                        $childNodes = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Tree\\SortedTreeNodeCollection');
                        foreach ($basicNode->getChildNodes() as $child) {
                                $childNodes->append($this->buildRepresentationForNode($child, $node, $level + 1));
@@ -296,7 +298,7 @@ class DatabaseTreeDataProvider extends \TYPO3\CMS\Core\Tree\TableConfiguration\A
         *
         * @param \TYPO3\CMS\Backend\Tree\TreeNode $node
         * @param integer $level
-        * @return NULL|object
+        * @return NULL|\TYPO3\CMS\Backend\Tree\TreeNodeCollection
         */
        protected function getChildrenOf(\TYPO3\CMS\Backend\Tree\TreeNode $node, $level) {
                $nodeData = NULL;
@@ -312,6 +314,7 @@ class DatabaseTreeDataProvider extends \TYPO3\CMS\Core\Tree\TableConfiguration\A
                $storage = NULL;
                $children = $this->getRelatedRecords($nodeData);
                if (count($children)) {
+                       /** @var $storage \TYPO3\CMS\Backend\Tree\TreeNodeCollection */
                        $storage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Tree\\TreeNodeCollection');
                        foreach ($children as $child) {
                                $node = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Tree\\TreeNode');
@@ -335,7 +338,7 @@ class DatabaseTreeDataProvider extends \TYPO3\CMS\Core\Tree\TableConfiguration\A
         * @return array
         */
        protected function getRelatedRecords(array $row) {
-               if ($this->getLookupMode() == \t3lib_tree_tca_DatabaseTreeDataProvider::MODE_PARENT) {
+               if ($this->getLookupMode() == \TYPO3\CMS\Core\Tree\TableConfiguration\DatabaseTreeDataProvider::MODE_PARENT) {
                        $children = $this->getChildrenUidsFromParentRelation($row);
                } else {
                        $children = $this->getChildrenUidsFromChildrenRelation($row);
@@ -363,6 +366,7 @@ class DatabaseTreeDataProvider extends \TYPO3\CMS\Core\Tree\TableConfiguration\A
 
                case 'select':
                        if ($this->columnConfiguration['MM']) {
+                               /** @var $dbGroup \TYPO3\CMS\Core\Database\RelationHandler */
                                $dbGroup = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                                // Dummy field for setting "look from other site"
                                $this->columnConfiguration['MM_oppositeField'] = 'children';
@@ -395,6 +399,7 @@ class DatabaseTreeDataProvider extends \TYPO3\CMS\Core\Tree\TableConfiguration\A
 
                case 'select':
                        if ($this->columnConfiguration['MM']) {
+                               /** @var $dbGroup \TYPO3\CMS\Core\Database\RelationHandler */
                                $dbGroup = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
                                $dbGroup->start($value, $this->getTableName(), $this->columnConfiguration['MM'], $uid, $this->getTableName(), $this->columnConfiguration);
                                $relatedUids = $dbGroup->tableArray[$this->getTableName()];