libs: Declare dynamic properties and improve doc types
authorDaimona Eaytoy <daimona.wiki@gmail.com>
Wed, 11 Sep 2019 08:57:15 +0000 (10:57 +0200)
committerDaimona Eaytoy <daimona.wiki@gmail.com>
Thu, 12 Sep 2019 10:57:26 +0000 (10:57 +0000)
Change-Id: I5cf39d3dde5990e6a0fde91b98cf692e39a3a431

includes/libs/MemoizedCallable.php
includes/libs/composer/ComposerInstalled.php
includes/libs/composer/ComposerJson.php
includes/libs/composer/ComposerLock.php
includes/libs/mime/XmlTypeCheck.php

index 5e7485c..f511229 100644 (file)
@@ -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.
index 54d43d3..b036f05 100644 (file)
@@ -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 = [];
index 62231a8..f92759b 100644 (file)
@@ -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 = [];
index c5b5f00..7f6b875 100644 (file)
@@ -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 = [];
index 9d66326..16cd5ca 100644 (file)
@@ -68,6 +68,9 @@ class XmlTypeCheck {
         */
        protected $stackDepth = 0;
 
+       /** @var callable|null */
+       protected $filterCallback;
+
        /**
         * @var array Additional parsing options
         */