Completed
Pull Request — master (#23)
by Evan
05:21 queued 02:59
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/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.
src/Post/Model.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     {
70 70
         $attributes = is_array($post) ? $post : [];
71 71
 
72
-        if (! $post instanceof WP_Post) {
72
+        if (!$post instanceof WP_Post) {
73 73
             $post = new WP_Post(new stdClass);
74 74
             $post->post_type = static::postTypeId();
75 75
         } elseif ($post->post_type !== static::postTypeId()) {
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
      */
142 142
     public static function fromGlobal()
143 143
     {
144
-        if (! $GLOBALS['post'] instanceof WP_Post) {
144
+        if (!$GLOBALS['post'] instanceof WP_Post) {
145 145
             throw new PostNotFoundException('Global $post not an instance of WP_Post');
146 146
         }
147 147
 
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
      */
229 229
     public function save()
230 230
     {
231
-        if (! $this->id) {
231
+        if (!$this->id) {
232 232
             $result = wp_insert_post($this->object->to_array(), true);
233 233
         } else {
234 234
             $result = wp_update_post($this->object, true);
Please login to merge, or discard this patch.
src/Term/Model.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     {
54 54
         $attributes = is_array($term) ? $term : [];
55 55
 
56
-        if (! $term instanceof WP_Term) {
56
+        if (!$term instanceof WP_Term) {
57 57
             $term = new WP_Term(new stdClass);
58 58
             $term->taxonomy = static::TAXONOMY;
59 59
         } elseif ($term->taxonomy != static::TAXONOMY) {
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public static function fromID($id)
91 91
     {
92
-        if (! $term = get_term_by('id', (int) $id, static::TAXONOMY)) {
92
+        if (!$term = get_term_by('id', (int) $id, static::TAXONOMY)) {
93 93
             throw new TermNotFoundException("No term found with ID $id.");
94 94
         }
95 95
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      */
108 108
     public static function fromSlug($slug)
109 109
     {
110
-        if (! $term = get_term_by('slug', $slug, static::TAXONOMY)) {
110
+        if (!$term = get_term_by('slug', $slug, static::TAXONOMY)) {
111 111
             throw new TermNotFoundException("No term found with slug '$slug'.");
112 112
         }
113 113
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
     public function ancestors()
164 164
     {
165 165
         return Collection::make(get_ancestors($this->id, static::TAXONOMY, 'taxonomy'))
166
-            ->map(function ($term_ID) {
166
+            ->map(function($term_ID) {
167 167
                 return static::fromID($term_ID);
168 168
             });
169 169
     }
Please login to merge, or discard this patch.
src/Type/ShorthandProperties.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     {
18 18
         $aliased = $this->getAliasedObject();
19 19
 
20
-        if (is_object($aliased) || ! empty(static::OBJECT_TYPE)) {
20
+        if (is_object($aliased) || !empty(static::OBJECT_TYPE)) {
21 21
             /**
22 22
              * Automatically alias shorthand syntax for type_name
23 23
              * Eg: 'post_content' is aliased to 'content'
Please login to merge, or discard this patch.
src/Term/QueryBuilder.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
     {
99 99
         if ($this->model) {
100 100
             $this->set('taxonomy', $this->model->taxonomy)
101
-                 ->set('fields', 'all');
101
+                    ->set('fields', 'all');
102 102
         } elseif ($this->taxonomy) {
103 103
             $this->set('taxonomy', $this->taxonomy);
104 104
         }
Please login to merge, or discard this patch.
src/Post/QueryBuilder.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
     {
124 124
         if ($this->model) {
125 125
             $this->set('post_type', $this->model->post_type)
126
-                 ->set('fields', ''); // as WP_Post objects
126
+                    ->set('fields', ''); // as WP_Post objects
127 127
         }
128 128
 
129 129
         return $this->query->get_posts();
Please login to merge, or discard this 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.
src/Query/Builder.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,9 +54,9 @@
 block discarded – undo
54 54
         $modelClass = get_class($this->model);
55 55
 
56 56
         return Collection::make($this->query())
57
-                         ->map(function ($result) use ($modelClass) {
58
-                             return new $modelClass($result);
59
-                         });
57
+                            ->map(function ($result) use ($modelClass) {
58
+                                return new $modelClass($result);
59
+                            });
60 60
     }
61 61
 
62 62
     /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
         $modelClass = get_class($this->model);
55 55
 
56 56
         return Collection::make($this->query())
57
-                         ->map(function ($result) use ($modelClass) {
57
+                         ->map(function($result) use ($modelClass) {
58 58
                              return new $modelClass($result);
59 59
                          });
60 60
     }
Please login to merge, or discard this patch.
src/Type/ObjectAliases.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -195,7 +195,7 @@
 block discarded – undo
195 195
     /**
196 196
      * Get a property from the aliased object by the model's key.
197 197
      *
198
-     * @param $key
198
+     * @param string $key
199 199
      *
200 200
      * @return mixed|null
201 201
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      */
30 30
     protected function aliasGet($key)
31 31
     {
32
-        if (! $expanded = $this->expandAlias($key)) {
32
+        if (!$expanded = $this->expandAlias($key)) {
33 33
             return null;
34 34
         }
35 35
 
Please login to merge, or discard this patch.