Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix array doc blocks to be more precise where applicable. #12815

Merged
merged 1 commit into from Dec 14, 2018
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -949,7 +949,7 @@ protected function getShortOptionError($option)
* algorithm.
*
* @param string $needle Unknown item (either a subcommand name or an option for instance) trying to be used.
* @param array $haystack List of items available for the type $needle belongs to.
* @param string[] $haystack List of items available for the type $needle belongs to.
* @return string|null The closest name to the item submitted by the user.
*/
protected function findClosestItem($needle, $haystack)
@@ -184,7 +184,7 @@ protected function _checkDuplicate($name, $config)
/**
* Get the list of loaded objects.
*
* @return array List of object names.
* @return string[] List of object names.
*/
public function loaded()
{
@@ -205,7 +205,7 @@ public static function drop($config)
/**
* Returns an array containing the named configurations
*
* @return array Array of configurations.
* @return string[] Array of configurations.
*/
public static function configured()
{
@@ -299,7 +299,7 @@ public function sql(ValueBinder $generator = null)
* ```
*
* @param callable $visitor A function or callable to be executed for each part
* @param array $parts The query clauses to traverse
* @param string[] $parts The query clauses to traverse
* @return $this
*/
public function traverse(callable $visitor, array $parts = [])
@@ -201,7 +201,7 @@ public function getIndex($name);
/**
* Get the names of all the indexes in the table.
*
* @return array
* @return string[]
*/
public function indexes();

@@ -246,7 +246,7 @@ public function dropConstraint($name);
/**
* Get the names of all the constraints in the table.
*
* @return array
* @return string[]
*/
public function constraints();
}
@@ -840,7 +840,7 @@ public function isDirty($property = null)
/**
* Gets the dirty properties.
*
* @return array
* @return string[]
*/
public function getDirty()
{
@@ -52,7 +52,7 @@ public function name();
* - `comment` The comment for the column.
*
* @param string $name The name of the column
* @param array $attrs The attributes for the column.
* @param array|string $attrs The attributes for the column.
* @return $this
*/
public function addColumn($name, $attrs);
@@ -86,7 +86,7 @@ public function removeColumn($name);
/**
* Get the column names in the table.
*
* @return array
* @return string[]
*/
public function columns();

@@ -89,7 +89,7 @@ public function removeField($name)
/**
* Get the list of fields in the schema.
*
* @return array The list of field names.
* @return string[] The list of field names.
*/
public function fields()
{
@@ -143,7 +143,7 @@ public function has($alias)
/**
* Get the names of all the associations in the collection.
*
* @return array
* @return string[]
*/
public function keys()
{
@@ -110,7 +110,7 @@ protected function _getQuery($objects, $contain, $source)
* in the top level entities.
*
* @param \Cake\ORM\Table $source The table having the top level associations
* @param array $associations The name of the top level associations
* @param string[] $associations The name of the top level associations
* @return array
*/
protected function _getPropertyMap($source, $associations)
@@ -128,9 +128,9 @@ protected function _getPropertyMap($source, $associations)
* Injects the results of the eager loader query into the original list of
* entities.
*
* @param array|\Traversable $objects The original list of entities
* @param \Cake\Datasource\EntityInterface[]|\Traversable $objects The original list of entities
* @param \Cake\Collection\CollectionInterface|\Cake\Database\Query $results The loaded results
* @param array $associations The top level associations that were loaded
* @param string[] $associations The top level associations that were loaded
* @param \Cake\ORM\Table $source The table where the entities came from
* @return array
*/
@@ -141,6 +141,7 @@ protected function _injectResults($objects, $results, $associations, $source)
$primaryKey = (array)$source->getPrimaryKey();
$results = $results
->indexBy(function ($e) use ($primaryKey) {
/** @var \Cake\Datasource\EntityInterface $e */
return implode(';', $e->extract($primaryKey));
})
->toArray();
@@ -152,6 +153,7 @@ protected function _injectResults($objects, $results, $associations, $source)
continue;
}

/** @var \Cake\Datasource\EntityInterface $loaded */
$loaded = $results[$key];
foreach ($associations as $assoc) {
$property = $properties[$assoc];
@@ -163,7 +163,7 @@ public function commands()
* Return a list of subcommands for a given command
*
* @param string $commandName The command you want subcommands from.
* @return array
* @return string[]
* @throws \ReflectionException
*/
public function subCommands($commandName)
@@ -306,7 +306,7 @@ public static function addDefaultProvider($name, $object)
/**
* Get the list of default providers.
*
* @return array
* @return string[]
*/
public static function getDefaultProviders()
{
@@ -343,7 +343,7 @@ public function provider($name, $object = null)
/**
* Get the list of providers in this validator.
*
* @return array
* @return string[]
*/
public function providers()
{
@@ -76,7 +76,7 @@ public function isRequired($field);
/**
* Get the fieldnames of the top level object in this context.
*
* @return array A list of the field names in the context.
* @return string[] A list of the field names in the context.
*/
public function fieldNames();

@@ -934,7 +934,7 @@ public function renderLayout($content, $layout = null)
/**
* Returns a list of variables available in the current View context
*
* @return array Array of the set view variable names.
* @return string[] Array of the set view variable names.
*/
public function getVars()
{
@@ -197,7 +197,7 @@ public function exists($name)
/**
* Get the names of all the existing blocks.
*
* @return array An array containing the blocks.
* @return string[] An array containing the blocks.
*/
public function keys()
{
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.