Browse Source

Doc block return type array specification.

mscherer 7 years ago
parent
commit
c39903648b

+ 1 - 2
src/Cache/Cache.php

@@ -496,8 +496,7 @@ class Cache
      *
      * @param array $keys Array of cache keys to be deleted
      * @param string $config name of the configuration to use. Defaults to 'default'
-     * @return array of boolean values that are true if the value was successfully deleted, false if it didn't exist or
-     * couldn't be removed
+     * @return bool True if the items were successfully removed. False if there was an error.
      */
     public static function deleteMany($keys, $config = 'default')
     {

+ 3 - 3
src/Console/CommandCollection.php

@@ -162,7 +162,7 @@ class CommandCollection implements IteratorAggregate, Countable
      * the long name (`plugin.command`) will be returned.
      *
      * @param string $plugin The plugin to scan.
-     * @return array Discovered plugin commands.
+     * @return string[] Discovered plugin commands.
      */
     public function discoverPlugin($plugin)
     {
@@ -176,7 +176,7 @@ class CommandCollection implements IteratorAggregate, Countable
      * Resolve names based on existing commands
      *
      * @param array $input The results of a CommandScanner operation.
-     * @return array A flat map of command names => class names.
+     * @return string[] A flat map of command names => class names.
      */
     protected function resolveNames(array $input)
     {
@@ -213,7 +213,7 @@ class CommandCollection implements IteratorAggregate, Countable
      * Commands defined in the application will ovewrite commands with
      * the same name provided by CakePHP.
      *
-     * @return array An array of command names and their classes.
+     * @return string[] An array of command names and their classes.
      */
     public function autoDiscover()
     {

+ 1 - 1
src/Console/ConsoleOptionParser.php

@@ -1086,7 +1086,7 @@ class ConsoleOptionParser
      *
      * @param string $argument The argument to append
      * @param array $args The array of parsed args to append to.
-     * @return array Args
+     * @return string[] Args
      * @throws \Cake\Console\Exception\ConsoleException
      */
     protected function _parseArg($argument, $args)

+ 1 - 1
src/Core/Configure.php

@@ -264,7 +264,7 @@ class Configure
      * Use Configure::isConfigured() instead.
      *
      * @param string|null $name Engine name.
-     * @return array|bool Array of the configured Engine objects, bool for specific name.
+     * @return string[]|bool Array of the configured Engine objects, bool for specific name.
      */
     public static function configured($name = null)
     {

+ 1 - 1
src/Event/EventListenerInterface.php

@@ -38,7 +38,7 @@ interface EventListenerInterface
      *  }
      * ```
      *
-     * @return array associative array or event key names pointing to the function
+     * @return array Associative array or event key names pointing to the function
      * that should be called in the object when the respective event is fired
      */
     public function implementedEvents();

+ 3 - 0
tests/test_app/TestApp/Auth/TestAuthenticate.php

@@ -28,6 +28,9 @@ class TestAuthenticate extends BaseAuthenticate
 
     public $authenticationProvider;
 
+    /**
+     * @return array
+     */
     public function implementedEvents()
     {
         return [