[TASK] Code cleanup ContextMenuConfiguration.php 43/37443/3
authorMichael Oehlhof <typo3@oehlhof.de>
Sun, 1 Mar 2015 23:25:53 +0000 (00:25 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 2 Mar 2015 16:01:31 +0000 (17:01 +0100)
backend/Classes/ContextMenu/Pagetree/Extdirect/ContextMenuConfiguration.php
To get it "green" in PhpStorm several changes were made:

- set correct parameter type in PhpDoc comment
- add missing return value

Resolves: #65444
Releases: master
Change-Id: Iebb9c4c789612f229f4d4562cfd1445d98703594
Reviewed-on: http://review.typo3.org/37443
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/ContextMenu/Pagetree/Extdirect/ContextMenuConfiguration.php

index 14b030b..f73e693 100644 (file)
@@ -35,7 +35,7 @@ class ContextMenuConfiguration extends \TYPO3\CMS\Backend\ContextMenu\Extdirect\
        /**
         * Returns the actions for the given node information's
         *
-        * @param stdClass $nodeData
+        * @param \stdClass $nodeData
         * @return array
         */
        public function getActionsForNodeArray($nodeData) {
@@ -45,6 +45,7 @@ class ContextMenuConfiguration extends \TYPO3\CMS\Backend\ContextMenu\Extdirect\
                $this->initDataProvider();
                $this->dataProvider->setContextMenuType('table.' . $node->getType());
                $actionCollection = $this->dataProvider->getActionsForNode($node);
+               $actions = array();
                if ($actionCollection instanceof \TYPO3\CMS\Backend\ContextMenu\ContextMenuActionCollection) {
                        $actions = $actionCollection->toArray();
                }