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 | libraries/csstidy/class.csstidy_optimise.php +13 -18 2.2.5 → 3.4 View file →
@@ -7,8 +7,10 @@
7 7 * @author Florian Schmitz, Brett Zamir, Nikolay Matsievsky, Cedric Morin, Christopher Finke, Mark Scherer, Tobias Bäthge
8 8 * @since 1.0.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 /**
@@ -24,59 +26,52 @@
24 26 /**
25 27 * TablePress_CSSTidy instance.
26 28 *
27 29 * @since 1.0.0
28 - * @var TablePress_CSSTidy
29 30 */
30 - public $parser;
31 + public \TablePress_CSSTidy $parser;
31 32
32 33 /**
33 34 * The parsed CSS.
34 35 *
35 36 * @since 1.0.0
36 - * @var array
37 37 */
38 - public $css = array();
38 + public array $css = array();
39 39
40 40 /**
41 41 * The current sub-value.
42 42 *
43 43 * @since 1.0.0
44 - * @var string
45 44 */
46 - public $sub_value = '';
45 + public string $sub_value = '';
47 46
48 47 /**
49 48 * The current at rule (@media).
50 49 *
51 50 * @since 1.0.0
52 - * @var string
53 51 */
54 - public $at = '';
52 + public string $at = '';
55 53
56 54 /**
57 55 * The current selector.
58 56 *
59 57 * @since 1.0.0
60 - * @var string
61 58 */
62 - public $selector = '';
59 + public string $selector = '';
63 60
64 61 /**
65 62 * The current property.
66 63 *
67 64 * @since 1.0.0
68 - * @var string
69 65 */
70 - public $property = '';
66 + public string $property = '';
71 67
72 68 /**
73 69 * The current value.
74 70 *
75 71 * @since 1.0.0
76 - * @var string
77 72 */
78 - public $value = '';
73 + public string $value = '';
79 74
80 75 /**
81 76 * Constructor.
82 77 *
@@ -83,9 +78,9 @@
83 78 * @since 1.0.0
84 79 *
85 80 * @param TablePress_CSSTidy $csstidy Instance of the TablePress_CSSTidy class.
86 81 */
87 - public function __construct( $csstidy ) {
82 + public function __construct( TablePress_CSSTidy $csstidy ) {
88 83 $this->parser = $csstidy;
89 84 $this->css = &$csstidy->css;
90 85 $this->sub_value = &$csstidy->sub_value;
91 86 $this->at = &$csstidy->at;
@@ -521,11 +516,11 @@
521 516
522 517 $return[0] = (float) $a_string;
523 518 if ( abs( $return[0] ) > 0 && abs( $return[0] ) < 1 ) {
524 519 if ( $return[0] < 0 ) {
525 - $return[0] = '-' . ltrim( substr( $return[0], 1 ), '0' );
520 + $return[0] = '-' . ltrim( substr( (string) $return[0], 1 ), '0' );
526 521 } else {
527 - $return[0] = ltrim( $return[0], '0' );
522 + $return[0] = ltrim( (string) $return[0], '0' );
528 523 }
529 524 }
530 525
531 526 // Look for unit and split from value if exists.
@@ -683,9 +678,9 @@
683 678 switch ( $status ) {
684 679 case 'st':
685 680 if ( $a_string[ $i ] === $sep && ! $this->parser->escaped( $a_string, $i ) ) {
686 681 ++$num;
687 - } elseif ( '"' === $a_string[ $i ] || "'" === $a_string[ $i ] || '(' === $a_string[ $i ] && ! $this->parser->escaped( $a_string, $i ) ) {
682 + } elseif ( '"' === $a_string[ $i ] || "'" === $a_string[ $i ] || ( '(' === $a_string[ $i ] && ! $this->parser->escaped( $a_string, $i ) ) ) {
688 683 $status = 'str';
689 684 $to = ( '(' === $a_string[ $i ] ) ? ')' : $a_string[ $i ];
690 685 ( isset( $output[ $num ] ) ) ? $output[ $num ] .= $a_string[ $i ] : $output[ $num ] = $a_string[ $i ];
691 686 } else {