@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use Silk\Hook; |
| 4 | 4 | |
| 5 | -if (! function_exists('on')) : |
|
| 5 | +if (!function_exists('on')) : |
|
| 6 | 6 | /** |
| 7 | 7 | * Create and set a new event listener |
| 8 | 8 | * |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | } |
| 20 | 20 | endif; |
| 21 | 21 | |
| 22 | -if (! function_exists('off')) : |
|
| 22 | +if (!function_exists('off')) : |
|
| 23 | 23 | /** |
| 24 | 24 | * Remove an event listener |
| 25 | 25 | * |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | return $removed; |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - return on($handle, function ($given = null) use ($handle, $callback, $priority) { |
|
| 38 | + return on($handle, function($given = null) use ($handle, $callback, $priority) { |
|
| 39 | 39 | remove_filter($handle, $callback, $priority); |
| 40 | 40 | return $given; |
| 41 | 41 | })->withPriority($priority - 1); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | */ |
| 75 | 75 | public function __construct(WP_Post $post = null) |
| 76 | 76 | { |
| 77 | - if (! $post) { |
|
| 77 | + if (!$post) { |
|
| 78 | 78 | $post = new WP_Post(new stdClass); |
| 79 | 79 | $post->post_type = static::postTypeId(); |
| 80 | 80 | } |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | */ |
| 143 | 143 | public static function fromGlobal() |
| 144 | 144 | { |
| 145 | - if (! $GLOBALS['post'] instanceof WP_Post) { |
|
| 145 | + if (!$GLOBALS['post'] instanceof WP_Post) { |
|
| 146 | 146 | throw new PostNotFoundException('Global $post not an instance of WP_Post'); |
| 147 | 147 | } |
| 148 | 148 | |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | * Adapted from Str::snake() |
| 193 | 193 | * @link https://github.com/laravel/framework/blob/5.2/src/Illuminate/Support/Str.php |
| 194 | 194 | */ |
| 195 | - if (! ctype_lower($name)) { |
|
| 195 | + if (!ctype_lower($name)) { |
|
| 196 | 196 | $name = strtolower(preg_replace('/(.)(?=[A-Z])/u', '$1_', $name)); |
| 197 | 197 | } |
| 198 | 198 | |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | */ |
| 285 | 285 | public function save() |
| 286 | 286 | { |
| 287 | - if (! $this->id) { |
|
| 287 | + if (!$this->id) { |
|
| 288 | 288 | $result = wp_insert_post($this->post->to_array(), true); |
| 289 | 289 | } else { |
| 290 | 290 | $result = wp_update_post($this->post, true); |