Skip to content

Commit

Permalink
4.17
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecc-business-account committed Dec 30, 2024
1 parent 94570df commit f28ac77
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/BladeOne.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
* @copyright Copyright (c) 2016-2024 Jorge Patricio Castro Castillo MIT License.
* Don't delete this comment, its part of the license.
* Part of this code is based in the work of Laravel PHP Components.
* @version 4.16
* @version 4.17
* @link https://github.com/EFTEC/BladeOne
*/
class BladeOne
{
//<editor-fold desc="fields">
public const VERSION = '4.16';
public const VERSION = '4.17';
/** @var int BladeOne reads if the compiled file has changed. If it has changed,then the file is replaced. */
public const MODE_AUTO = 0;
/** @var int Then compiled file is always replaced. It's slow and it's useful for development. */
Expand Down Expand Up @@ -1098,7 +1098,7 @@ public function splitForeach($each = 1, $splitText = ',', $splitEnd = ''): strin
* @param mixed $default
* @return mixed
*/
public static function last($array, callable $callback = null, $default = null)
public static function last($array, ?callable $callback = null, $default = null)
{
if (\is_null($callback)) {
return empty($array) ? static::value($default) : \end($array);
Expand All @@ -1125,7 +1125,7 @@ public static function value($value)
* @param mixed $default
* @return mixed
*/
public static function first($array, callable $callback = null, $default = null)
public static function first($array, ?callable $callback = null, $default = null)
{
if (\is_null($callback)) {
return empty($array) ? static::value($default) : \reset($array);
Expand Down Expand Up @@ -1438,6 +1438,7 @@ public function getCompiledFile($templateName = ''): string
* Get the mode of the engine.See BladeOne::MODE_* constants
*
* @return int=[self::MODE_AUTO,self::MODE_DEBUG,self::MODE_FAST,self::MODE_SLOW][$i]
* @noinspection PhpUndefinedConstantInspection
*/
public function getMode(): int
{
Expand Down Expand Up @@ -1668,7 +1669,7 @@ public function convertArg($array): string
if (!\is_array($array)) {
return $array; // nothing to convert.
}
return \implode(' ', \array_map('static::convertArgCallBack', \array_keys($array), $array));
return \implode(' ', \array_map('BladeOne::convertArgCallBack', \array_keys($array), $array));
}

/**
Expand Down

0 comments on commit f28ac77

Please sign in to comment.