Completed
Pull Request — master (#23)
by Evan
02:46
created
src/Event/Hook.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
     {
129 129
         $arguments = func_get_args();
130 130
 
131
-        if (! $this->shouldInvoke($arguments)) {
131
+        if (!$this->shouldInvoke($arguments)) {
132 132
             return $given;
133 133
         }
134 134
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
          * Check if any of the conditions returns false,
157 157
          * if so, do not invoke.
158 158
          */
159
-        return ! $this->conditions()->contains(function ($key, $callback) use ($arguments) {
159
+        return !$this->conditions()->contains(function($key, $callback) use ($arguments) {
160 160
             return false === $callback->callArray($arguments);
161 161
         });
162 162
     }
Please login to merge, or discard this patch.
src/Post/Model.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function __construct(WP_Post $post = null)
68 68
     {
69
-        if (! $post) {
69
+        if (!$post) {
70 70
             $post = new WP_Post(new stdClass);
71 71
             $post->post_type = static::postTypeId();
72 72
         }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      */
134 134
     public static function fromGlobal()
135 135
     {
136
-        if (! $GLOBALS['post'] instanceof WP_Post) {
136
+        if (!$GLOBALS['post'] instanceof WP_Post) {
137 137
             throw new PostNotFoundException('Global $post not an instance of WP_Post');
138 138
         }
139 139
 
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
      */
240 240
     public function save()
241 241
     {
242
-        if (! $this->id) {
242
+        if (!$this->id) {
243 243
             $result = wp_insert_post($this->object->to_array(), true);
244 244
         } else {
245 245
             $result = wp_update_post($this->object, true);
Please login to merge, or discard this patch.
src/User/Model.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public function __construct(WP_User $user = null)
39 39
     {
40
-        if (! $user) {
40
+        if (!$user) {
41 41
             $user = new WP_User;
42 42
         }
43 43
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public static function fromID($id)
57 57
     {
58
-        if (! $user = get_user_by('id', $id)) {
58
+        if (!$user = get_user_by('id', $id)) {
59 59
             throw new UserNotFoundException("No user found with ID $id");
60 60
         }
61 61
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public static function fromUsername($username)
75 75
     {
76
-        if (! $user = get_user_by('login', $username)) {
76
+        if (!$user = get_user_by('login', $username)) {
77 77
             throw new UserNotFoundException("No user found with username: $username");
78 78
         }
79 79
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public static function fromEmail($email)
93 93
     {
94
-        if (! $user = get_user_by('email', $email)) {
94
+        if (!$user = get_user_by('email', $email)) {
95 95
             throw new UserNotFoundException("No user found with email address: $email");
96 96
         }
97 97
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      */
110 110
     public static function fromSlug($slug)
111 111
     {
112
-        if (! $user = get_user_by('slug', $slug)) {
112
+        if (!$user = get_user_by('slug', $slug)) {
113 113
             throw new UserNotFoundException("No user found with slug: $slug");
114 114
         }
115 115
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
      */
147 147
     public function save()
148 148
     {
149
-        if (! $this->id) {
149
+        if (!$this->id) {
150 150
             $result = wp_insert_user($this->object);
151 151
         } else {
152 152
             $result = wp_update_user($this->object);
Please login to merge, or discard this patch.
src/Type/Model.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,10 +36,10 @@  discard block
 block discarded – undo
36 36
     const ID_PROPERTY = '';
37 37
 
38 38
     /**
39
-    * Get a new query builder for the model.
40
-    *
41
-    * @return \Silk\Contracts\BuildsQueries
42
-    */
39
+     * Get a new query builder for the model.
40
+     *
41
+     * @return \Silk\Contracts\BuildsQueries
42
+     */
43 43
     abstract public function newQuery();
44 44
 
45 45
     /**
@@ -91,9 +91,9 @@  discard block
 block discarded – undo
91 91
         $model = new static;
92 92
 
93 93
         Collection::make($attributes)
94
-                  ->each(function ($value, $key) use ($model) {
95
-                      $model->$key = $value;
96
-                  })
94
+                    ->each(function ($value, $key) use ($model) {
95
+                        $model->$key = $value;
96
+                    })
97 97
         ;
98 98
 
99 99
         return $model->save();
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         $model = new static;
92 92
 
93 93
         Collection::make($attributes)
94
-                  ->each(function ($value, $key) use ($model) {
94
+                  ->each(function($value, $key) use ($model) {
95 95
                       $model->$key = $value;
96 96
                   })
97 97
         ;
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
      */
216 216
     public function __isset($property)
217 217
     {
218
-        return ! is_null($this->__get($property));
218
+        return !is_null($this->__get($property));
219 219
     }
220 220
 
221 221
     /**
Please login to merge, or discard this patch.
src/Post/QueryBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public function __construct(WP_Query $query = null)
31 31
     {
32
-        if (! $query) {
32
+        if (!$query) {
33 33
             $query = new WP_Query();
34 34
         }
35 35
 
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         $modelClass = get_class($this->model);
142 142
 
143 143
         return Collection::make($this->query->get_posts())
144
-            ->map(function ($post) use ($modelClass) {
144
+            ->map(function($post) use ($modelClass) {
145 145
                 return new $modelClass($post);
146 146
             });
147 147
     }
Please login to merge, or discard this patch.
src/User/QueryBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
      */
22 22
     public function __construct(WP_User_Query $query = null)
23 23
     {
24
-        if (! $query) {
24
+        if (!$query) {
25 25
             $query = new WP_User_Query();
26 26
         }
27 27
 
Please login to merge, or discard this patch.