Skip to content

Commit

Permalink
fix: PHPStan error in SC_SmartyBc
Browse files Browse the repository at this point in the history
Updated deprecated method calls to use the recommended alternatives:
- Replaced `assignByRef` with `assign`
- Replaced `appendByRef` with `append`
- Removed unused parameter in `registerPlugin`
- Replaced `ConfigLoad` with `configLoad`
  • Loading branch information
nanasess committed Feb 12, 2025
1 parent 258994f commit c58e813
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions data/class/SC_SmartyBc.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public function __construct()
*/
public function assign_by_ref($tpl_var, &$value)

Check warning on line 56 in data/class/SC_SmartyBc.php

View check run for this annotation

Codecov / codecov/patch

data/class/SC_SmartyBc.php#L56

Added line #L56 was not covered by tests
{
trigger_error('assign_by_ref is obsolete, use assignByRef instead', E_USER_WARNING);
$this->assignByRef($tpl_var, $value);
trigger_error('assign_by_ref is obsolete, use assign instead', E_USER_WARNING);
$this->assign($tpl_var, $value);

Check warning on line 59 in data/class/SC_SmartyBc.php

View check run for this annotation

Codecov / codecov/patch

data/class/SC_SmartyBc.php#L58-L59

Added lines #L58 - L59 were not covered by tests
}

/**
Expand All @@ -68,8 +68,8 @@ public function assign_by_ref($tpl_var, &$value)
*/
public function append_by_ref($tpl_var, &$value, $merge = false)

Check warning on line 69 in data/class/SC_SmartyBc.php

View check run for this annotation

Codecov / codecov/patch

data/class/SC_SmartyBc.php#L69

Added line #L69 was not covered by tests
{
trigger_error('append_by_ref is obsolete, use appendByRef instead', E_USER_WARNING);
$this->appendByRef($tpl_var, $value, $merge);
trigger_error('append_by_ref is obsolete, use append instead', E_USER_WARNING);
$this->append($tpl_var, $value, $merge);

Check warning on line 72 in data/class/SC_SmartyBc.php

View check run for this annotation

Codecov / codecov/patch

data/class/SC_SmartyBc.php#L71-L72

Added lines #L71 - L72 were not covered by tests
}

/**
Expand All @@ -96,7 +96,7 @@ public function clear_assign($tpl_var)
public function register_function($function, $function_impl, $cacheable = true, $cache_attrs = null)

Check warning on line 96 in data/class/SC_SmartyBc.php

View check run for this annotation

Codecov / codecov/patch

data/class/SC_SmartyBc.php#L96

Added line #L96 was not covered by tests
{
trigger_error('register_function is obsolete, use registerPlugin instead', E_USER_WARNING);
$this->registerPlugin('function', $function, $function_impl, $cacheable, $cache_attrs);
$this->registerPlugin('function', $function, $function_impl, $cacheable);

Check warning on line 99 in data/class/SC_SmartyBc.php

View check run for this annotation

Codecov / codecov/patch

data/class/SC_SmartyBc.php#L98-L99

Added lines #L98 - L99 were not covered by tests
}

/**
Expand Down Expand Up @@ -160,7 +160,7 @@ public function unregister_object($object)
public function register_block($block, $block_impl, $cacheable = true, $cache_attrs = null)

Check warning on line 160 in data/class/SC_SmartyBc.php

View check run for this annotation

Codecov / codecov/patch

data/class/SC_SmartyBc.php#L160

Added line #L160 was not covered by tests
{
trigger_error('register_block is obsolete, use registerPlugin instead', E_USER_WARNING);
$this->registerPlugin('block', $block, $block_impl, $cacheable, $cache_attrs);
$this->registerPlugin('block', $block, $block_impl, $cacheable);

Check warning on line 163 in data/class/SC_SmartyBc.php

View check run for this annotation

Codecov / codecov/patch

data/class/SC_SmartyBc.php#L162-L163

Added lines #L162 - L163 were not covered by tests
}

/**
Expand Down Expand Up @@ -468,7 +468,7 @@ public function get_config_vars($name = null)
public function config_load($file, $section = null, $scope = 'global')

Check warning on line 468 in data/class/SC_SmartyBc.php

View check run for this annotation

Codecov / codecov/patch

data/class/SC_SmartyBc.php#L468

Added line #L468 was not covered by tests
{
trigger_error('config_load is obsolete, use ConfigLoad instead', E_USER_WARNING);
$this->ConfigLoad($file, $section, $scope);
$this->configLoad($file, $section);

Check warning on line 471 in data/class/SC_SmartyBc.php

View check run for this annotation

Codecov / codecov/patch

data/class/SC_SmartyBc.php#L470-L471

Added lines #L470 - L471 were not covered by tests
}

/**
Expand Down

0 comments on commit c58e813

Please sign in to comment.