Fix warnings about return types
authorMatthias Schmidt <gravatronics@live.com>
Sun, 17 Jul 2016 08:26:30 +0000 (10:26 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 17 Jul 2016 08:44:35 +0000 (10:44 +0200)
wcfsetup/install.php
wcfsetup/install/files/lib/data/package/PackageCache.class.php
wcfsetup/install/files/lib/data/session/SessionAction.class.php
wcfsetup/install/files/lib/system/email/Email.class.php
wcfsetup/install/files/lib/system/io/Tar.class.php
wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php
wcfsetup/install/files/lib/system/worker/StatDailyRebuildDataWorker.class.php
wcfsetup/install/files/lib/util/DOMUtil.class.php

index d635109148ff16c4dcf52d7dd6ae20ebf04cf7e7..4e1d79b7c07560dbedbbcc16554957327b596b04 100644 (file)
@@ -633,7 +633,7 @@ class Tar {
         * Unpacks file header for one file entry.
         * 
         * @param       string          $binaryData
-        * @return      array           $fileheader
+        * @return      array|boolean
         */
        protected function readHeader($binaryData) {
                if (strlen($binaryData) != 512) {
index 2342ae4c70f1ca7da149c73a66e2179b2028c97f..86fa5879b915361dcd2f3287342ad7677bdf3967 100644 (file)
@@ -59,7 +59,7 @@ class PackageCache extends SingletonFactory {
         * @return      Package[]
         */
        public function getPackages() {
-               return $this->packages;
+               return $this->packages['packages'];
        }
        
        /**
index 2f58be643b54870ad84d872fe045e6d17efbeb0c..84b44d5040dea0df9b5d3367247cd3d23046c8dd 100644 (file)
@@ -51,7 +51,7 @@ class SessionAction extends AbstractDatabaseObjectAction {
        public function keepAlive() {
                // ignore sessions created by this request
                if (WCF::getSession()->lastActivityTime == TIME_NOW) {
-                       return;
+                       return [];
                }
                
                // update last activity time
index e4eaf8b361bc9b06ae75607c2cba7d1112d6224b..9178af0c272a696ed54d5eceb5e83c63c2694d2f 100644 (file)
@@ -45,13 +45,13 @@ class Email {
        
        /**
         * References header
-        * @var Mailbox[]
+        * @var string[]
         */
        protected $references = [];
        
        /**
         * In-Reply-To header
-        * @var Mailbox[]
+        * @var string[]
         */
        protected $inReplyTo = [];
        
index ae126b65edd159aec42f74add3585ca58ccd3ba1..e560bcdc8f738d6f2caa1881484af7cf12bcd36e 100644 (file)
@@ -284,7 +284,7 @@ class Tar implements IArchive {
         * Unpacks file header for one file entry.
         * 
         * @param       string          $binaryData
-        * @return      array           $fileheader
+        * @return      array|boolean
         */
        protected function readHeader($binaryData) {
                if (strlen($binaryData) != 512) {
index 652946dc9c04e58b0cdeca05125376da8ec5a589..0c6a735ceb55f3f78fa9f498b9647de39fd50843 100644 (file)
@@ -532,7 +532,7 @@ class PackageInstallationDispatcher {
         * Executes a package installation plugin.
         * 
         * @param       mixed[]         $nodeData
-        * @return      boolean
+        * @return      PackageInstallationStep
         * @throws      SystemException
         */
        protected function executePIP(array $nodeData) {
index 9253f381ac83e81b55c965d0d922d2a60f7e58b6..32d8c807150e0c7f3f91ff86b09a5d8f827380cb 100644 (file)
@@ -79,12 +79,11 @@ class StatDailyRebuildDataWorker extends AbstractRebuildDataWorker {
        }
        
        /**
-        * Gets the start timestamp.
-        * 
-        * @return      integer
+        * Determines the start timestamp.
         */
        protected function getStartDate() {
                if ($this->startDate) return;
+               
                $sql = "SELECT  MIN(registrationDate)
                        FROM    wcf".WCF_N."_user";
                $statement = WCF::getDB()->prepareStatement($sql);
index 68ab736e7dd67709a7159b1c6b9dbb7d767438d5..24f40dfdb5967e5009c0f066508590af056236a5 100644 (file)
@@ -74,7 +74,7 @@ final class DOMUtil {
         * 
         * @param       \DOMNode                $node1          first node
         * @param       \DOMNode                $node2          second node
-        * @return      \DOMElement|null        common ancestor or null
+        * @return      \DOMNode|null   common ancestor or null
         */
        public static function getCommonAncestor(\DOMNode $node1, \DOMNode $node2) {
                // abort if both elements share a common element or are both direct descendants
@@ -436,7 +436,7 @@ final class DOMUtil {
         * @param       \DOMNode        $node           reference node
         * @param       \DOMElement     $ancestor       ancestor element that should not be split
         * @param       boolean         $splitBefore    true if nodes before `$node` should be moved into a new node, false to split nodes after `$node`
-        * @return      \DOMElement     parent node containing `$node`, direct child of `$ancestor`
+        * @return      \DOMNode        parent node containing `$node`, direct child of `$ancestor`
         */
        public static function splitParentsUntil(\DOMNode $node, \DOMElement $ancestor, $splitBefore = true) {
                if (!self::contains($ancestor, $node)) {