Skip to content

Commit

Permalink
[8.x] Specify more concrete data types inside of arrays in PHPDoc (#3…
Browse files Browse the repository at this point in the history
…4786)

* Specify more concrete data types in arrays

* Fix types
  • Loading branch information
antonkomarev committed Oct 12, 2020
1 parent b00445e commit 9c04734
Show file tree
Hide file tree
Showing 39 changed files with 60 additions and 60 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Collections/Traits/EnumeratesValues.php
Expand Up @@ -44,7 +44,7 @@ trait EnumeratesValues
/**
* The methods that can be proxied.
*
* @var array
* @var string[]
*/
protected static $proxies = [
'average',
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Console/GeneratorCommand.php
Expand Up @@ -25,7 +25,7 @@ abstract class GeneratorCommand extends Command
/**
* Reserved names that cannot be used for generation.
*
* @var array
* @var string[]
*/
protected $reservedNames = [
'__halt_compiler',
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Eloquent/Builder.php
Expand Up @@ -70,7 +70,7 @@ class Builder
/**
* The methods that should be returned from query builder.
*
* @var array
* @var string[]
*/
protected $passthru = [
'insert', 'insertOrIgnore', 'insertGetId', 'insertUsing', 'getBindings', 'toSql', 'dump', 'dd',
Expand Down
Expand Up @@ -9,14 +9,14 @@ trait GuardsAttributes
/**
* The attributes that are mass assignable.
*
* @var array
* @var string[]
*/
protected $fillable = [];

/**
* The attributes that aren't mass assignable.
*
* @var array|bool
* @var string[]|bool
*/
protected $guarded = ['*'];

Expand Down
Expand Up @@ -58,7 +58,7 @@ trait HasAttributes
/**
* The built-in, primitive cast types supported by Eloquent.
*
* @var array
* @var string[]
*/
protected static $primitiveCastTypes = [
'array',
Expand Down
Expand Up @@ -39,7 +39,7 @@ trait HasRelationships
/**
* The many to many relationship methods.
*
* @var array
* @var string[]
*/
public static $manyMethods = [
'belongsToMany', 'morphToMany', 'morphedByMany',
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Eloquent/SoftDeletingScope.php
Expand Up @@ -7,7 +7,7 @@ class SoftDeletingScope implements Scope
/**
* All of the extensions to be added to the builder.
*
* @var array
* @var string[]
*/
protected $extensions = ['Restore', 'WithTrashed', 'WithoutTrashed', 'OnlyTrashed'];

Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Query/Builder.php
Expand Up @@ -182,7 +182,7 @@ class Builder
/**
* All of the available clause operators.
*
* @var array
* @var string[]
*/
public $operators = [
'=', '<', '>', '<=', '>=', '<>', '!=', '<=>',
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Query/Grammars/Grammar.php
Expand Up @@ -21,7 +21,7 @@ class Grammar extends BaseGrammar
/**
* The components that make up a select clause.
*
* @var array
* @var string[]
*/
protected $selectComponents = [
'aggregate',
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Query/Grammars/MySqlGrammar.php
Expand Up @@ -10,7 +10,7 @@ class MySqlGrammar extends Grammar
/**
* The grammar specific operators.
*
* @var array
* @var string[]
*/
protected $operators = ['sounds like'];

Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Query/Grammars/PostgresGrammar.php
Expand Up @@ -11,7 +11,7 @@ class PostgresGrammar extends Grammar
/**
* All of the available clause operators.
*
* @var array
* @var string[]
*/
protected $operators = [
'=', '<', '>', '<=', '>=', '<>', '!=',
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php
Expand Up @@ -11,7 +11,7 @@ class SQLiteGrammar extends Grammar
/**
* All of the available clause operators.
*
* @var array
* @var string[]
*/
protected $operators = [
'=', '<', '>', '<=', '>=', '<>', '!=',
Expand Down
Expand Up @@ -11,7 +11,7 @@ class SqlServerGrammar extends Grammar
/**
* All of the available clause operators.
*
* @var array
* @var string[]
*/
protected $operators = [
'=', '<', '>', '<=', '>=', '!<', '!>', '<>', '!=',
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
Expand Up @@ -12,7 +12,7 @@ class MySqlGrammar extends Grammar
/**
* The possible column modifiers.
*
* @var array
* @var string[]
*/
protected $modifiers = [
'Unsigned', 'Charset', 'Collate', 'VirtualAs', 'StoredAs', 'Nullable',
Expand All @@ -22,7 +22,7 @@ class MySqlGrammar extends Grammar
/**
* The possible column serials.
*
* @var array
* @var string[]
*/
protected $serials = ['bigInteger', 'integer', 'mediumInteger', 'smallInteger', 'tinyInteger'];

Expand Down
6 changes: 3 additions & 3 deletions src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php
Expand Up @@ -17,21 +17,21 @@ class PostgresGrammar extends Grammar
/**
* The possible column modifiers.
*
* @var array
* @var string[]
*/
protected $modifiers = ['Collate', 'Increment', 'Nullable', 'Default', 'VirtualAs', 'StoredAs'];

/**
* The columns available as serials.
*
* @var array
* @var string[]
*/
protected $serials = ['bigInteger', 'integer', 'mediumInteger', 'smallInteger', 'tinyInteger'];

/**
* The commands to be executed outside of create or alter command.
*
* @var array
* @var string[]
*/
protected $fluentCommands = ['Comment'];

Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php
Expand Up @@ -14,14 +14,14 @@ class SQLiteGrammar extends Grammar
/**
* The possible column modifiers.
*
* @var array
* @var string[]
*/
protected $modifiers = ['VirtualAs', 'StoredAs', 'Nullable', 'Default', 'Increment'];

/**
* The columns available as serials.
*
* @var array
* @var string[]
*/
protected $serials = ['bigInteger', 'integer', 'mediumInteger', 'smallInteger', 'tinyInteger'];

Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php
Expand Up @@ -17,14 +17,14 @@ class SqlServerGrammar extends Grammar
/**
* The possible column modifiers.
*
* @var array
* @var string[]
*/
protected $modifiers = ['Increment', 'Collate', 'Nullable', 'Default', 'Persisted'];

/**
* The columns available as serials.
*
* @var array
* @var string[]
*/
protected $serials = ['tinyInteger', 'smallInteger', 'mediumInteger', 'integer', 'bigInteger'];

Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Application.php
Expand Up @@ -150,7 +150,7 @@ class Application extends Container implements ApplicationContract, CachesConfig
/**
* The prefixes of absolute cache paths for use during normalization.
*
* @var array
* @var string[]
*/
protected $absoluteCachePathPrefixes = ['/', '\\'];

Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Console/Kernel.php
Expand Up @@ -57,7 +57,7 @@ class Kernel implements KernelContract
/**
* The bootstrap classes for the application.
*
* @var array
* @var string[]
*/
protected $bootstrappers = [
\Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables::class,
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Foundation/Console/RouteListCommand.php
Expand Up @@ -36,14 +36,14 @@ class RouteListCommand extends Command
/**
* The table headers for the command.
*
* @var array
* @var string[]
*/
protected $headers = ['Domain', 'Method', 'URI', 'Name', 'Action', 'Middleware'];

/**
* The columns to display when using the "compact" flag.
*
* @var array
* @var string[]
*/
protected $compactColumns = ['method', 'uri', 'action'];

Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Foundation/Exceptions/Handler.php
Expand Up @@ -80,7 +80,7 @@ class Handler implements ExceptionHandlerContract
/**
* A list of the internal exception types that should not be reported.
*
* @var array
* @var string[]
*/
protected $internalDontReport = [
AuthenticationException::class,
Expand All @@ -96,7 +96,7 @@ class Handler implements ExceptionHandlerContract
/**
* A list of the inputs that are never flashed for validation exceptions.
*
* @var array
* @var string[]
*/
protected $dontFlash = [
'password',
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Foundation/Http/Kernel.php
Expand Up @@ -31,7 +31,7 @@ class Kernel implements KernelContract
/**
* The bootstrap classes for the application.
*
* @var array
* @var string[]
*/
protected $bootstrappers = [
\Illuminate\Foundation\Bootstrap\LoadEnvironmentVariables::class,
Expand Down Expand Up @@ -68,7 +68,7 @@ class Kernel implements KernelContract
*
* Forces non-global middleware to always be in the given order.
*
* @var array
* @var string[]
*/
protected $middlewarePriority = [
\Illuminate\Cookie\Middleware\EncryptCookies::class,
Expand Down
Expand Up @@ -11,7 +11,7 @@ class ConsoleSupportServiceProvider extends AggregateServiceProvider implements
/**
* The provider class names.
*
* @var array
* @var string[]
*/
protected $providers = [
ArtisanServiceProvider::class,
Expand Down
Expand Up @@ -12,7 +12,7 @@ class FoundationServiceProvider extends AggregateServiceProvider
/**
* The provider class names.
*
* @var array
* @var string[]
*/
protected $providers = [
FormRequestServiceProvider::class,
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Queue/Console/ListFailedCommand.php
Expand Up @@ -24,7 +24,7 @@ class ListFailedCommand extends Command
/**
* The table headers for the command.
*
* @var array
* @var string[]
*/
protected $headers = ['ID', 'Connection', 'Queue', 'Class', 'Failed At'];

Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Routing/ResourceRegistrar.php
Expand Up @@ -16,7 +16,7 @@ class ResourceRegistrar
/**
* The default actions for a resourceful controller.
*
* @var array
* @var string[]
*/
protected $resourceDefaults = ['index', 'create', 'store', 'show', 'edit', 'update', 'destroy'];

Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Routing/RouteRegistrar.php
Expand Up @@ -42,7 +42,7 @@ class RouteRegistrar
/**
* The methods to dynamically pass through to the router.
*
* @var array
* @var string[]
*/
protected $passthru = [
'get', 'post', 'put', 'patch', 'delete', 'options', 'any',
Expand All @@ -51,7 +51,7 @@ class RouteRegistrar
/**
* The attributes that can be set through this class.
*
* @var array
* @var string[]
*/
protected $allowedAttributes = [
'as', 'domain', 'middleware', 'name', 'namespace', 'prefix', 'where',
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Routing/Router.php
Expand Up @@ -115,7 +115,7 @@ class Router implements BindingRegistrar, RegistrarContract
/**
* All of the verbs supported by the router.
*
* @var array
* @var string[]
*/
public static $verbs = ['GET', 'HEAD', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'];

Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Support/Pluralizer.php
Expand Up @@ -12,7 +12,7 @@ class Pluralizer
/**
* Uncountable word forms.
*
* @var array
* @var string[]
*/
public static $uncountable = [
'audio',
Expand Down
12 changes: 6 additions & 6 deletions src/Illuminate/Validation/Validator.php
Expand Up @@ -163,7 +163,7 @@ class Validator implements ValidatorContract
/**
* The validation rules that may be applied to files.
*
* @var array
* @var string[]
*/
protected $fileRules = [
'Between',
Expand All @@ -180,7 +180,7 @@ class Validator implements ValidatorContract
/**
* The validation rules that imply the field is required.
*
* @var array
* @var string[]
*/
protected $implicitRules = [
'Accepted',
Expand All @@ -198,7 +198,7 @@ class Validator implements ValidatorContract
/**
* The validation rules which depend on other fields as parameters.
*
* @var array
* @var string[]
*/
protected $dependentRules = [
'After',
Expand Down Expand Up @@ -227,21 +227,21 @@ class Validator implements ValidatorContract
/**
* The validation rules that can exclude an attribute.
*
* @var array
* @var string[]
*/
protected $excludeRules = ['ExcludeIf', 'ExcludeUnless', 'ExcludeWithout'];

/**
* The size related validation rules.
*
* @var array
* @var string[]
*/
protected $sizeRules = ['Size', 'Between', 'Min', 'Max', 'Gt', 'Lt', 'Gte', 'Lte'];

/**
* The numeric related validation rules.
*
* @var array
* @var string[]
*/
protected $numericRules = ['Numeric', 'Integer'];

Expand Down

0 comments on commit 9c04734

Please sign in to comment.