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-wp_option.php +5 -4 2.2.1 → 3.4 View file →
@@ -9,8 +9,10 @@
9 9 * @author Tobias Bäthge
10 10 * @since 1.0.0
11 11 */
12 12
13 +declare(strict_types=1);
14 +
13 15 // Prohibit direct script loading.
14 16 defined( 'ABSPATH' ) || die( 'No direct script access allowed!' );
15 17
16 18 /**
@@ -26,11 +28,10 @@
26 28 /**
27 29 * Name/Key of the Option (in its location in the database).
28 30 *
29 31 * @since 1.0.0
30 - * @var string
31 32 */
32 - protected $option_name;
33 + protected string $option_name;
33 34
34 35 /**
35 36 * Current value of the option.
36 37 *
@@ -36,9 +37,9 @@
36 37 *
37 38 * @since 1.0.0
38 39 * @var mixed[]
39 40 */
40 - protected $option_value;
41 + protected array $option_value;
41 42
42 43 /**
43 44 * Initialize with Option Name.
44 45 *
@@ -105,9 +106,9 @@
105 106 * @return bool True on success, false on failure.
106 107 */
107 108 public function update( array $new_options ): bool {
108 109 $this->option_value = $new_options;
109 - return $this->_update_option( $this->option_name, wp_json_encode( $this->option_value, TABLEPRESS_JSON_OPTIONS ) ); // @phpstan-ignore-line
110 + return $this->_update_option( $this->option_name, wp_json_encode( $this->option_value, TABLEPRESS_JSON_OPTIONS ) ); // @phpstan-ignore argument.type
110 111 }
111 112
112 113 /**
113 114 * Delete Option.