Completed
Push — master ( 26f772...f7e954 )
by Evan
05:13
created
src/User/Model.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     {
30 30
         $attributes = is_array($user) ? $user : [];
31 31
 
32
-        if (! $user instanceof WP_User) {
32
+        if (!$user instanceof WP_User) {
33 33
             $user = new WP_User();
34 34
         }
35 35
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public static function fromID($id)
51 51
     {
52
-        if (! $user = get_user_by('id', $id)) {
52
+        if (!$user = get_user_by('id', $id)) {
53 53
             throw new UserNotFoundException("No user found with ID $id");
54 54
         }
55 55
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public static function fromUsername($username)
69 69
     {
70
-        if (! $user = get_user_by('login', $username)) {
70
+        if (!$user = get_user_by('login', $username)) {
71 71
             throw new UserNotFoundException("No user found with username: $username");
72 72
         }
73 73
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public static function fromEmail($email)
87 87
     {
88
-        if (! $user = get_user_by('email', $email)) {
88
+        if (!$user = get_user_by('email', $email)) {
89 89
             throw new UserNotFoundException("No user found with email address: $email");
90 90
         }
91 91
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      */
104 104
     public static function fromSlug($slug)
105 105
     {
106
-        if (! $user = get_user_by('slug', $slug)) {
106
+        if (!$user = get_user_by('slug', $slug)) {
107 107
             throw new UserNotFoundException("No user found with slug: $slug");
108 108
         }
109 109
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
      */
150 150
     public function save()
151 151
     {
152
-        if (! $this->id) {
152
+        if (!$this->id) {
153 153
             $result = wp_insert_user($this->object);
154 154
         } else {
155 155
             $result = wp_update_user($this->object);
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
             'spam',
231 231
             'deleted',
232 232
         ])->diff(array_keys((array) $user->data))
233
-            ->each(function ($property) use ($user) {
233
+            ->each(function($property) use ($user) {
234 234
                 $user->data->$property = null; // exists but ! isset
235 235
             });
236 236
 
Please login to merge, or discard this patch.
src/Query/Builder.php 1 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/Model.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
             return $this->object;
197 197
         }
198 198
 
199
-        if (! is_null($aliased = $this->aliasGet($property))) {
199
+        if (!is_null($aliased = $this->aliasGet($property))) {
200 200
             return $aliased;
201 201
         }
202 202
 
@@ -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/Type/ObjectAliases.php 1 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.
src/Type/Type.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public function __get($property)
60 60
     {
61
-        if (! is_null($aliased = $this->aliasGet($property))) {
61
+        if (!is_null($aliased = $this->aliasGet($property))) {
62 62
             return $aliased;
63 63
         }
64 64
 
@@ -74,6 +74,6 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function __isset($property)
76 76
     {
77
-        return ! is_null($this->__get($property));
77
+        return !is_null($this->__get($property));
78 78
     }
79 79
 }
Please login to merge, or discard this patch.
src/PostType/PostType.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public function __construct($object)
21 21
     {
22
-        if (! is_object($object) || ! in_array(get_class($object), ['stdClass', 'WP_Post_Type'])) {
22
+        if (!is_object($object) || !in_array(get_class($object), ['stdClass', 'WP_Post_Type'])) {
23 23
             throw new \InvalidArgumentException(static::class . ' can only be constructed with a Post Type object.');
24 24
         }
25 25
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public static function load($id)
56 56
     {
57
-        if (! $object = get_post_type_object($id)) {
57
+        if (!$object = get_post_type_object($id)) {
58 58
             throw new NonExistentPostTypeException("No post type exists with name '$id'.");
59 59
         }
60 60
 
@@ -91,13 +91,13 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public function supports($features)
93 93
     {
94
-        if (! is_array($features)) {
94
+        if (!is_array($features)) {
95 95
             $features = func_get_args();
96 96
         }
97 97
 
98
-        return ! Collection::make($features)
99
-            ->contains(function ($key, $feature) {
100
-                return ! post_type_supports($this->id(), $feature);
98
+        return !Collection::make($features)
99
+            ->contains(function($key, $feature) {
100
+                return !post_type_supports($this->id(), $feature);
101 101
             });
102 102
     }
103 103
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
     public function removeSupportFor($features)
128 128
     {
129 129
         Collection::make(is_array($features) ? $features : func_get_args())
130
-            ->each(function ($features) {
130
+            ->each(function($features) {
131 131
                 remove_post_type_support($this->id(), $features);
132 132
             });
133 133
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
     {
147 147
         $id = $this->id();
148 148
 
149
-        if (! static::exists($id)) {
149
+        if (!static::exists($id)) {
150 150
             throw new NonExistentPostTypeException("No post type exists with name '{$id}'.");
151 151
         }
152 152
 
Please login to merge, or discard this patch.
src/Taxonomy/Taxonomy.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function __construct($taxonomy)
47 47
     {
48
-        if (empty($taxonomy->name) || ! static::exists($taxonomy->name)) {
48
+        if (empty($taxonomy->name) || !static::exists($taxonomy->name)) {
49 49
             throw new NonExistentTaxonomyException;
50 50
         }
51 51
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             return static::load($id);
68 68
         }
69 69
 
70
-        if (! $id || strlen($id) > 32) {
70
+        if (!$id || strlen($id) > 32) {
71 71
             throw new InvalidTaxonomyNameException('Taxonomy names must be between 1 and 32 characters in length.');
72 72
         }
73 73
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public static function load($id)
87 87
     {
88
-        if (! $object = get_taxonomy($id)) {
88
+        if (!$object = get_taxonomy($id)) {
89 89
             throw new NonExistentTaxonomyException("No taxonomy exists with name '$id'.");
90 90
         }
91 91
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
     public function postTypes()
143 143
     {
144 144
         return Collection::make($this->object_type)
145
-            ->map(function ($post_type) {
145
+            ->map(function($post_type) {
146 146
                 return PostType::load($post_type);
147 147
             });
148 148
     }
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      */
158 158
     public function unregister()
159 159
     {
160
-        if (! $this->exists($this->id())) {
160
+        if (!$this->exists($this->id())) {
161 161
             throw new NonExistentTaxonomyException;
162 162
         }
163 163
 
Please login to merge, or discard this patch.
src/Term/Model.php 1 patch
Spacing   +3 added lines, -3 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 = WP_Term::get_instance($id, static::TAXONOMY)) {
92
+        if (!$term = WP_Term::get_instance($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
 
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\Event\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
      *
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     }
21 21
 endif;
22 22
 
23
-if (! function_exists('off')) :
23
+if (!function_exists('off')) :
24 24
     /**
25 25
      * Remove an event listener.
26 26
      *
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
          * Here we add a new listener right before the hook is expected to fire,
44 44
          * so that if it is there, we can unhook it just in time.
45 45
          */
46
-        return on($handle, function ($given = null) use ($handle, $callback, $priority) {
46
+        return on($handle, function($given = null) use ($handle, $callback, $priority) {
47 47
             remove_filter($handle, $callback, $priority);
48 48
             return $given;
49 49
         })->withPriority($priority - 1);
Please login to merge, or discard this patch.