From: Matthias Schmidt Date: Sun, 17 Jul 2016 08:26:30 +0000 (+0200) Subject: Fix warnings about return types X-Git-Tag: 3.0.0_Beta_1~1089 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4be0ececde078d059e9cdc41fd051dbdaea65605;p=GitHub%2FWoltLab%2FWCF.git Fix warnings about return types --- diff --git a/wcfsetup/install.php b/wcfsetup/install.php index d635109148..4e1d79b7c0 100644 --- a/wcfsetup/install.php +++ b/wcfsetup/install.php @@ -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) { diff --git a/wcfsetup/install/files/lib/data/package/PackageCache.class.php b/wcfsetup/install/files/lib/data/package/PackageCache.class.php index 2342ae4c70..86fa5879b9 100644 --- a/wcfsetup/install/files/lib/data/package/PackageCache.class.php +++ b/wcfsetup/install/files/lib/data/package/PackageCache.class.php @@ -59,7 +59,7 @@ class PackageCache extends SingletonFactory { * @return Package[] */ public function getPackages() { - return $this->packages; + return $this->packages['packages']; } /** diff --git a/wcfsetup/install/files/lib/data/session/SessionAction.class.php b/wcfsetup/install/files/lib/data/session/SessionAction.class.php index 2f58be643b..84b44d5040 100644 --- a/wcfsetup/install/files/lib/data/session/SessionAction.class.php +++ b/wcfsetup/install/files/lib/data/session/SessionAction.class.php @@ -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 diff --git a/wcfsetup/install/files/lib/system/email/Email.class.php b/wcfsetup/install/files/lib/system/email/Email.class.php index e4eaf8b361..9178af0c27 100644 --- a/wcfsetup/install/files/lib/system/email/Email.class.php +++ b/wcfsetup/install/files/lib/system/email/Email.class.php @@ -45,13 +45,13 @@ class Email { /** * References header - * @var Mailbox[] + * @var string[] */ protected $references = []; /** * In-Reply-To header - * @var Mailbox[] + * @var string[] */ protected $inReplyTo = []; diff --git a/wcfsetup/install/files/lib/system/io/Tar.class.php b/wcfsetup/install/files/lib/system/io/Tar.class.php index ae126b65ed..e560bcdc8f 100644 --- a/wcfsetup/install/files/lib/system/io/Tar.class.php +++ b/wcfsetup/install/files/lib/system/io/Tar.class.php @@ -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) { diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php index 652946dc9c..0c6a735ceb 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php @@ -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) { diff --git a/wcfsetup/install/files/lib/system/worker/StatDailyRebuildDataWorker.class.php b/wcfsetup/install/files/lib/system/worker/StatDailyRebuildDataWorker.class.php index 9253f381ac..32d8c80715 100644 --- a/wcfsetup/install/files/lib/system/worker/StatDailyRebuildDataWorker.class.php +++ b/wcfsetup/install/files/lib/system/worker/StatDailyRebuildDataWorker.class.php @@ -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); diff --git a/wcfsetup/install/files/lib/util/DOMUtil.class.php b/wcfsetup/install/files/lib/util/DOMUtil.class.php index 68ab736e7d..24f40dfdb5 100644 --- a/wcfsetup/install/files/lib/util/DOMUtil.class.php +++ b/wcfsetup/install/files/lib/util/DOMUtil.class.php @@ -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)) {