diff --git a/phpdotnet/phd/ErrorHandler.php b/phpdotnet/phd/ErrorHandler.php index 202f4cf4..dc6061fe 100644 --- a/phpdotnet/phd/ErrorHandler.php +++ b/phpdotnet/phd/ErrorHandler.php @@ -20,7 +20,7 @@ class ErrorHandler private bool $recursive = false; public function __construct( - private OutputHandler $outputHandler + private readonly OutputHandler $outputHandler ) {} public function handleError($errno, $msg, $file, $line) { diff --git a/phpdotnet/phd/IndexRepository.php b/phpdotnet/phd/IndexRepository.php index 0ecf5dd1..2d17d8f4 100644 --- a/phpdotnet/phd/IndexRepository.php +++ b/phpdotnet/phd/IndexRepository.php @@ -11,7 +11,7 @@ class IndexRepository private array $examples = []; public function __construct( - private \SQLite3 $db + private readonly \SQLite3 $db ) {} public function init(): void { diff --git a/phpdotnet/phd/Options/Handler.php b/phpdotnet/phd/Options/Handler.php index a2656227..883cb6de 100644 --- a/phpdotnet/phd/Options/Handler.php +++ b/phpdotnet/phd/Options/Handler.php @@ -4,9 +4,9 @@ class Options_Handler implements Options_Interface { public function __construct( - private Config $config, - private Format_Factory $formatFactory, - private OutputHandler $outputHandler + private readonly Config $config, + private readonly Format_Factory $formatFactory, + private readonly OutputHandler $outputHandler ) {} /** diff --git a/phpdotnet/phd/OutputHandler.php b/phpdotnet/phd/OutputHandler.php index 96da4c3e..3da09119 100644 --- a/phpdotnet/phd/OutputHandler.php +++ b/phpdotnet/phd/OutputHandler.php @@ -24,7 +24,7 @@ class OutputHandler ]; public function __construct( - private Config $config + private readonly Config $config ) {} /**