Skip to content

Commit ed33e0b

Browse files
committed
Make all Operation classes final
1 parent 701b39d commit ed33e0b

38 files changed

+38
-38
lines changed

src/Operation/Aggregate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
* @see \MongoDB\Collection::aggregate()
5050
* @see https://mongodb.com/docs/manual/reference/command/aggregate/
5151
*/
52-
class Aggregate implements Executable, Explainable
52+
final class Aggregate implements Executable, Explainable
5353
{
5454
private bool $isWrite;
5555

src/Operation/BulkWrite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
*
4747
* @see \MongoDB\Collection::bulkWrite()
4848
*/
49-
class BulkWrite implements Executable
49+
final class BulkWrite implements Executable
5050
{
5151
public const DELETE_MANY = 'deleteMany';
5252
public const DELETE_ONE = 'deleteOne';

src/Operation/Count.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* @see \MongoDB\Collection::count()
4242
* @see https://mongodb.com/docs/manual/reference/command/count/
4343
*/
44-
class Count implements Executable, Explainable
44+
final class Count implements Executable, Explainable
4545
{
4646
/**
4747
* Constructs a count command.

src/Operation/CountDocuments.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* @see \MongoDB\Collection::countDocuments()
3838
* @see https://github.com/mongodb/specifications/blob/master/source/crud/crud.rst#countdocuments
3939
*/
40-
class CountDocuments implements Executable
40+
final class CountDocuments implements Executable
4141
{
4242
private array $aggregateOptions;
4343

src/Operation/CreateCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* @see \MongoDB\Database::createCollection()
4242
* @see https://mongodb.com/docs/manual/reference/command/create/
4343
*/
44-
class CreateCollection implements Executable
44+
final class CreateCollection implements Executable
4545
{
4646
public const USE_POWER_OF_2_SIZES = 1;
4747
public const NO_PADDING = 2;

src/Operation/CreateIndexes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
* @see \MongoDB\Collection::createIndexes()
4242
* @see https://mongodb.com/docs/manual/reference/command/createIndexes/
4343
*/
44-
class CreateIndexes implements Executable
44+
final class CreateIndexes implements Executable
4545
{
4646
private const WIRE_VERSION_FOR_COMMIT_QUORUM = 9;
4747

src/Operation/CreateSearchIndexes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* @see \MongoDB\Collection::createSearchIndexes()
3838
* @see https://mongodb.com/docs/manual/reference/command/createSearchIndexes/
3939
*/
40-
class CreateSearchIndexes implements Executable
40+
final class CreateSearchIndexes implements Executable
4141
{
4242
private array $indexes = [];
4343

src/Operation/DatabaseCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
*
3333
* @see \MongoDB\Database::command()
3434
*/
35-
class DatabaseCommand implements Executable
35+
final class DatabaseCommand implements Executable
3636
{
3737
private Command $command;
3838

src/Operation/DeleteMany.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* @see \MongoDB\Collection::deleteOne()
3030
* @see https://mongodb.com/docs/manual/reference/command/delete/
3131
*/
32-
class DeleteMany implements Executable, Explainable
32+
final class DeleteMany implements Executable, Explainable
3333
{
3434
private Delete $delete;
3535

src/Operation/DeleteOne.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* @see \MongoDB\Collection::deleteOne()
3030
* @see https://mongodb.com/docs/manual/reference/command/delete/
3131
*/
32-
class DeleteOne implements Executable, Explainable
32+
final class DeleteOne implements Executable, Explainable
3333
{
3434
private Delete $delete;
3535

src/Operation/Distinct.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
* @see \MongoDB\Collection::distinct()
4141
* @see https://mongodb.com/docs/manual/reference/command/distinct/
4242
*/
43-
class Distinct implements Executable, Explainable
43+
final class Distinct implements Executable, Explainable
4444
{
4545
/**
4646
* Constructs a distinct command.

src/Operation/DropCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
* @see \MongoDB\Database::dropCollection()
3737
* @see https://mongodb.com/docs/manual/reference/command/drop/
3838
*/
39-
class DropCollection implements Executable
39+
final class DropCollection implements Executable
4040
{
4141
private const ERROR_CODE_NAMESPACE_NOT_FOUND = 26;
4242

src/Operation/DropDatabase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* @see \MongoDB\Database::drop()
3535
* @see https://mongodb.com/docs/manual/reference/command/dropDatabase/
3636
*/
37-
class DropDatabase implements Executable
37+
final class DropDatabase implements Executable
3838
{
3939
/**
4040
* Constructs a dropDatabase command.

src/Operation/DropIndexes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* @see \MongoDB\Collection::dropIndexes()
3636
* @see https://mongodb.com/docs/manual/reference/command/dropIndexes/
3737
*/
38-
class DropIndexes implements Executable
38+
final class DropIndexes implements Executable
3939
{
4040
/**
4141
* Constructs a dropIndexes command.

src/Operation/DropSearchIndex.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* @see \MongoDB\Collection::dropSearchIndexes()
3131
* @see https://mongodb.com/docs/manual/reference/command/dropSearchIndexes/
3232
*/
33-
class DropSearchIndex implements Executable
33+
final class DropSearchIndex implements Executable
3434
{
3535
private const ERROR_CODE_NAMESPACE_NOT_FOUND = 26;
3636

src/Operation/EstimatedDocumentCount.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* @see \MongoDB\Collection::estimatedDocumentCount()
3636
* @see https://mongodb.com/docs/manual/reference/command/count/
3737
*/
38-
class EstimatedDocumentCount implements Executable, Explainable
38+
final class EstimatedDocumentCount implements Executable, Explainable
3939
{
4040
private array $options;
4141

src/Operation/Explain.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* @see \MongoDB\Collection::explain()
3636
* @see https://mongodb.com/docs/manual/reference/command/explain/
3737
*/
38-
class Explain implements Executable
38+
final class Explain implements Executable
3939
{
4040
public const VERBOSITY_ALL_PLANS = 'allPlansExecution';
4141
public const VERBOSITY_EXEC_STATS = 'executionStats';

src/Operation/Find.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
* @see https://mongodb.com/docs/manual/tutorial/query-documents/
4949
* @see https://mongodb.com/docs/manual/reference/operator/query-modifier/
5050
*/
51-
class Find implements Executable, Explainable
51+
final class Find implements Executable, Explainable
5252
{
5353
public const NON_TAILABLE = 1;
5454
public const TAILABLE = 2;

src/Operation/FindOne.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* @see https://mongodb.com/docs/manual/tutorial/query-documents/
3232
* @see https://mongodb.com/docs/manual/reference/operator/query-modifier/
3333
*/
34-
class FindOne implements Executable, Explainable
34+
final class FindOne implements Executable, Explainable
3535
{
3636
private Find $find;
3737

src/Operation/FindOneAndDelete.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* @see \MongoDB\Collection::findOneAndDelete()
3131
* @see https://mongodb.com/docs/manual/reference/command/findAndModify/
3232
*/
33-
class FindOneAndDelete implements Executable, Explainable
33+
final class FindOneAndDelete implements Executable, Explainable
3434
{
3535
private FindAndModify $findAndModify;
3636

src/Operation/FindOneAndReplace.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* @see \MongoDB\Collection::findOneAndReplace()
3636
* @see https://mongodb.com/docs/manual/reference/command/findAndModify/
3737
*/
38-
class FindOneAndReplace implements Executable, Explainable
38+
final class FindOneAndReplace implements Executable, Explainable
3939
{
4040
public const RETURN_DOCUMENT_BEFORE = 1;
4141
public const RETURN_DOCUMENT_AFTER = 2;

src/Operation/FindOneAndUpdate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* @see \MongoDB\Collection::findOneAndUpdate()
3535
* @see https://mongodb.com/docs/manual/reference/command/findAndModify/
3636
*/
37-
class FindOneAndUpdate implements Executable, Explainable
37+
final class FindOneAndUpdate implements Executable, Explainable
3838
{
3939
public const RETURN_DOCUMENT_BEFORE = 1;
4040
public const RETURN_DOCUMENT_AFTER = 2;

src/Operation/InsertMany.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* @see \MongoDB\Collection::insertMany()
3939
* @see https://mongodb.com/docs/manual/reference/command/insert/
4040
*/
41-
class InsertMany implements Executable
41+
final class InsertMany implements Executable
4242
{
4343
/** @var list<object|array> */
4444
private array $documents;

src/Operation/InsertOne.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
* @see \MongoDB\Collection::insertOne()
3737
* @see https://mongodb.com/docs/manual/reference/command/insert/
3838
*/
39-
class InsertOne implements Executable
39+
final class InsertOne implements Executable
4040
{
4141
private array|object $document;
4242

src/Operation/ListCollectionNames.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* @see \MongoDB\Database::listCollectionNames()
3131
* @see https://mongodb.com/docs/manual/reference/command/listCollections/
3232
*/
33-
class ListCollectionNames implements Executable
33+
final class ListCollectionNames implements Executable
3434
{
3535
private ListCollectionsCommand $listCollections;
3636

src/Operation/ListCollections.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* @see \MongoDB\Database::listCollections()
3131
* @see https://mongodb.com/docs/manual/reference/command/listCollections/
3232
*/
33-
class ListCollections implements Executable
33+
final class ListCollections implements Executable
3434
{
3535
private ListCollectionsCommand $listCollections;
3636

src/Operation/ListDatabaseNames.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* @see \MongoDB\Client::listDatabaseNames()
3434
* @see https://mongodb.com/docs/manual/reference/command/listDatabases/#mongodb-dbcommand-dbcmd.listDatabases
3535
*/
36-
class ListDatabaseNames implements Executable
36+
final class ListDatabaseNames implements Executable
3737
{
3838
private ListDatabasesCommand $listDatabases;
3939

src/Operation/ListDatabases.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* @see \MongoDB\Client::listDatabases()
3232
* @see https://mongodb.com/docs/manual/reference/command/listDatabases/#mongodb-dbcommand-dbcmd.listDatabases`
3333
*/
34-
class ListDatabases implements Executable
34+
final class ListDatabases implements Executable
3535
{
3636
private ListDatabasesCommand $listDatabases;
3737

src/Operation/ListIndexes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
* @see \MongoDB\Collection::listIndexes()
3737
* @see https://mongodb.com/docs/manual/reference/command/listIndexes/
3838
*/
39-
class ListIndexes implements Executable
39+
final class ListIndexes implements Executable
4040
{
4141
private const ERROR_CODE_DATABASE_NOT_FOUND = 60;
4242
private const ERROR_CODE_NAMESPACE_NOT_FOUND = 26;

src/Operation/ListSearchIndexes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* @see \MongoDB\Collection::listSearchIndexes()
3636
* @see https://mongodb.com/docs/manual/reference/command/listSearchIndexes/
3737
*/
38-
class ListSearchIndexes implements Executable
38+
final class ListSearchIndexes implements Executable
3939
{
4040
private array $listSearchIndexesOptions;
4141
private array $aggregateOptions;

src/Operation/MapReduce.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
* @see https://mongodb.com/docs/manual/reference/command/mapReduce/
5555
* @psalm-import-type MapReduceCallable from MapReduceResult
5656
*/
57-
class MapReduce implements Executable
57+
final class MapReduce implements Executable
5858
{
5959
private array|object|string $out;
6060

src/Operation/ModifyCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* @see \MongoDB\Database::modifyCollection()
3434
* @see https://mongodb.com/docs/manual/reference/command/collMod/
3535
*/
36-
class ModifyCollection implements Executable
36+
final class ModifyCollection implements Executable
3737
{
3838
/**
3939
* Constructs a collMod command.

src/Operation/RenameCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
* @see \MongoDB\Database::renameCollection()
3737
* @see https://mongodb.com/docs/manual/reference/command/renameCollection/
3838
*/
39-
class RenameCollection implements Executable
39+
final class RenameCollection implements Executable
4040
{
4141
private string $fromNamespace;
4242

src/Operation/ReplaceOne.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* @see \MongoDB\Collection::replaceOne()
3535
* @see https://mongodb.com/docs/manual/reference/command/update/
3636
*/
37-
class ReplaceOne implements Executable
37+
final class ReplaceOne implements Executable
3838
{
3939
private Update $update;
4040

src/Operation/UpdateMany.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* @see \MongoDB\Collection::updateMany()
3333
* @see https://mongodb.com/docs/manual/reference/command/update/
3434
*/
35-
class UpdateMany implements Executable, Explainable
35+
final class UpdateMany implements Executable, Explainable
3636
{
3737
private Update $update;
3838

src/Operation/UpdateOne.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* @see \MongoDB\Collection::updateOne()
3333
* @see https://mongodb.com/docs/manual/reference/command/update/
3434
*/
35-
class UpdateOne implements Executable, Explainable
35+
final class UpdateOne implements Executable, Explainable
3636
{
3737
private Update $update;
3838

src/Operation/UpdateSearchIndex.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* @see \MongoDB\Collection::updateSearchIndexes()
3232
* @see https://mongodb.com/docs/manual/reference/command/updateSearchIndexes/
3333
*/
34-
class UpdateSearchIndex implements Executable
34+
final class UpdateSearchIndex implements Executable
3535
{
3636
private object $definition;
3737

src/Operation/Watch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
* @see \MongoDB\Collection::watch()
5858
* @see https://mongodb.com/docs/manual/changeStreams/
5959
*/
60-
class Watch implements Executable, /* @internal */ CommandSubscriber
60+
final class Watch implements Executable, /* @internal */ CommandSubscriber
6161
{
6262
public const FULL_DOCUMENT_DEFAULT = 'default';
6363
public const FULL_DOCUMENT_UPDATE_LOOKUP = 'updateLookup';

0 commit comments

Comments
 (0)