PluginProbe
TablePress – Tables in WordPress made easy / 3.4
TablePress – Tables in WordPress made easy v3.4
3.4 3.3.4 3.3.3 3.3.2 3.3.1 trunk 1.12 1.14 1.9.2 2.0.4 2.1.7 2.1.8 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3 2.3.1 2.3.2 2.4 2.4.1 2.4.2 2.4.3 All 45 releases
← All changes | classes/class-evaluate-legacy.php +6 -5 2.2.5 → 3.4 View file →
@@ -7,8 +7,10 @@
7 7 * @author Tobias Bäthge
8 8 * @since 1.5.0
9 9 */
10 10
11 +declare(strict_types=1);
12 +
11 13 // Prohibit direct script loading.
12 14 defined( 'ABSPATH' ) || die( 'No direct script access allowed!' );
13 15
14 16 /**
@@ -26,11 +28,10 @@
26 28 /**
27 29 * Instance of the EvalMath class.
28 30 *
29 31 * @since 1.0.0
30 - * @var EvalMath
31 32 */
32 - protected $evalmath;
33 + protected \EvalMath $evalmath;
33 34
34 35 /**
35 36 * Table data in which formulas shall be evaluated.
36 37 *
@@ -36,9 +37,9 @@
36 37 *
37 38 * @since 1.5.0
38 39 * @var array<int, array<int, string>>
39 40 */
40 - protected $table_data;
41 + protected array $table_data;
41 42
42 43 /**
43 44 * Storage for cell ranges that have been replaced in formulas.
44 45 *
@@ -44,9 +45,9 @@
44 45 *
45 46 * @since 1.0.0
46 47 * @var array<string, string>
47 48 */
48 - protected $known_ranges = array();
49 + protected array $known_ranges = array();
49 50
50 51 /**
51 52 * Initialize the Formula Evaluation class, include the EvalMath class.
52 53 *
@@ -216,9 +217,9 @@
216 217 }
217 218
218 219 $result = $this->_evaluate_math_expression( $expression, $row_idx, $col_idx );
219 220 // Support putting formulas in strings, like =Total: {A3+A4}.
220 - if ( $formula_in_string ) { // @phpstan-ignore-line
221 + if ( $formula_in_string ) {
221 222 $content = str_replace( $orig_expression, $result, $content );
222 223 } else {
223 224 $content = $result;
224 225 }