Completed
Push — master ( 8bf665...09425d )
by Evan
03:53
created
src/Models/Exceptions/ModelPostTypeMismatchException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         ], [
26 26
             $this->modelClass,
27 27
             $this->post->post_type,
28
-            constant($this->modelClass . '::POST_TYPE')
28
+            constant($this->modelClass.'::POST_TYPE')
29 29
         ], static::MESSAGE_FORMAT);
30 30
     }
31 31
 }
Please login to merge, or discard this patch.
src/functions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/Models/Post.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function __construct(WP_Post $post = null)
40 40
     {
41
-        if (! $post) {
41
+        if ( ! $post) {
42 42
             $post = new WP_Post(new stdClass);
43 43
             $post->post_type = static::POST_TYPE;
44 44
         }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             'posts_per_page' => 1
91 91
         ]);
92 92
 
93
-        if (! $post = reset($posts)) {
93
+        if ( ! $post = reset($posts)) {
94 94
             throw new PostNotFoundException("No post found with slug {$slug}");
95 95
         }
96 96
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     {
107 107
         $post = get_post();
108 108
 
109
-        if (! $post instanceof WP_Post) {
109
+        if ( ! $post instanceof WP_Post) {
110 110
             throw new PostNotFoundException('Global $post not an instance of WP_Post');
111 111
         }
112 112
 
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
      */
215 215
     public function save()
216 216
     {
217
-        if (! $this->id) {
217
+        if ( ! $this->id) {
218 218
             $result = wp_insert_post($this->post->to_array(), true);
219 219
         } else {
220 220
             $result = wp_update_post($this->post, true);
Please login to merge, or discard this patch.