diff --git a/src/Bulk/BulkOperator.php b/src/Bulk/BulkOperator.php index 6b444a9..500b2cc 100644 --- a/src/Bulk/BulkOperator.php +++ b/src/Bulk/BulkOperator.php @@ -11,10 +11,8 @@ abstract class BulkOperator { /** * The PDO connection. - * - * @var \PDO */ - private $pdo; + private \PDO $pdo; /** * The name of the target database table. @@ -39,10 +37,8 @@ abstract class BulkOperator /** * The number of records to process per query. - * - * @var int */ - private $operationsPerQuery; + private int $operationsPerQuery; /** * The prepared statement to process a full batch of records. @@ -53,33 +49,25 @@ abstract class BulkOperator /** * A buffer containing the pending values to process in the next batch. - * - * @var array */ - private $buffer = []; + private array $buffer = []; /** * The number of operations in the buffer. - * - * @var int */ - private $bufferSize = 0; + private int $bufferSize = 0; /** * The total number of operations that have been queued. * * This includes both flushed and pending operations. - * - * @var int */ - private $totalOperations = 0; + private int $totalOperations = 0; /** * The total number of rows affected by flushed operations. - * - * @var int */ - private $affectedRows = 0; + private int $affectedRows = 0; /** * @param \PDO $pdo The PDO connection. diff --git a/tests/Bulk/PDOMock.php b/tests/Bulk/PDOMock.php index 7dfb270..e7d3bfd 100644 --- a/tests/Bulk/PDOMock.php +++ b/tests/Bulk/PDOMock.php @@ -9,22 +9,19 @@ */ class PDOMock extends \PDO { - /** - * @var int - */ - private $statementNumber = 0; + private int $statementNumber = 0; /** * @var string[] */ - private $log = []; + private array $log = []; /** * The values that will be returned by successive calls to PDOStatementMock::rowCount(). * * @var int[] */ - private $rowCounts; + private array $rowCounts; /** * @param array $rowCounts The values that will be returned by successive calls to PDOStatementMock::rowCount(). diff --git a/tests/Bulk/PDOStatementMock.php b/tests/Bulk/PDOStatementMock.php index 2fe5493..727b223 100644 --- a/tests/Bulk/PDOStatementMock.php +++ b/tests/Bulk/PDOStatementMock.php @@ -9,15 +9,9 @@ */ class PDOStatementMock extends \PDOStatement { - /** - * @var PDOMock - */ - private $pdo; + private PDOMock $pdo; - /** - * @var int - */ - private $number; + private int $number; /** * @param PDOMock $pdo