Completed
Branch develop (1ed5a2)
by Evan
03:01
created
src/Type/Labels.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      */
32 32
     public function replaced()
33 33
     {
34
-        return $this->map(function ($label) {
34
+        return $this->map(function($label) {
35 35
             return $this->replaceWithForm($label);
36 36
         });
37 37
     }
Please login to merge, or discard this patch.
src/PostType/PostType.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     /**
84 84
      * Get the post type object.
85 85
      *
86
-     * @return object
86
+     * @return stdClass
87 87
      */
88 88
     public function object()
89 89
     {
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      * @param string,...|array $features  string - First feature of possible many,
97 97
      *                                    array - Many features to check support for.
98 98
      *
99
-     * @return mixed
99
+     * @return boolean
100 100
      */
101 101
     public function supports($features)
102 102
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public static function load($slug)
63 63
     {
64
-        if (! $object = get_post_type_object($slug)) {
64
+        if ( ! $object = get_post_type_object($slug)) {
65 65
             throw new NonExistentPostTypeException("No post type exists with name '$slug'.");
66 66
         }
67 67
 
@@ -98,12 +98,12 @@  discard block
 block discarded – undo
98 98
      */
99 99
     public function supports($features)
100 100
     {
101
-        if (! is_array($features)) {
101
+        if ( ! is_array($features)) {
102 102
             $features = func_get_args();
103 103
         }
104 104
 
105 105
         return ! collect($features)
106
-            ->contains(function ($key, $feature) {
106
+            ->contains(function($key, $feature) {
107 107
                 return ! post_type_supports($this->slug, $feature);
108 108
             });
109 109
     }
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     public function removeSupportFor($features)
131 131
     {
132 132
         collect(is_array($features) ? $features : func_get_args())
133
-            ->each(function ($features) {
133
+            ->each(function($features) {
134 134
                 remove_post_type_support($this->slug, $features);
135 135
             });
136 136
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      */
145 145
     public function unregister()
146 146
     {
147
-        if (! static::exists($this->slug)) {
147
+        if ( ! static::exists($this->slug)) {
148 148
             throw new NonExistentPostTypeException("No post type exists with name '{$this->slug}'.");
149 149
         }
150 150
 
Please login to merge, or discard this patch.
src/Support/Callback.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,9 +25,9 @@
 block discarded – undo
25 25
      *
26 26
      * Converts string static class method to standard callable array.
27 27
      *
28
-     * @param  mixed $callback  Target callback
28
+     * @param  callable $callback  Target callback
29 29
      *
30
-     * @return mixed Closure    Anonymous function
30
+     * @return callable Closure    Anonymous function
31 31
      *               array      Class method
32 32
      *               string     Function
33 33
      */
Please login to merge, or discard this patch.
src/Taxonomy/Builder.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Silk\Taxonomy\Taxonomy;
6 6
 use Silk\Type\Builder as TypeBuilder;
7 7
 use Silk\Exception\WP_ErrorException;
8
-use Illuminate\Support\Collection;
9 8
 
10 9
 class Builder extends TypeBuilder
11 10
 {
Please login to merge, or discard this patch.
src/Post/QueryBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
         $modelClass = $this->model ? get_class($this->model) : Post::class;
74 74
 
75 75
         return Collection::make($this->query->get_posts())
76
-            ->map(function ($post) use ($modelClass) {
76
+            ->map(function($post) use ($modelClass) {
77 77
                 return new $modelClass($post);
78 78
             });
79 79
     }
Please login to merge, or discard this patch.
src/PostType/Builder.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
      */
75 75
     public function supports($features)
76 76
     {
77
-        if (! is_array($features)) {
77
+        if ( ! is_array($features)) {
78 78
             $features = func_get_args();
79 79
         }
80 80
 
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Silk\Taxonomy\Taxonomy;
6 6
 use Silk\Type\Builder as TypeBuilder;
7 7
 use Silk\Exception\WP_ErrorException;
8
-use Illuminate\Support\Collection;
9 8
 
10 9
 class Builder extends TypeBuilder
11 10
 {
Please login to merge, or discard this patch.
src/Taxonomy/Taxonomy.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     public function postTypes()
111 111
     {
112 112
         return Collection::make($this->object_type)
113
-            ->map(function ($post_type) {
113
+            ->map(function($post_type) {
114 114
                 return PostType::load($post_type);
115 115
             });
116 116
     }
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      */
126 126
     public function unregister()
127 127
     {
128
-        if (! $this->exists($this->id)) {
128
+        if ( ! $this->exists($this->id)) {
129 129
             throw new Exception\NonExistentTaxonomyException;
130 130
         }
131 131
 
Please login to merge, or discard this patch.
src/Term/QueryBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
         $modelClass = get_class($this->model);
107 107
 
108 108
         return Collection::make($this->fetchTerms())
109
-            ->map(function (WP_Term $term) use ($modelClass) {
109
+            ->map(function(WP_Term $term) use ($modelClass) {
110 110
                 return new $modelClass($term);
111 111
             });
112 112
     }
Please login to merge, or discard this patch.