@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function __construct(WP_Post $post = null) |
39 | 39 | { |
40 | - if (! $post) { |
|
40 | + if ( ! $post) { |
|
41 | 41 | $post = new WP_Post(new StdClass); |
42 | 42 | $post->post_type = static::POST_TYPE; |
43 | 43 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | 'posts_per_page' => 1 |
90 | 90 | ]); |
91 | 91 | |
92 | - if (! $post = reset($posts)) { |
|
92 | + if ( ! $post = reset($posts)) { |
|
93 | 93 | throw new PostNotFoundException("No post found with slug {$slug}"); |
94 | 94 | } |
95 | 95 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | { |
106 | 106 | $post = get_post(); |
107 | 107 | |
108 | - if (! $post instanceof WP_Post) { |
|
108 | + if ( ! $post instanceof WP_Post) { |
|
109 | 109 | throw new PostNotFoundException('Global $post not an instance of WP_Post'); |
110 | 110 | } |
111 | 111 | |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | */ |
213 | 213 | public function save() |
214 | 214 | { |
215 | - if (! $this->id) { |
|
215 | + if ( ! $this->id) { |
|
216 | 216 | $result = wp_insert_post($this->post->to_array(), true); |
217 | 217 | } else { |
218 | 218 | $result = wp_update_post($this->post, true); |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | return $this->post->$property; |
247 | 247 | } |
248 | 248 | |
249 | - throw new \InvalidArgumentException(static::class . " has no property: {$property}"); |
|
249 | + throw new \InvalidArgumentException(static::class." has no property: {$property}"); |
|
250 | 250 | } |
251 | 251 | |
252 | 252 | /** |