From ffec2d6ef7f7db3da7f922511d43f21355d5f868 Mon Sep 17 00:00:00 2001 From: Daimona Eaytoy Date: Wed, 11 Sep 2019 10:57:15 +0200 Subject: [PATCH] libs: Declare dynamic properties and improve doc types Change-Id: I5cf39d3dde5990e6a0fde91b98cf692e39a3a431 --- includes/libs/MemoizedCallable.php | 3 +++ includes/libs/composer/ComposerInstalled.php | 6 +++++- includes/libs/composer/ComposerJson.php | 6 +++++- includes/libs/composer/ComposerLock.php | 6 +++++- includes/libs/mime/XmlTypeCheck.php | 3 +++ 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/includes/libs/MemoizedCallable.php b/includes/libs/MemoizedCallable.php index 5e7485c279..f5112295fc 100644 --- a/includes/libs/MemoizedCallable.php +++ b/includes/libs/MemoizedCallable.php @@ -48,6 +48,9 @@ class MemoizedCallable { /** @var string Unique name of callable; used for cache keys. */ private $callableName; + /** @var int */ + private $ttl; + /** * @throws InvalidArgumentException if $callable is not a callable. * @param callable $callable Function or method to memoize. diff --git a/includes/libs/composer/ComposerInstalled.php b/includes/libs/composer/ComposerInstalled.php index 54d43d37cd..b036f05c05 100644 --- a/includes/libs/composer/ComposerInstalled.php +++ b/includes/libs/composer/ComposerInstalled.php @@ -7,6 +7,10 @@ * @since 1.27 */ class ComposerInstalled { + /** + * @var array[] + */ + private $contents; /** * @param string $location @@ -18,7 +22,7 @@ class ComposerInstalled { /** * Dependencies currently installed according to installed.json * - * @return array + * @return array[] */ public function getInstalledDependencies() { $deps = []; diff --git a/includes/libs/composer/ComposerJson.php b/includes/libs/composer/ComposerJson.php index 62231a89b6..f92759b1a0 100644 --- a/includes/libs/composer/ComposerJson.php +++ b/includes/libs/composer/ComposerJson.php @@ -7,6 +7,10 @@ * @since 1.25 */ class ComposerJson { + /** + * @var array[] + */ + private $contents; /** * @param string $location @@ -18,7 +22,7 @@ class ComposerJson { /** * Dependencies as specified by composer.json * - * @return array + * @return string[] */ public function getRequiredDependencies() { $deps = []; diff --git a/includes/libs/composer/ComposerLock.php b/includes/libs/composer/ComposerLock.php index c5b5f0040d..7f6b875963 100644 --- a/includes/libs/composer/ComposerLock.php +++ b/includes/libs/composer/ComposerLock.php @@ -7,6 +7,10 @@ * @since 1.25 */ class ComposerLock { + /** + * @var array[] + */ + private $contents; /** * @param string $location @@ -18,7 +22,7 @@ class ComposerLock { /** * Dependencies currently installed according to composer.lock * - * @return array + * @return array[] */ public function getInstalledDependencies() { $deps = []; diff --git a/includes/libs/mime/XmlTypeCheck.php b/includes/libs/mime/XmlTypeCheck.php index 9d66326744..16cd5ca9ca 100644 --- a/includes/libs/mime/XmlTypeCheck.php +++ b/includes/libs/mime/XmlTypeCheck.php @@ -68,6 +68,9 @@ class XmlTypeCheck { */ protected $stackDepth = 0; + /** @var callable|null */ + protected $filterCallback; + /** * @var array Additional parsing options */ -- 2.20.1