Skip to content

Commit 3933526

Browse files
committed
PHPLIB-953 Make internal classes final
1 parent 5858396 commit 3933526

20 files changed

+20
-20
lines changed

src/Command/ListCollections.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
* @internal
3737
* @see https://mongodb.com/docs/manual/reference/command/listCollections/
3838
*/
39-
class ListCollections implements Executable
39+
final class ListCollections implements Executable
4040
{
4141
/**
4242
* Constructs a listCollections command.

src/Command/ListDatabases.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* @internal
3838
* @see https://mongodb.com/docs/manual/reference/command/listDatabases/
3939
*/
40-
class ListDatabases implements Executable
40+
final class ListDatabases implements Executable
4141
{
4242
/**
4343
* Constructs a listDatabases command.

src/GridFS/CollectionWrapper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
*
4040
* @internal
4141
*/
42-
class CollectionWrapper
42+
final class CollectionWrapper
4343
{
4444
private Collection $chunksCollection;
4545

src/GridFS/ReadableStream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
*
3939
* @internal
4040
*/
41-
class ReadableStream
41+
final class ReadableStream
4242
{
4343
private ?string $buffer = null;
4444

src/GridFS/StreamWrapper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
* @see Bucket::openDownloadStream()
5050
* @psalm-type ContextOptions = array{collectionWrapper: CollectionWrapper, file: object}|array{collectionWrapper: CollectionWrapper, filename: string, options: array}
5151
*/
52-
class StreamWrapper
52+
final class StreamWrapper
5353
{
5454
/** @var resource|null Stream context (set by PHP) */
5555
public $context;

src/GridFS/WritableStream.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
*
4343
* @internal
4444
*/
45-
class WritableStream
45+
final class WritableStream
4646
{
4747
private const DEFAULT_CHUNK_SIZE_BYTES = 261120;
4848

src/Model/CachingIterator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
* @template TValue
4141
* @template-implements Iterator<TKey, TValue>
4242
*/
43-
class CachingIterator implements Countable, Iterator
43+
final class CachingIterator implements Countable, Iterator
4444
{
4545
private const FIELD_KEY = 0;
4646
private const FIELD_VALUE = 1;

src/Model/CallbackIterator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* @template TCallbackValue
3535
* @template-implements Iterator<TKey, TCallbackValue>
3636
*/
37-
class CallbackIterator implements Iterator
37+
final class CallbackIterator implements Iterator
3838
{
3939
/** @var callable(TValue, TKey): TCallbackValue */
4040
private $callback;

src/Model/ChangeStreamIterator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
* @template TValue of array|object
5252
* @template-extends IteratorIterator<int, TValue, CursorInterface<int, TValue>&Iterator<int, TValue>>
5353
*/
54-
class ChangeStreamIterator extends IteratorIterator implements CommandSubscriber
54+
final class ChangeStreamIterator extends IteratorIterator implements CommandSubscriber
5555
{
5656
private int $batchPosition = 0;
5757

src/Model/CollectionInfoCommandIterator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* @see https://mongodb.com/docs/manual/reference/command/listCollections/
3333
* @template-extends IteratorIterator<int, array, Traversable<int, array>>
3434
*/
35-
class CollectionInfoCommandIterator extends IteratorIterator implements CollectionInfoIterator
35+
final class CollectionInfoCommandIterator extends IteratorIterator implements CollectionInfoIterator
3636
{
3737
/** @param Traversable<int, array> $iterator */
3838
public function __construct(Traversable $iterator, private ?string $databaseName = null)

0 commit comments

Comments
 (0)