Skip to content

Commit

Permalink
PHP8.4 support. PHP Deprecated: Implicitly marking parameter as nulla…
Browse files Browse the repository at this point in the history
…ble is deprecated, the explicit nullable type must be used instead
  • Loading branch information
Sofiia Kulish committed Jan 28, 2025
1 parent 23f43cd commit 25d24f3
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}
],
"require": {
"php": ">=5.2.4"
"php": ">=7.1"
},
"require-dev": {
"phpunit/phpunit": "~3.7|~4.0|~5.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Mustache/Engine.php
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ public function loadLambda($source, $delims = null)
*
* @return Mustache_Template
*/
private function loadSource($source, Mustache_Cache $cache = null)
private function loadSource($source, ?Mustache_Cache $cache = null)
{
$className = $this->getTemplateClassName($source);

Expand Down
2 changes: 1 addition & 1 deletion src/Mustache/Exception/SyntaxException.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Mustache_Exception_SyntaxException extends LogicException implements Musta
* @param array $token
* @param Exception $previous
*/
public function __construct($msg, array $token, Exception $previous = null)
public function __construct($msg, array $token, ?Exception $previous = null)
{
$this->token = $token;
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
Expand Down
2 changes: 1 addition & 1 deletion src/Mustache/Exception/UnknownFilterException.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Mustache_Exception_UnknownFilterException extends UnexpectedValueException
* @param string $filterName
* @param Exception $previous
*/
public function __construct($filterName, Exception $previous = null)
public function __construct($filterName, ?Exception $previous = null)
{
$this->filterName = $filterName;
$message = sprintf('Unknown filter: %s', $filterName);
Expand Down
2 changes: 1 addition & 1 deletion src/Mustache/Exception/UnknownHelperException.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Mustache_Exception_UnknownHelperException extends InvalidArgumentException
* @param string $helperName
* @param Exception $previous
*/
public function __construct($helperName, Exception $previous = null)
public function __construct($helperName, ?Exception $previous = null)
{
$this->helperName = $helperName;
$message = sprintf('Unknown helper: %s', $helperName);
Expand Down
2 changes: 1 addition & 1 deletion src/Mustache/Exception/UnknownTemplateException.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Mustache_Exception_UnknownTemplateException extends InvalidArgumentExcepti
* @param string $templateName
* @param Exception $previous
*/
public function __construct($templateName, Exception $previous = null)
public function __construct($templateName, ?Exception $previous = null)
{
$this->templateName = $templateName;
$message = sprintf('Unknown template: %s', $templateName);
Expand Down
2 changes: 1 addition & 1 deletion src/Mustache/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function setPragmas(array $pragmas)
*
* @return array Mustache Token parse tree
*/
private function buildTree(array &$tokens, array $parent = null)
private function buildTree(array &$tokens, ?array $parent = null)
{
$nodes = array();

Expand Down

0 comments on commit 25d24f3

Please sign in to comment.