From d02a46c47364b7f2dc80b84901876b5ea3b92ef8 Mon Sep 17 00:00:00 2001 From: divine <48183131+divine@users.noreply.github.com> Date: Sun, 6 Feb 2022 05:40:20 +0300 Subject: [PATCH 1/7] feat: initial laravel 9 compatibility --- .github/workflows/build-ci.yml | 23 +++++++---------------- CHANGELOG.md | 3 +++ README.md | 1 + composer.json | 20 +++++++++++--------- src/Query/Builder.php | 2 +- 5 files changed, 23 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build-ci.yml b/.github/workflows/build-ci.yml index 023def9be..b79741f77 100644 --- a/.github/workflows/build-ci.yml +++ b/.github/workflows/build-ci.yml @@ -35,19 +35,14 @@ jobs: strategy: matrix: include: - - { os: ubuntu-latest, php: 7.2, mongodb: 3.6, experimental: true } - - { os: ubuntu-latest, php: 7.2, mongodb: '4.0', experimental: true } - - { os: ubuntu-latest, php: 7.2, mongodb: 4.2, experimental: true } - - { os: ubuntu-latest, php: 7.2, mongodb: 4.4, experimental: true } - - { os: ubuntu-latest, php: 7.3, mongodb: 3.6, experimental: false } - - { os: ubuntu-latest, php: 7.3, mongodb: '4.0', experimental: false } - - { os: ubuntu-latest, php: 7.3, mongodb: 4.2, experimental: false } - - { os: ubuntu-latest, php: 7.3, mongodb: 4.4, experimental: false } - - { os: ubuntu-latest, php: 7.4, mongodb: 3.6, experimental: false } - - { os: ubuntu-latest, php: 7.4, mongodb: '4.0', experimental: false } - - { os: ubuntu-latest, php: 7.4, mongodb: 4.2, experimental: false } - - { os: ubuntu-latest, php: 7.4, mongodb: 4.4, experimental: false } + - { os: ubuntu-latest, php: 8.0, mongodb: '4.0', experimental: false } + - { os: ubuntu-latest, php: 8.0, mongodb: 4.2, experimental: false } - { os: ubuntu-latest, php: 8.0, mongodb: 4.4, experimental: false } + - { os: ubuntu-latest, php: 8.0, mongodb: '5.0', experimental: false } + - { os: ubuntu-latest, php: 8.1, mongodb: '4.0', experimental: false } + - { os: ubuntu-latest, php: 8.1, mongodb: 4.2, experimental: false } + - { os: ubuntu-latest, php: 8.1, mongodb: 4.4, experimental: false } + - { os: ubuntu-latest, php: 8.1, mongodb: '5.0', experimental: false } services: mongo: image: mongo:${{ matrix.mongodb }} @@ -78,22 +73,18 @@ jobs: env: DEBUG: ${{secrets.DEBUG}} - name: Download Composer cache dependencies from cache - if: (!startsWith(matrix.php, '7.2')) id: composer-cache run: echo "::set-output name=dir::$(composer config cache-files-dir)" - name: Cache Composer dependencies - if: (!startsWith(matrix.php, '7.2')) uses: actions/cache@v1 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ matrix.os }}-composer-${{ hashFiles('**/composer.json') }} restore-keys: ${{ matrix.os }}-composer- - name: Install dependencies - if: (!startsWith(matrix.php, '7.2')) run: | composer install --no-interaction - name: Run tests - if: (!startsWith(matrix.php, '7.2')) run: | ./vendor/bin/phpunit --coverage-clover coverage.xml env: diff --git a/CHANGELOG.md b/CHANGELOG.md index a43b9acd7..fe0f4dd87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Added +- Compatibility with Laravel 9.x [#](https://github.com/jenssegers/laravel-mongodb/pull/) by [@divine](https://github.com/divine). + ## [3.8.4] - 2021-05-27 ### Fixed diff --git a/README.md b/README.md index 189d45384..8ede587ec 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,7 @@ Make sure you have the MongoDB PHP driver installed. You can find installation i Laravel | Package | Maintained :---------|:---------------|:---------- + 9.x | 3.9.x | :white_check_mark: 8.x | 3.8.x | :white_check_mark: 7.x | 3.7.x | :x: 6.x | 3.6.x | :white_check_mark: diff --git a/composer.json b/composer.json index 5522a67a6..ddc7f7047 100644 --- a/composer.json +++ b/composer.json @@ -19,17 +19,17 @@ ], "license": "MIT", "require": { - "illuminate/support": "^8.0", - "illuminate/container": "^8.0", - "illuminate/database": "^8.0", - "illuminate/events": "^8.0", - "mongodb/mongodb": "^1.6" + "illuminate/support": "9.x-dev", + "illuminate/container": "9.x-dev", + "illuminate/database": "9.x-dev", + "illuminate/events": "9.x-dev", + "mongodb/mongodb": "^1.11" }, "require-dev": { - "phpunit/phpunit": "^9.0", - "orchestra/testbench": "^6.0", + "phpunit/phpunit": "^9.5.8", + "orchestra/testbench": "7.x-dev", "mockery/mockery": "^1.3.1", - "doctrine/dbal": "^2.6" + "doctrine/dbal": "^2.13.3|^3.1.4" }, "autoload": { "psr-4": { @@ -54,5 +54,7 @@ "Jenssegers\\Mongodb\\MongodbQueueServiceProvider" ] } - } + }, + "minimum-stability": "dev", + "prefer-stable": true } diff --git a/src/Query/Builder.php b/src/Query/Builder.php index de3265cb6..27f64d847 100644 --- a/src/Query/Builder.php +++ b/src/Query/Builder.php @@ -526,7 +526,7 @@ public function whereAll($column, array $values, $boolean = 'and', $not = false) /** * @inheritdoc */ - public function whereBetween($column, array $values, $boolean = 'and', $not = false) + public function whereBetween($column, iterable $values, $boolean = 'and', $not = false) { $type = 'between'; From 9c2b001d1b9a6075a86e89f0442ba2e66eddb3e0 Mon Sep 17 00:00:00 2001 From: divine <48183131+divine@users.noreply.github.com> Date: Wed, 9 Feb 2022 03:59:33 +0300 Subject: [PATCH 2/7] feat: use stable laravel release --- composer.json | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/composer.json b/composer.json index ddc7f7047..12a5b7eeb 100644 --- a/composer.json +++ b/composer.json @@ -19,15 +19,15 @@ ], "license": "MIT", "require": { - "illuminate/support": "9.x-dev", - "illuminate/container": "9.x-dev", - "illuminate/database": "9.x-dev", - "illuminate/events": "9.x-dev", + "illuminate/support": "^9.0", + "illuminate/container": "^9.0", + "illuminate/database": "^9.0", + "illuminate/events": "^9.0", "mongodb/mongodb": "^1.11" }, "require-dev": { "phpunit/phpunit": "^9.5.8", - "orchestra/testbench": "7.x-dev", + "orchestra/testbench": "^7.0", "mockery/mockery": "^1.3.1", "doctrine/dbal": "^2.13.3|^3.1.4" }, @@ -54,7 +54,5 @@ "Jenssegers\\Mongodb\\MongodbQueueServiceProvider" ] } - }, - "minimum-stability": "dev", - "prefer-stable": true + } } From 42c1ff29dae5e48d842998bd816c310733eb2f54 Mon Sep 17 00:00:00 2001 From: divine <48183131+divine@users.noreply.github.com> Date: Wed, 9 Feb 2022 04:04:43 +0300 Subject: [PATCH 3/7] feat: update php-cs-fixer & docker php version --- .github/workflows/build-ci.yml | 4 +-- .gitignore | 4 +-- .php_cs.dist => .php-cs-fixer.dist.php | 35 ++++++++++++++++++-------- CHANGELOG.md | 2 +- Dockerfile | 2 +- 5 files changed, 30 insertions(+), 17 deletions(-) rename .php_cs.dist => .php-cs-fixer.dist.php (89%) diff --git a/.github/workflows/build-ci.yml b/.github/workflows/build-ci.yml index b79741f77..2affc132c 100644 --- a/.github/workflows/build-ci.yml +++ b/.github/workflows/build-ci.yml @@ -10,11 +10,11 @@ jobs: php-cs-fixer: runs-on: ubuntu-latest env: - PHP_CS_FIXER_VERSION: v2.18.7 + PHP_CS_FIXER_VERSION: v3.6.0 strategy: matrix: php: - - '7.4' + - '8.0' steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.gitignore b/.gitignore index 691162d09..8a586f33b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,8 @@ .DS_Store .idea/ .phpunit.result.cache -/.php_cs -/.php_cs.cache +/.php-cs-fixer.php +/.php-cs-fixer.cache /vendor composer.lock composer.phar diff --git a/.php_cs.dist b/.php-cs-fixer.dist.php similarity index 89% rename from .php_cs.dist rename to .php-cs-fixer.dist.php index 81b74cffb..20c262e3a 100644 --- a/.php_cs.dist +++ b/.php-cs-fixer.dist.php @@ -25,7 +25,7 @@ ], ], 'cast_spaces' => true, - 'class_definition' => true, + 'class_definition' => false, 'clean_namespace' => true, 'compact_nullable_typehint' => true, 'concat_space' => [ @@ -46,16 +46,22 @@ 'heredoc_to_nowdoc' => true, 'include' => true, 'indentation_type' => true, + 'integer_literal_case' => true, + 'braces' => false, 'lowercase_cast' => true, - 'lowercase_constants' => true, + 'constant_case' => [ + 'case' => 'lower', + ], 'lowercase_keywords' => true, 'lowercase_static_reference' => true, 'magic_constant_casing' => true, 'magic_method_casing' => true, - 'method_argument_space' => true, + 'method_argument_space' => [ + 'on_multiline' => 'ignore', + ], 'class_attributes_separation' => [ 'elements' => [ - 'method', + 'method' => 'one', ], ], 'visibility_required' => [ @@ -74,7 +80,6 @@ 'tokens' => [ 'throw', 'use', - 'use_trait', 'extra', ], ], @@ -87,6 +92,7 @@ 'multiline_whitespace_before_semicolons' => true, 'no_short_bool_cast' => true, 'no_singleline_whitespace_before_semicolons' => true, + 'no_space_around_double_colon' => true, 'no_spaces_after_function_name' => true, 'no_spaces_around_offset' => [ 'positions' => [ @@ -120,7 +126,9 @@ 'phpdoc_summary' => true, 'phpdoc_trim' => true, 'phpdoc_no_alias_tag' => [ - 'type' => 'var', + 'replacements' => [ + 'type' => 'var', + ], ], 'phpdoc_types' => true, 'phpdoc_var_without_name' => true, @@ -130,7 +138,6 @@ 'no_mixed_echo_print' => [ 'use' => 'echo', ], - 'braces' => true, 'return_type_declaration' => [ 'space_before' => 'none', ], @@ -153,22 +160,28 @@ 'switch_case_space' => true, 'switch_continue_to_break' => true, 'ternary_operator_spaces' => true, - 'trailing_comma_in_multiline_array' => true, + 'trailing_comma_in_multiline' => [ + 'elements' => [ + 'arrays', + ], + ], 'trim_array_spaces' => true, 'unary_operator_spaces' => true, + 'types_spaces' => [ + 'space' => 'none', + ], 'line_ending' => true, 'whitespace_after_comma_in_array' => true, 'no_alias_functions' => true, 'no_unreachable_default_argument_value' => true, - 'psr4' => true, + 'psr_autoloading' => true, 'self_accessor' => true, ]; $finder = PhpCsFixer\Finder::create() ->in(__DIR__); -$config = new PhpCsFixer\Config(); -return $config +return (new PhpCsFixer\Config()) ->setRiskyAllowed(true) ->setRules($rules) ->setFinder($finder); diff --git a/CHANGELOG.md b/CHANGELOG.md index fe0f4dd87..291694453 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. ## [Unreleased] ### Added -- Compatibility with Laravel 9.x [#](https://github.com/jenssegers/laravel-mongodb/pull/) by [@divine](https://github.com/divine). +- Compatibility with Laravel 9.x [#2344](https://github.com/jenssegers/laravel-mongodb/pull/2344) by [@divine](https://github.com/divine). ## [3.8.4] - 2021-05-27 diff --git a/Dockerfile b/Dockerfile index e8b6b4d2e..aa4fdb95a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG PHP_VERSION=7.4 +ARG PHP_VERSION=8.0 ARG COMPOSER_VERSION=2.0 FROM composer:${COMPOSER_VERSION} From 40846ab4989dd4790c8a266c5f3e7010361265ed Mon Sep 17 00:00:00 2001 From: divine <48183131+divine@users.noreply.github.com> Date: Wed, 9 Feb 2022 04:22:39 +0300 Subject: [PATCH 4/7] fix: imrprove php-doc comments --- src/Auth/PasswordResetServiceProvider.php | 1 + src/Collection.php | 5 ++++- src/Connection.php | 16 ++++++++++++++++ src/Eloquent/Builder.php | 1 + src/Eloquent/EmbedsRelations.php | 2 ++ src/Eloquent/HybridRelations.php | 8 ++++++++ src/Eloquent/Model.php | 14 ++++++++++++++ src/Helpers/QueriesRelationships.php | 4 ++++ src/Query/Builder.php | 21 +++++++++++++++++++++ src/Queue/Failed/MongoFailedJobProvider.php | 4 ++++ src/Queue/MongoConnector.php | 3 +++ src/Queue/MongoJob.php | 1 + src/Queue/MongoQueue.php | 5 +++++ src/Relations/BelongsTo.php | 3 +++ src/Relations/BelongsToMany.php | 8 ++++++++ src/Relations/EmbedsMany.php | 12 ++++++++++++ src/Relations/EmbedsOne.php | 7 +++++++ src/Relations/EmbedsOneOrMany.php | 21 +++++++++++++++++++++ src/Relations/HasMany.php | 3 +++ src/Relations/HasOne.php | 3 +++ src/Relations/MorphTo.php | 2 ++ src/Schema/Blueprint.php | 13 ++++++++++++- src/Schema/Builder.php | 4 ++++ src/Validation/DatabasePresenceVerifier.php | 1 + tests/TestCase.php | 3 +++ tests/models/Birthday.php | 1 + tests/models/Book.php | 1 + tests/models/Item.php | 1 + tests/models/Soft.php | 1 + tests/models/User.php | 1 + 30 files changed, 168 insertions(+), 2 deletions(-) diff --git a/src/Auth/PasswordResetServiceProvider.php b/src/Auth/PasswordResetServiceProvider.php index 6e678d2ec..ba4e32e62 100644 --- a/src/Auth/PasswordResetServiceProvider.php +++ b/src/Auth/PasswordResetServiceProvider.php @@ -8,6 +8,7 @@ class PasswordResetServiceProvider extends BasePasswordResetServiceProvider { /** * Register the token repository implementation. + * * @return void */ protected function registerTokenRepository() diff --git a/src/Collection.php b/src/Collection.php index feaa6f55d..8acf6afe5 100644 --- a/src/Collection.php +++ b/src/Collection.php @@ -10,12 +10,14 @@ class Collection { /** * The connection instance. + * * @var Connection */ protected $connection; /** - * The MongoCollection instance.. + * The MongoCollection instance. + * * @var MongoCollection */ protected $collection; @@ -32,6 +34,7 @@ public function __construct(Connection $connection, MongoCollection $collection) /** * Handle dynamic method calls. + * * @param string $method * @param array $parameters * @return mixed diff --git a/src/Connection.php b/src/Connection.php index c8e7b6bad..57d9d3e37 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -11,18 +11,21 @@ class Connection extends BaseConnection { /** * The MongoDB database handler. + * * @var \MongoDB\Database */ protected $db; /** * The MongoDB connection handler. + * * @var \MongoDB\Client */ protected $connection; /** * Create a new database connection instance. + * * @param array $config */ public function __construct(array $config) @@ -53,6 +56,7 @@ public function __construct(array $config) /** * Begin a fluent query against a database collection. + * * @param string $collection * @return Query\Builder */ @@ -65,6 +69,7 @@ public function collection($collection) /** * Begin a fluent query against a database collection. + * * @param string $table * @param string|null $as * @return Query\Builder @@ -76,6 +81,7 @@ public function table($table, $as = null) /** * Get a MongoDB collection. + * * @param string $name * @return Collection */ @@ -94,6 +100,7 @@ public function getSchemaBuilder() /** * Get the MongoDB database object. + * * @return \MongoDB\Database */ public function getMongoDB() @@ -103,6 +110,7 @@ public function getMongoDB() /** * return MongoDB object. + * * @return \MongoDB\Client */ public function getMongoClient() @@ -120,6 +128,7 @@ public function getDatabaseName() /** * Get the name of the default database based on db config or try to detect it from dsn. + * * @param string $dsn * @param array $config * @return string @@ -140,6 +149,7 @@ protected function getDefaultDatabaseName($dsn, $config) /** * Create a new MongoDB connection. + * * @param string $dsn * @param array $config * @param array $options @@ -175,6 +185,7 @@ public function disconnect() /** * Determine if the given configuration array has a dsn string. + * * @param array $config * @return bool */ @@ -185,6 +196,7 @@ protected function hasDsnString(array $config) /** * Get the DSN string form configuration. + * * @param array $config * @return string */ @@ -195,6 +207,7 @@ protected function getDsnString(array $config) /** * Get the DSN string for a host / port configuration. + * * @param array $config * @return string */ @@ -218,6 +231,7 @@ protected function getHostDsn(array $config) /** * Create a DSN string from a configuration. + * * @param array $config * @return string */ @@ -270,6 +284,7 @@ protected function getDefaultSchemaGrammar() /** * Set database. + * * @param \MongoDB\Database $db */ public function setDatabase(\MongoDB\Database $db) @@ -279,6 +294,7 @@ public function setDatabase(\MongoDB\Database $db) /** * Dynamically pass methods to the connection. + * * @param string $method * @param array $parameters * @return mixed diff --git a/src/Eloquent/Builder.php b/src/Eloquent/Builder.php index f77e87c2d..398f3893b 100644 --- a/src/Eloquent/Builder.php +++ b/src/Eloquent/Builder.php @@ -13,6 +13,7 @@ class Builder extends EloquentBuilder /** * The methods that should be returned from query builder. + * * @var array */ protected $passthru = [ diff --git a/src/Eloquent/EmbedsRelations.php b/src/Eloquent/EmbedsRelations.php index f7cac6c53..9e5f77d92 100644 --- a/src/Eloquent/EmbedsRelations.php +++ b/src/Eloquent/EmbedsRelations.php @@ -10,6 +10,7 @@ trait EmbedsRelations { /** * Define an embedded one-to-many relationship. + * * @param string $related * @param string $localKey * @param string $foreignKey @@ -44,6 +45,7 @@ protected function embedsMany($related, $localKey = null, $foreignKey = null, $r /** * Define an embedded one-to-many relationship. + * * @param string $related * @param string $localKey * @param string $foreignKey diff --git a/src/Eloquent/HybridRelations.php b/src/Eloquent/HybridRelations.php index e6c5d3352..d3dcb9919 100644 --- a/src/Eloquent/HybridRelations.php +++ b/src/Eloquent/HybridRelations.php @@ -16,6 +16,7 @@ trait HybridRelations { /** * Define a one-to-one relationship. + * * @param string $related * @param string $foreignKey * @param string $localKey @@ -39,6 +40,7 @@ public function hasOne($related, $foreignKey = null, $localKey = null) /** * Define a polymorphic one-to-one relationship. + * * @param string $related * @param string $name * @param string $type @@ -64,6 +66,7 @@ public function morphOne($related, $name, $type = null, $id = null, $localKey = /** * Define a one-to-many relationship. + * * @param string $related * @param string $foreignKey * @param string $localKey @@ -87,6 +90,7 @@ public function hasMany($related, $foreignKey = null, $localKey = null) /** * Define a polymorphic one-to-many relationship. + * * @param string $related * @param string $name * @param string $type @@ -117,6 +121,7 @@ public function morphMany($related, $name, $type = null, $id = null, $localKey = /** * Define an inverse one-to-one or many relationship. + * * @param string $related * @param string $foreignKey * @param string $otherKey @@ -160,6 +165,7 @@ public function belongsTo($related, $foreignKey = null, $otherKey = null, $relat /** * Define a polymorphic, inverse one-to-one or many relationship. + * * @param string $name * @param string $type * @param string $id @@ -204,6 +210,7 @@ public function morphTo($name = null, $type = null, $id = null, $ownerKey = null /** * Define a many-to-many relationship. + * * @param string $related * @param string $collection * @param string $foreignKey @@ -277,6 +284,7 @@ public function belongsToMany( /** * Get the relationship name of the belongs to many. + * * @return string */ protected function guessBelongsToManyRelation() diff --git a/src/Eloquent/Model.php b/src/Eloquent/Model.php index 3553e02ab..226bc357d 100644 --- a/src/Eloquent/Model.php +++ b/src/Eloquent/Model.php @@ -21,30 +21,35 @@ abstract class Model extends BaseModel /** * The collection associated with the model. + * * @var string */ protected $collection; /** * The primary key for the model. + * * @var string */ protected $primaryKey = '_id'; /** * The primary key type. + * * @var string */ protected $keyType = 'string'; /** * The parent relation instance. + * * @var Relation */ protected $parentRelation; /** * Custom accessor for the model's id. + * * @param mixed $value * @return mixed */ @@ -269,6 +274,7 @@ public function originalIsEquivalent($key) /** * Remove one or more fields. + * * @param mixed $columns * @return int */ @@ -314,6 +320,7 @@ public function push() /** * Remove one or more values from an array. + * * @param string $column * @param mixed $values * @return mixed @@ -332,6 +339,7 @@ public function pull($column, $values) /** * Append one or more values to the underlying attribute value and sync with original. + * * @param string $column * @param array $values * @param bool $unique @@ -356,6 +364,7 @@ protected function pushAttributeValues($column, array $values, $unique = false) /** * Remove one or more values to the underlying attribute value and sync with original. + * * @param string $column * @param array $values */ @@ -388,6 +397,7 @@ public function getForeignKey() /** * Set the parent relation. + * * @param \Illuminate\Database\Eloquent\Relations\Relation $relation */ public function setParentRelation(Relation $relation) @@ -397,6 +407,7 @@ public function setParentRelation(Relation $relation) /** * Get the parent relation. + * * @return \Illuminate\Database\Eloquent\Relations\Relation */ public function getParentRelation() @@ -432,6 +443,7 @@ protected function removeTableFromKey($key) /** * Get the queueable relationships for the entity. + * * @return array */ public function getQueueableRelations() @@ -461,6 +473,7 @@ public function getQueueableRelations() /** * Get loaded relations for the instance without parent. + * * @return array */ protected function getRelationsWithoutParent() @@ -477,6 +490,7 @@ protected function getRelationsWithoutParent() /** * Checks if column exists on a table. As this is a document model, just return true. This also * prevents calls to non-existent function Grammar::compileColumnListing(). + * * @param string $key * @return bool */ diff --git a/src/Helpers/QueriesRelationships.php b/src/Helpers/QueriesRelationships.php index ee130ce79..1f7310b99 100644 --- a/src/Helpers/QueriesRelationships.php +++ b/src/Helpers/QueriesRelationships.php @@ -15,12 +15,14 @@ trait QueriesRelationships { /** * Add a relationship count / exists condition to the query. + * * @param Relation|string $relation * @param string $operator * @param int $count * @param string $boolean * @param Closure|null $callback * @return Builder|static + * @throws Exception */ public function has($relation, $operator = '>=', $count = 1, $boolean = 'and', Closure $callback = null) { @@ -72,6 +74,7 @@ protected function isAcrossConnections(Relation $relation) /** * Compare across databases. + * * @param Relation $relation * @param string $operator * @param int $count @@ -150,6 +153,7 @@ protected function getConstrainedRelatedIds($relations, $operator, $count) /** * Returns key we are constraining this parent model's query with. + * * @param Relation $relation * @return string * @throws Exception diff --git a/src/Query/Builder.php b/src/Query/Builder.php index 27f64d847..f83bce3e2 100644 --- a/src/Query/Builder.php +++ b/src/Query/Builder.php @@ -24,42 +24,49 @@ class Builder extends BaseBuilder { /** * The database collection. + * * @var \MongoDB\Collection */ protected $collection; /** * The column projections. + * * @var array */ public $projections; /** * The cursor timeout value. + * * @var int */ public $timeout; /** * The cursor hint value. + * * @var int */ public $hint; /** * Custom options to add to the query. + * * @var array */ public $options = []; /** * Indicate if we are executing a pagination query. + * * @var bool */ public $paginating = false; /** * All of the available clause operators. + * * @var array */ public $operators = [ @@ -107,6 +114,7 @@ class Builder extends BaseBuilder /** * Operator conversion. + * * @var array */ protected $conversion = [ @@ -131,6 +139,7 @@ public function __construct(Connection $connection, Processor $processor) /** * Set the projections. + * * @param array $columns * @return $this */ @@ -155,6 +164,7 @@ public function timeout($seconds) /** * Set the cursor hint. + * * @param mixed $index * @return $this */ @@ -205,6 +215,7 @@ public function cursor($columns = []) /** * Execute the query as a fresh "select" statement. + * * @param array $columns * @param bool $returnLazy * @return array|static[]|Collection|LazyCollection @@ -415,6 +426,7 @@ public function getFresh($columns = [], $returnLazy = false) /** * Generate the unique cache key for the current query. + * * @return string */ public function generateCacheKey() @@ -508,6 +520,7 @@ public function orderBy($column, $direction = 'asc') /** * Add a "where all" clause to the query. + * * @param string $column * @param array $values * @param string $boolean @@ -714,6 +727,7 @@ public function truncate(): bool /** * Get an array with the values of a given column. + * * @param string $column * @param string $key * @return array @@ -745,6 +759,7 @@ public function raw($expression = null) /** * Append one or more values to an array. + * * @param mixed $column * @param mixed $value * @param bool $unique @@ -771,6 +786,7 @@ public function push($column, $value = null, $unique = false) /** * Remove one or more values from an array. + * * @param mixed $column * @param mixed $value * @return int @@ -794,6 +810,7 @@ public function pull($column, $value = null) /** * Remove one or more fields. + * * @param mixed $columns * @return int */ @@ -824,6 +841,7 @@ public function newQuery() /** * Perform an update query. + * * @param array $query * @param array $options * @return int @@ -846,6 +864,7 @@ protected function performUpdate($query, array $options = []) /** * Convert a key to ObjectID if needed. + * * @param mixed $id * @return mixed */ @@ -883,6 +902,7 @@ public function where($column, $operator = null, $value = null, $boolean = 'and' /** * Compile the where array. + * * @return array */ protected function compileWheres() @@ -1216,6 +1236,7 @@ protected function compileWhereRaw(array $where) /** * Set custom options for the query. + * * @param array $options * @return $this */ diff --git a/src/Queue/Failed/MongoFailedJobProvider.php b/src/Queue/Failed/MongoFailedJobProvider.php index e130cbeab..1ac69d780 100644 --- a/src/Queue/Failed/MongoFailedJobProvider.php +++ b/src/Queue/Failed/MongoFailedJobProvider.php @@ -9,6 +9,7 @@ class MongoFailedJobProvider extends DatabaseFailedJobProvider { /** * Log a failed job into storage. + * * @param string $connection * @param string $queue * @param string $payload @@ -26,6 +27,7 @@ public function log($connection, $queue, $payload, $exception) /** * Get a list of all of the failed jobs. + * * @return object[] */ public function all() @@ -43,6 +45,7 @@ public function all() /** * Get a single failed job. + * * @param mixed $id * @return object */ @@ -61,6 +64,7 @@ public function find($id) /** * Delete a single failed job from storage. + * * @param mixed $id * @return bool */ diff --git a/src/Queue/MongoConnector.php b/src/Queue/MongoConnector.php index 91cea8c35..f453ba0a4 100644 --- a/src/Queue/MongoConnector.php +++ b/src/Queue/MongoConnector.php @@ -10,12 +10,14 @@ class MongoConnector implements ConnectorInterface { /** * Database connections. + * * @var \Illuminate\Database\ConnectionResolverInterface */ protected $connections; /** * Create a new connector instance. + * * @param \Illuminate\Database\ConnectionResolverInterface $connections */ public function __construct(ConnectionResolverInterface $connections) @@ -25,6 +27,7 @@ public function __construct(ConnectionResolverInterface $connections) /** * Establish a queue connection. + * * @param array $config * @return \Illuminate\Contracts\Queue\Queue */ diff --git a/src/Queue/MongoJob.php b/src/Queue/MongoJob.php index 336515f09..f1a61cf46 100644 --- a/src/Queue/MongoJob.php +++ b/src/Queue/MongoJob.php @@ -8,6 +8,7 @@ class MongoJob extends DatabaseJob { /** * Indicates if the job has been reserved. + * * @return bool */ public function isReserved() diff --git a/src/Queue/MongoQueue.php b/src/Queue/MongoQueue.php index f1568b4b4..2dde89bd7 100644 --- a/src/Queue/MongoQueue.php +++ b/src/Queue/MongoQueue.php @@ -11,12 +11,14 @@ class MongoQueue extends DatabaseQueue { /** * The expiration time of a job. + * * @var int|null */ protected $retryAfter = 60; /** * The connection name for the queue. + * * @var string */ protected $connectionName; @@ -56,6 +58,7 @@ public function pop($queue = null) * This race condition can result in random jobs being run more then * once. To solve this we use findOneAndUpdate to lock the next jobs * record while flagging it as reserved at the same time. + * * @param string|null $queue * @return \StdClass|null */ @@ -91,6 +94,7 @@ protected function getNextAvailableJobAndReserve($queue) /** * Release the jobs that have been reserved for too long. + * * @param string $queue * @return void */ @@ -111,6 +115,7 @@ protected function releaseJobsThatHaveBeenReservedTooLong($queue) /** * Release the given job ID from reservation. + * * @param string $id * @param int $attempts * @return void diff --git a/src/Relations/BelongsTo.php b/src/Relations/BelongsTo.php index b47e856fa..adaa13110 100644 --- a/src/Relations/BelongsTo.php +++ b/src/Relations/BelongsTo.php @@ -9,6 +9,7 @@ class BelongsTo extends \Illuminate\Database\Eloquent\Relations\BelongsTo { /** * Get the key for comparing against the parent key in "has" query. + * * @return string */ public function getHasCompareKey() @@ -52,6 +53,7 @@ public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, /** * Get the owner key with backwards compatible support. + * * @return string */ public function getOwnerKey() @@ -61,6 +63,7 @@ public function getOwnerKey() /** * Get the name of the "where in" method for eager loading. + * * @param \Illuminate\Database\Eloquent\Model $model * @param string $key * @return string diff --git a/src/Relations/BelongsToMany.php b/src/Relations/BelongsToMany.php index 915cc95e2..2352adc50 100644 --- a/src/Relations/BelongsToMany.php +++ b/src/Relations/BelongsToMany.php @@ -13,6 +13,7 @@ class BelongsToMany extends EloquentBelongsToMany { /** * Get the key for comparing against the parent key in "has" query. + * * @return string */ public function getHasCompareKey() @@ -38,6 +39,7 @@ protected function hydratePivotRelation(array $models) /** * Set the select clause for the relation query. + * * @param array $columns * @return array */ @@ -66,6 +68,7 @@ public function addConstraints() /** * Set the where clause for the relation query. + * * @return $this */ protected function setWhere() @@ -272,6 +275,7 @@ public function newPivotQuery() /** * Create a new query builder for the related model. + * * @return \Illuminate\Database\Query\Builder */ public function newRelatedQuery() @@ -281,6 +285,7 @@ public function newRelatedQuery() /** * Get the fully qualified foreign key for the relation. + * * @return string */ public function getForeignKey() @@ -307,6 +312,7 @@ public function getQualifiedRelatedPivotKeyName() /** * Format the sync list so that it is keyed by ID. (Legacy Support) * The original function has been renamed to formatRecordsList since Laravel 5.3. + * * @param array $records * @return array * @deprecated @@ -326,6 +332,7 @@ protected function formatSyncList(array $records) /** * Get the related key with backwards compatible support. + * * @return string */ public function getRelatedKey() @@ -335,6 +342,7 @@ public function getRelatedKey() /** * Get the name of the "where in" method for eager loading. + * * @param \Illuminate\Database\Eloquent\Model $model * @param string $key * @return string diff --git a/src/Relations/EmbedsMany.php b/src/Relations/EmbedsMany.php index d5d8e0d48..88a63d0b4 100644 --- a/src/Relations/EmbedsMany.php +++ b/src/Relations/EmbedsMany.php @@ -33,6 +33,7 @@ public function getResults() /** * Save a new model and attach it to the parent model. + * * @param Model $model * @return Model|bool */ @@ -63,6 +64,7 @@ public function performInsert(Model $model) /** * Save an existing model and attach it to the parent model. + * * @param Model $model * @return Model|bool */ @@ -94,6 +96,7 @@ public function performUpdate(Model $model) /** * Delete an existing model and detach it from the parent model. + * * @param Model $model * @return int */ @@ -120,6 +123,7 @@ public function performDelete(Model $model) /** * Associate the model instance to the given parent, without saving it to the database. + * * @param Model $model * @return Model */ @@ -134,6 +138,7 @@ public function associate(Model $model) /** * Dissociate the model instance from the given parent, without saving it to the database. + * * @param mixed $ids * @return int */ @@ -162,6 +167,7 @@ public function dissociate($ids = []) /** * Destroy the embedded models for the given IDs. + * * @param mixed $ids * @return int */ @@ -186,6 +192,7 @@ public function destroy($ids = []) /** * Delete all embedded models. + * * @return int */ public function delete() @@ -202,6 +209,7 @@ public function delete() /** * Destroy alias. + * * @param mixed $ids * @return int */ @@ -212,6 +220,7 @@ public function detach($ids = []) /** * Save alias. + * * @param Model $model * @return Model */ @@ -222,6 +231,7 @@ public function attach(Model $model) /** * Associate a new model instance to the given parent, without saving it to the database. + * * @param Model $model * @return Model */ @@ -242,6 +252,7 @@ protected function associateNew($model) /** * Associate an existing model instance to the given parent, without saving it to the database. + * * @param Model $model * @return Model */ @@ -332,6 +343,7 @@ public function __call($method, $parameters) /** * Get the name of the "where in" method for eager loading. + * * @param \Illuminate\Database\Eloquent\Model $model * @param string $key * @return string diff --git a/src/Relations/EmbedsOne.php b/src/Relations/EmbedsOne.php index b57a2231a..ba2a41dfc 100644 --- a/src/Relations/EmbedsOne.php +++ b/src/Relations/EmbedsOne.php @@ -32,6 +32,7 @@ public function getEager() /** * Save a new model and attach it to the parent model. + * * @param Model $model * @return Model|bool */ @@ -61,6 +62,7 @@ public function performInsert(Model $model) /** * Save an existing model and attach it to the parent model. + * * @param Model $model * @return Model|bool */ @@ -86,6 +88,7 @@ public function performUpdate(Model $model) /** * Delete an existing model and detach it from the parent model. + * * @return int */ public function performDelete() @@ -110,6 +113,7 @@ public function performDelete() /** * Attach the model to its parent. + * * @param Model $model * @return Model */ @@ -120,6 +124,7 @@ public function associate(Model $model) /** * Detach the model from its parent. + * * @return Model */ public function dissociate() @@ -129,6 +134,7 @@ public function dissociate() /** * Delete all embedded models. + * * @return int */ public function delete() @@ -138,6 +144,7 @@ public function delete() /** * Get the name of the "where in" method for eager loading. + * * @param \Illuminate\Database\Eloquent\Model $model * @param string $key * @return string diff --git a/src/Relations/EmbedsOneOrMany.php b/src/Relations/EmbedsOneOrMany.php index 5e1e9d58b..2e5215377 100644 --- a/src/Relations/EmbedsOneOrMany.php +++ b/src/Relations/EmbedsOneOrMany.php @@ -12,24 +12,28 @@ abstract class EmbedsOneOrMany extends Relation { /** * The local key of the parent model. + * * @var string */ protected $localKey; /** * The foreign key of the parent model. + * * @var string */ protected $foreignKey; /** * The "name" of the relationship. + * * @var string */ protected $relation; /** * Create a new embeds many relationship instance. + * * @param Builder $query * @param Model $parent * @param Model $related @@ -90,6 +94,7 @@ public function match(array $models, Collection $results, $relation) /** * Shorthand to get the results of the relationship. + * * @param array $columns * @return Collection */ @@ -100,6 +105,7 @@ public function get($columns = ['*']) /** * Get the number of embedded models. + * * @return int */ public function count() @@ -109,6 +115,7 @@ public function count() /** * Attach a model instance to the parent model. + * * @param Model $model * @return Model|bool */ @@ -121,6 +128,7 @@ public function save(Model $model) /** * Attach a collection of models to the parent instance. + * * @param Collection|array $models * @return Collection|array */ @@ -135,6 +143,7 @@ public function saveMany($models) /** * Create a new instance of the related model. + * * @param array $attributes * @return Model */ @@ -154,6 +163,7 @@ public function create(array $attributes = []) /** * Create an array of new instances of the related model. + * * @param array $records * @return array */ @@ -170,6 +180,7 @@ public function createMany(array $records) /** * Transform single ID, single Model or array of Models into an array of IDs. + * * @param mixed $ids * @return array */ @@ -224,6 +235,7 @@ protected function setEmbedded($records) /** * Get the foreign key value for the relation. + * * @param mixed $id * @return mixed */ @@ -239,6 +251,7 @@ protected function getForeignKeyValue($id) /** * Convert an array of records to a Collection. + * * @param array $records * @return Collection */ @@ -259,6 +272,7 @@ protected function toCollection(array $records = []) /** * Create a related model instanced. + * * @param array $attributes * @return Model */ @@ -287,6 +301,7 @@ protected function toModel($attributes = []) /** * Get the relation instance of the parent. + * * @return Relation */ protected function getParentRelation() @@ -316,6 +331,7 @@ public function getBaseQuery() /** * Check if this relation is nested in another relation. + * * @return bool */ protected function isNested() @@ -325,6 +341,7 @@ protected function isNested() /** * Get the fully qualified local key name. + * * @param string $glue * @return string */ @@ -351,6 +368,7 @@ public function getQualifiedParentKeyName() /** * Get the primary key value of the parent. + * * @return string */ protected function getParentKey() @@ -360,6 +378,7 @@ protected function getParentKey() /** * Return update values. + * * @param $array * @param string $prepend * @return array @@ -377,6 +396,7 @@ public static function getUpdateValues($array, $prepend = '') /** * Get the foreign key for the relationship. + * * @return string */ public function getQualifiedForeignKeyName() @@ -386,6 +406,7 @@ public function getQualifiedForeignKeyName() /** * Get the name of the "where in" method for eager loading. + * * @param \Illuminate\Database\Eloquent\Model $model * @param string $key * @return string diff --git a/src/Relations/HasMany.php b/src/Relations/HasMany.php index 933a87b54..3069b9b6a 100644 --- a/src/Relations/HasMany.php +++ b/src/Relations/HasMany.php @@ -10,6 +10,7 @@ class HasMany extends EloquentHasMany { /** * Get the plain foreign key. + * * @return string */ public function getForeignKeyName() @@ -19,6 +20,7 @@ public function getForeignKeyName() /** * Get the key for comparing against the parent key in "has" query. + * * @return string */ public function getHasCompareKey() @@ -38,6 +40,7 @@ public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, /** * Get the name of the "where in" method for eager loading. + * * @param \Illuminate\Database\Eloquent\Model $model * @param string $key * @return string diff --git a/src/Relations/HasOne.php b/src/Relations/HasOne.php index f2a5a9b33..77f97a0e2 100644 --- a/src/Relations/HasOne.php +++ b/src/Relations/HasOne.php @@ -10,6 +10,7 @@ class HasOne extends EloquentHasOne { /** * Get the key for comparing against the parent key in "has" query. + * * @return string */ public function getForeignKeyName() @@ -19,6 +20,7 @@ public function getForeignKeyName() /** * Get the key for comparing against the parent key in "has" query. + * * @return string */ public function getHasCompareKey() @@ -38,6 +40,7 @@ public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, /** * Get the name of the "where in" method for eager loading. + * * @param \Illuminate\Database\Eloquent\Model $model * @param string $key * @return string diff --git a/src/Relations/MorphTo.php b/src/Relations/MorphTo.php index 5938f9eeb..426595185 100644 --- a/src/Relations/MorphTo.php +++ b/src/Relations/MorphTo.php @@ -36,6 +36,7 @@ protected function getResultsByType($type) /** * Get the owner key with backwards compatible support. + * * @return string */ public function getOwnerKey() @@ -45,6 +46,7 @@ public function getOwnerKey() /** * Get the name of the "where in" method for eager loading. + * * @param \Illuminate\Database\Eloquent\Model $model * @param string $key * @return string diff --git a/src/Schema/Blueprint.php b/src/Schema/Blueprint.php index ad26b4ddb..557373cbc 100644 --- a/src/Schema/Blueprint.php +++ b/src/Schema/Blueprint.php @@ -8,6 +8,7 @@ class Blueprint extends \Illuminate\Database\Schema\Blueprint { /** * The MongoConnection object for this blueprint. + * * @var \Jenssegers\Mongodb\Connection */ protected $connection; @@ -15,11 +16,13 @@ class Blueprint extends \Illuminate\Database\Schema\Blueprint /** * The MongoCollection object for this blueprint. * @var \Jenssegers\Mongodb\Collection|\MongoDB\Collection + * */ protected $collection; /** * Fluent columns. + * * @var array */ protected $columns = []; @@ -167,6 +170,7 @@ public function unique($columns = null, $name = null, $algorithm = null, $option /** * Specify a non blocking index for the collection. + * * @param string|array $columns * @return Blueprint */ @@ -181,6 +185,7 @@ public function background($columns = null) /** * Specify a sparse index for the collection. + * * @param string|array $columns * @param array $options * @return Blueprint @@ -198,6 +203,7 @@ public function sparse($columns = null, $options = []) /** * Specify a geospatial index for the collection. + * * @param string|array $columns * @param string $index * @param array $options @@ -221,8 +227,9 @@ public function geospatial($columns = null, $index = '2d', $options = []) } /** - * Specify the number of seconds after wich a document should be considered expired based, + * Specify the number of seconds after which a document should be considered expired based, * on the given single-field index containing a date. + * * @param string|array $columns * @param int $seconds * @return Blueprint @@ -238,6 +245,7 @@ public function expire($columns, $seconds) /** * Indicate that the collection needs to be created. + * * @param array $options * @return void */ @@ -271,6 +279,7 @@ public function addColumn($type, $name, array $parameters = []) /** * Specify a sparse and unique index for the collection. + * * @param string|array $columns * @param array $options * @return Blueprint @@ -289,6 +298,7 @@ public function sparse_and_unique($columns = null, $options = []) /** * Allow fluent columns. + * * @param string|array $columns * @return string|array */ @@ -305,6 +315,7 @@ protected function fluent($columns = null) /** * Allows the use of unsupported schema methods. + * * @param $method * @param $args * @return Blueprint diff --git a/src/Schema/Builder.php b/src/Schema/Builder.php index 36aaf9be7..e681b3e41 100644 --- a/src/Schema/Builder.php +++ b/src/Schema/Builder.php @@ -24,6 +24,7 @@ public function hasColumns($table, array $columns) /** * Determine if the given collection exists. + * * @param string $name * @return bool */ @@ -50,6 +51,7 @@ public function hasTable($collection) /** * Modify a collection on the schema. + * * @param string $collection * @param Closure $callback * @return bool @@ -127,6 +129,7 @@ protected function createBlueprint($collection, Closure $callback = null) /** * Get collection. + * * @param string $name * @return bool|\MongoDB\Model\CollectionInfo */ @@ -145,6 +148,7 @@ public function getCollection($name) /** * Get all of the collections names for the database. + * * @return array */ protected function getAllCollections() diff --git a/src/Validation/DatabasePresenceVerifier.php b/src/Validation/DatabasePresenceVerifier.php index 6753db3d9..cb8703944 100644 --- a/src/Validation/DatabasePresenceVerifier.php +++ b/src/Validation/DatabasePresenceVerifier.php @@ -6,6 +6,7 @@ class DatabasePresenceVerifier extends \Illuminate\Validation\DatabasePresenceVe { /** * Count the number of objects in a collection having the given value. + * * @param string $collection * @param string $column * @param string $value diff --git a/tests/TestCase.php b/tests/TestCase.php index 20970656a..cf379a652 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -8,6 +8,7 @@ class TestCase extends Orchestra\Testbench\TestCase { /** * Get application providers. + * * @param \Illuminate\Foundation\Application $app * @return array */ @@ -22,6 +23,7 @@ protected function getApplicationProviders($app) /** * Get package providers. + * * @param \Illuminate\Foundation\Application $app * @return array */ @@ -37,6 +39,7 @@ protected function getPackageProviders($app) /** * Define environment setup. + * * @param Illuminate\Foundation\Application $app * @return void */ diff --git a/tests/models/Birthday.php b/tests/models/Birthday.php index c30ebb746..3e725e495 100644 --- a/tests/models/Birthday.php +++ b/tests/models/Birthday.php @@ -6,6 +6,7 @@ /** * Class Birthday. + * * @property string $name * @property string $birthday * @property string $day diff --git a/tests/models/Book.php b/tests/models/Book.php index 17100f0c6..e247abbfb 100644 --- a/tests/models/Book.php +++ b/tests/models/Book.php @@ -7,6 +7,7 @@ /** * Class Book. + * * @property string $title * @property string $author * @property array $chapters diff --git a/tests/models/Item.php b/tests/models/Item.php index 32d6ceb41..4a29aa05a 100644 --- a/tests/models/Item.php +++ b/tests/models/Item.php @@ -8,6 +8,7 @@ /** * Class Item. + * * @property \Carbon\Carbon $created_at */ class Item extends Eloquent diff --git a/tests/models/Soft.php b/tests/models/Soft.php index 6e8e37f36..c4571e6b0 100644 --- a/tests/models/Soft.php +++ b/tests/models/Soft.php @@ -7,6 +7,7 @@ /** * Class Soft. + * * @property \Carbon\Carbon $deleted_at */ class Soft extends Eloquent diff --git a/tests/models/User.php b/tests/models/User.php index 359f6d9fa..ff96b89e4 100644 --- a/tests/models/User.php +++ b/tests/models/User.php @@ -12,6 +12,7 @@ /** * Class User. + * * @property string $_id * @property string $name * @property string $email From 8b4c6dc5b61c41d86848122ec0e2922a8fb6bc22 Mon Sep 17 00:00:00 2001 From: divine <48183131+divine@users.noreply.github.com> Date: Wed, 9 Feb 2022 04:26:20 +0300 Subject: [PATCH 5/7] fix: apply php-cs-fixer results --- src/Schema/Blueprint.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Schema/Blueprint.php b/src/Schema/Blueprint.php index 557373cbc..7e7fb6786 100644 --- a/src/Schema/Blueprint.php +++ b/src/Schema/Blueprint.php @@ -15,8 +15,8 @@ class Blueprint extends \Illuminate\Database\Schema\Blueprint /** * The MongoCollection object for this blueprint. - * @var \Jenssegers\Mongodb\Collection|\MongoDB\Collection * + * @var \Jenssegers\Mongodb\Collection|\MongoDB\Collection */ protected $collection; From 20b9d0e6ea7bb46280e75c415bf88ebdca279700 Mon Sep 17 00:00:00 2001 From: divine <48183131+divine@users.noreply.github.com> Date: Wed, 9 Feb 2022 04:30:38 +0300 Subject: [PATCH 6/7] fix: small php-doc comment --- src/Validation/DatabasePresenceVerifier.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Validation/DatabasePresenceVerifier.php b/src/Validation/DatabasePresenceVerifier.php index cb8703944..9a969bb74 100644 --- a/src/Validation/DatabasePresenceVerifier.php +++ b/src/Validation/DatabasePresenceVerifier.php @@ -32,6 +32,7 @@ public function getCount($collection, $column, $value, $excludeId = null, $idCol /** * Count the number of objects in a collection with the given values. + * * @param string $collection * @param string $column * @param array $values From b6a76f9c453a275b0af7a7fbfa0e0e7a1264b933 Mon Sep 17 00:00:00 2001 From: divine <48183131+divine@users.noreply.github.com> Date: Wed, 9 Feb 2022 05:03:48 +0300 Subject: [PATCH 7/7] fix: apply php-cs-fixer result --- src/Validation/DatabasePresenceVerifier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Validation/DatabasePresenceVerifier.php b/src/Validation/DatabasePresenceVerifier.php index 9a969bb74..6c38a04b2 100644 --- a/src/Validation/DatabasePresenceVerifier.php +++ b/src/Validation/DatabasePresenceVerifier.php @@ -32,7 +32,7 @@ public function getCount($collection, $column, $value, $excludeId = null, $idCol /** * Count the number of objects in a collection with the given values. - * + * * @param string $collection * @param string $column * @param array $values