3535 * @copyright Copyright (c) 2016-2024 Jorge Patricio Castro Castillo MIT License.
3636 * Don't delete this comment, its part of the license.
3737 * Part of this code is based in the work of Laravel PHP Components.
38- * @version 4.16
38+ * @version 4.17
3939 * @link https://github.com/EFTEC/BladeOne
4040 */
4141class BladeOne
4242{
4343 //<editor-fold desc="fields">
44- public const VERSION = '4.16 ' ;
44+ public const VERSION = '4.17 ' ;
4545 /** @var int BladeOne reads if the compiled file has changed. If it has changed,then the file is replaced. */
4646 public const MODE_AUTO = 0 ;
4747 /** @var int Then compiled file is always replaced. It's slow and it's useful for development. */
@@ -1098,7 +1098,7 @@ public function splitForeach($each = 1, $splitText = ',', $splitEnd = ''): strin
10981098 * @param mixed $default
10991099 * @return mixed
11001100 */
1101- public static function last ($ array , callable $ callback = null , $ default = null )
1101+ public static function last ($ array , ? callable $ callback = null , $ default = null )
11021102 {
11031103 if (\is_null ($ callback )) {
11041104 return empty ($ array ) ? static ::value ($ default ) : \end ($ array );
@@ -1125,7 +1125,7 @@ public static function value($value)
11251125 * @param mixed $default
11261126 * @return mixed
11271127 */
1128- public static function first ($ array , callable $ callback = null , $ default = null )
1128+ public static function first ($ array , ? callable $ callback = null , $ default = null )
11291129 {
11301130 if (\is_null ($ callback )) {
11311131 return empty ($ array ) ? static ::value ($ default ) : \reset ($ array );
@@ -1438,6 +1438,7 @@ public function getCompiledFile($templateName = ''): string
14381438 * Get the mode of the engine.See BladeOne::MODE_* constants
14391439 *
14401440 * @return int=[self::MODE_AUTO,self::MODE_DEBUG,self::MODE_FAST,self::MODE_SLOW][$i]
1441+ * @noinspection PhpUndefinedConstantInspection
14411442 */
14421443 public function getMode (): int
14431444 {
@@ -1668,7 +1669,7 @@ public function convertArg($array): string
16681669 if (!\is_array ($ array )) {
16691670 return $ array ; // nothing to convert.
16701671 }
1671- return \implode (' ' , \array_map ('static ::convertArgCallBack ' , \array_keys ($ array ), $ array ));
1672+ return \implode (' ' , \array_map ('BladeOne ::convertArgCallBack ' , \array_keys ($ array ), $ array ));
16721673 }
16731674
16741675 /**
0 commit comments