mirror of
https://github.com/gtbu/Typesetter-5.3-p8.git
synced 2025-05-09 13:13:14 +02:00
update ssCrush deprecations for php 8.4
This commit is contained in:
parent
91f3999b55
commit
41d04d046b
8 changed files with 11 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
|||
|
||||
Addon_Name = 'Typesetter Core'
|
||||
Addon_Unique_ID = 40
|
||||
Addon_Version = 5.3-p8.3
|
||||
Addon_Version = 5.3.1
|
|
@ -50,7 +50,7 @@ gp_defined('CMS_NAME_FULL', 'Typesetter CMS');
|
|||
gp_defined('addon_browse_path', CMS_DOMAIN . '/index.php');
|
||||
gp_defined('debug_path', CMS_DOMAIN . '/index.php/Debug');
|
||||
|
||||
gp_defined('gpversion', '5.3-p8.3');
|
||||
gp_defined('gpversion', '5.3.1');
|
||||
gp_defined('gp_random', \gp\tool::RandomString());
|
||||
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ class Crush
|
|||
}
|
||||
}
|
||||
|
||||
public static function plugin($name = null, callable $callback = null)
|
||||
public static function plugin($name = null, callable|null $callback = null)
|
||||
{
|
||||
static $plugins = [];
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ class Functions
|
|||
$this->pattern = Functions::makePattern(array_keys($this->register));
|
||||
}
|
||||
|
||||
public function apply($str, \stdClass $context = null)
|
||||
public function apply($str, ?\stdClass $context = null)
|
||||
{
|
||||
if (strpos($str, '(') === false) {
|
||||
return $str;
|
||||
|
|
|
@ -33,7 +33,7 @@ class Options
|
|||
'newlines' => 'use-platform',
|
||||
];
|
||||
|
||||
public function __construct(array $options = [], Options $defaults = null)
|
||||
public function __construct(array $options = [], ?Options $defaults = null)
|
||||
{
|
||||
$options = array_change_key_case($options, CASE_LOWER);
|
||||
|
||||
|
@ -169,7 +169,7 @@ class Options
|
|||
return $computed ? $this->computedOptions : self::filter($this->inputOptions);
|
||||
}
|
||||
|
||||
public static function filter(array $optionsArray = null)
|
||||
public static function filter(?array $optionsArray = null)
|
||||
{
|
||||
return $optionsArray ? array_intersect_key($optionsArray, self::$standardOptions) : self::$standardOptions;
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@ namespace CssCrush;
|
|||
|
||||
class StringObject
|
||||
{
|
||||
public string|null $raw = null;
|
||||
|
||||
public function __construct($str)
|
||||
{
|
||||
$this->raw = $str;
|
||||
|
|
|
@ -11,7 +11,7 @@ class Tokens
|
|||
public $store;
|
||||
protected $ids;
|
||||
|
||||
public function __construct(array $types = null)
|
||||
public function __construct(?array $types = null)
|
||||
{
|
||||
$types = $types ?: [
|
||||
's', // strings.
|
||||
|
|
|
@ -8,7 +8,7 @@ namespace CssCrush;
|
|||
|
||||
class Util
|
||||
{
|
||||
public static function htmlAttributes(array $attributes, array $sort_order = null)
|
||||
public static function htmlAttributes(array $attributes, ?array $sort_order = null)
|
||||
{
|
||||
// Optionally sort attributes (for better readability).
|
||||
if ($sort_order) {
|
||||
|
@ -75,7 +75,7 @@ class Util
|
|||
return $path;
|
||||
}
|
||||
|
||||
public static function resolveUserPath($path, callable $recovery = null, $docRoot = null)
|
||||
public static function resolveUserPath($path, ?callable $recovery = null, $docRoot = null)
|
||||
{
|
||||
// System path.
|
||||
if ($realpath = realpath($path)) {
|
||||
|
|
Loading…
Reference in a new issue