diff --git a/composer.json b/composer.json index 3615442..5452a4d 100644 --- a/composer.json +++ b/composer.json @@ -7,12 +7,12 @@ ], "license": "MIT", "require-dev": { - "phpunit/phpunit": "~9.5.4", - "squizlabs/php_codesniffer": "~3.5.8", - "php-coveralls/php-coveralls": "~2.4.3" + "phpunit/phpunit": "9.5.21", + "squizlabs/php_codesniffer": "3.7.1", + "php-coveralls/php-coveralls": "2.5.2" }, "require": { - "phpugph/components": "~1.0.0" + "phpugph/components": "1.0.5" }, "autoload": { "psr-4": { diff --git a/src/HandlebarsHandler.php b/src/HandlebarsHandler.php index 9c0011c..37fe485 100644 --- a/src/HandlebarsHandler.php +++ b/src/HandlebarsHandler.php @@ -79,13 +79,13 @@ public function compile($template) $file = $this->cache . '/' . $this->prefix . $name . '.php'; // @codeCoverageIgnoreStart - if (is_dir($this->cache) && file_exists($file)) { + if (is_dir((string) $this->cache) && file_exists($file)) { $callback = include($file); } else { $code = $this->resolve(HandlebarsCompiler::class, $this, $template) ->compile(); - if (is_dir($this->cache)) { + if (is_dir((string) $this->cache)) { file_put_contents($file, $code); }