1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-13 09:34:54 +02:00

explicitly mark parameters as nullable

This commit is contained in:
Thomas A. Hirsch
2025-01-28 15:50:41 +01:00
parent 230770a277
commit 60f49fa1e3
6 changed files with 6 additions and 6 deletions

View File

@@ -29,7 +29,7 @@ class Minify_Cache_File implements Minify_CacheInterface
* @param bool $fileLocking
* @param LoggerInterface $logger
*/
public function __construct($path = '', $fileLocking = false, LoggerInterface $logger = null)
public function __construct($path = '', $fileLocking = false, ?LoggerInterface $logger = null)
{
if (! $path) {
$path = sys_get_temp_dir();

View File

@@ -38,7 +38,7 @@ abstract class Minify_Controller_Base implements Minify_ControllerInterface
* @param Minify_Source_Factory $sourceFactory
* @param LoggerInterface $logger
*/
public function __construct(Minify_Env $env, Minify_Source_Factory $sourceFactory, LoggerInterface $logger = null)
public function __construct(Minify_Env $env, Minify_Source_Factory $sourceFactory, ?LoggerInterface $logger = null)
{
$this->env = $env;
$this->sourceFactory = $sourceFactory;

View File

@@ -163,7 +163,7 @@ class Minify_HTML_Helper
* @return \Minify\App
* @internal
*/
public static function app(\Minify\App $app = null)
public static function app(?\Minify\App $app = null)
{
static $cached;
if ($app) {

View File

@@ -44,7 +44,7 @@ class Minify_Source_Factory
* @param Minify_CacheInterface $cache Optional cache for handling .less files.
*
*/
public function __construct(Minify_Env $env, array $options = array(), Minify_CacheInterface $cache = null)
public function __construct(Minify_Env $env, array $options = array(), ?Minify_CacheInterface $cache = null)
{
$this->env = $env;
$this->options = array_merge(array(