@@ -20,26 +20,26 @@ |
||
| 20 | 20 | */ |
| 21 | 21 | class Compact extends Formatter |
| 22 | 22 | { |
| 23 | - /** |
|
| 24 | - * {@inheritdoc} |
|
| 25 | - */ |
|
| 26 | - public function __construct() |
|
| 27 | - { |
|
| 28 | - $this->indentLevel = 0; |
|
| 29 | - $this->indentChar = ''; |
|
| 30 | - $this->break = ''; |
|
| 31 | - $this->open = ' {'; |
|
| 32 | - $this->close = "}\n\n"; |
|
| 33 | - $this->tagSeparator = ','; |
|
| 34 | - $this->assignSeparator = ':'; |
|
| 35 | - $this->keepSemicolons = true; |
|
| 36 | - } |
|
| 23 | + /** |
|
| 24 | + * {@inheritdoc} |
|
| 25 | + */ |
|
| 26 | + public function __construct() |
|
| 27 | + { |
|
| 28 | + $this->indentLevel = 0; |
|
| 29 | + $this->indentChar = ''; |
|
| 30 | + $this->break = ''; |
|
| 31 | + $this->open = ' {'; |
|
| 32 | + $this->close = "}\n\n"; |
|
| 33 | + $this->tagSeparator = ','; |
|
| 34 | + $this->assignSeparator = ':'; |
|
| 35 | + $this->keepSemicolons = true; |
|
| 36 | + } |
|
| 37 | 37 | |
| 38 | - /** |
|
| 39 | - * {@inheritdoc} |
|
| 40 | - */ |
|
| 41 | - public function indentStr() |
|
| 42 | - { |
|
| 43 | - return ' '; |
|
| 44 | - } |
|
| 38 | + /** |
|
| 39 | + * {@inheritdoc} |
|
| 40 | + */ |
|
| 41 | + public function indentStr() |
|
| 42 | + { |
|
| 43 | + return ' '; |
|
| 44 | + } |
|
| 45 | 45 | } |
@@ -21,50 +21,50 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | class Util |
| 23 | 23 | { |
| 24 | - /** |
|
| 25 | - * Asserts that `value` falls within `range` (inclusive), leaving |
|
| 26 | - * room for slight floating-point errors. |
|
| 27 | - * |
|
| 28 | - * @param string $name The name of the value. Used in the error message. |
|
| 29 | - * @param \Leafo\ScssPhp\Base\Range $range Range of values. |
|
| 30 | - * @param array $value The value to check. |
|
| 31 | - * @param string $unit The unit of the value. Used in error reporting. |
|
| 32 | - * |
|
| 33 | - * @return mixed `value` adjusted to fall within range, if it was outside by a floating-point margin. |
|
| 34 | - * |
|
| 35 | - * @throws \Leafo\ScssPhp\Exception\RangeException |
|
| 36 | - */ |
|
| 37 | - public static function checkRange($name, Range $range, $value, $unit = '') |
|
| 38 | - { |
|
| 39 | - $val = $value[1]; |
|
| 40 | - $grace = new Range(-0.00001, 0.00001); |
|
| 24 | + /** |
|
| 25 | + * Asserts that `value` falls within `range` (inclusive), leaving |
|
| 26 | + * room for slight floating-point errors. |
|
| 27 | + * |
|
| 28 | + * @param string $name The name of the value. Used in the error message. |
|
| 29 | + * @param \Leafo\ScssPhp\Base\Range $range Range of values. |
|
| 30 | + * @param array $value The value to check. |
|
| 31 | + * @param string $unit The unit of the value. Used in error reporting. |
|
| 32 | + * |
|
| 33 | + * @return mixed `value` adjusted to fall within range, if it was outside by a floating-point margin. |
|
| 34 | + * |
|
| 35 | + * @throws \Leafo\ScssPhp\Exception\RangeException |
|
| 36 | + */ |
|
| 37 | + public static function checkRange($name, Range $range, $value, $unit = '') |
|
| 38 | + { |
|
| 39 | + $val = $value[1]; |
|
| 40 | + $grace = new Range(-0.00001, 0.00001); |
|
| 41 | 41 | |
| 42 | - if ($range->includes($val)) { |
|
| 43 | - return $val; |
|
| 44 | - } |
|
| 42 | + if ($range->includes($val)) { |
|
| 43 | + return $val; |
|
| 44 | + } |
|
| 45 | 45 | |
| 46 | - if ($grace->includes($val - $range->first)) { |
|
| 47 | - return $range->first; |
|
| 48 | - } |
|
| 46 | + if ($grace->includes($val - $range->first)) { |
|
| 47 | + return $range->first; |
|
| 48 | + } |
|
| 49 | 49 | |
| 50 | - if ($grace->includes($val - $range->last)) { |
|
| 51 | - return $range->last; |
|
| 52 | - } |
|
| 50 | + if ($grace->includes($val - $range->last)) { |
|
| 51 | + return $range->last; |
|
| 52 | + } |
|
| 53 | 53 | |
| 54 | - throw new RangeException("$name {$val} must be between {$range->first} and {$range->last}$unit"); |
|
| 55 | - } |
|
| 54 | + throw new RangeException("$name {$val} must be between {$range->first} and {$range->last}$unit"); |
|
| 55 | + } |
|
| 56 | 56 | |
| 57 | - /** |
|
| 58 | - * Encode URI component |
|
| 59 | - * |
|
| 60 | - * @param string $string |
|
| 61 | - * |
|
| 62 | - * @return string |
|
| 63 | - */ |
|
| 64 | - public static function encodeURIComponent($string) |
|
| 65 | - { |
|
| 66 | - $revert = array('%21' => '!', '%2A' => '*', '%27' => "'", '%28' => '(', '%29' => ')'); |
|
| 57 | + /** |
|
| 58 | + * Encode URI component |
|
| 59 | + * |
|
| 60 | + * @param string $string |
|
| 61 | + * |
|
| 62 | + * @return string |
|
| 63 | + */ |
|
| 64 | + public static function encodeURIComponent($string) |
|
| 65 | + { |
|
| 66 | + $revert = array('%21' => '!', '%2A' => '*', '%27' => "'", '%28' => '(', '%29' => ')'); |
|
| 67 | 67 | |
| 68 | - return strtr(rawurlencode($string), $revert); |
|
| 69 | - } |
|
| 68 | + return strtr(rawurlencode($string), $revert); |
|
| 69 | + } |
|
| 70 | 70 | } |
@@ -189,11 +189,11 @@ |
||
| 189 | 189 | add_action( 'woocommerce_checkout_after_order_review', 'lsx_customizer_close_li', 40 ); |
| 190 | 190 | } |
| 191 | 191 | |
| 192 | - /** |
|
| 193 | - * Editor color palette. |
|
| 194 | - * |
|
| 195 | - * @return void |
|
| 196 | - */ |
|
| 192 | + /** |
|
| 193 | + * Editor color palette. |
|
| 194 | + * |
|
| 195 | + * @return void |
|
| 196 | + */ |
|
| 197 | 197 | public function lsx_customizer_color_palette_setup() { |
| 198 | 198 | add_theme_support( 'editor-color-palette', array( |
| 199 | 199 | array( |