@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | public function all() |
25 | 25 | { |
26 | 26 | $options = get_option( static::databaseKey(), [] ); |
27 | - if( !is_array( $options )) { |
|
27 | + if( !is_array( $options ) ) { |
|
28 | 28 | delete_option( static::databaseKey() ); |
29 | 29 | $options = ['settings' => []]; |
30 | 30 | } |
@@ -42,10 +42,10 @@ discard block |
||
42 | 42 | $options = $this->all(); |
43 | 43 | $pointer = &$options; |
44 | 44 | foreach( $keys as $key ) { |
45 | - if( !isset( $pointer[$key] ) || !is_array( $pointer[$key] ))continue; |
|
45 | + if( !isset($pointer[$key]) || !is_array( $pointer[$key] ) )continue; |
|
46 | 46 | $pointer = &$pointer[$key]; |
47 | 47 | } |
48 | - unset( $pointer[$last] ); |
|
48 | + unset($pointer[$last]); |
|
49 | 49 | return $this->set( $options ); |
50 | 50 | } |
51 | 51 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function set( $pathOrOptions, $value = '' ) |
68 | 68 | { |
69 | - if( is_string( $pathOrOptions )) { |
|
69 | + if( is_string( $pathOrOptions ) ) { |
|
70 | 70 | $pathOrOptions = glsr( Helper::class )->setPathValue( $pathOrOptions, $value, $this->all() ); |
71 | 71 | } |
72 | 72 | return update_option( static::databaseKey(), (array)$pathOrOptions ); |