@@ -42,7 +42,7 @@ |
||
| 42 | 42 | /** |
| 43 | 43 | * Model Constructor. |
| 44 | 44 | * |
| 45 | - * @param mixed $term WP_Term to fill data from |
|
| 45 | + * @param null|WP_Term $term WP_Term to fill data from |
|
| 46 | 46 | */ |
| 47 | 47 | public function __construct(WP_Term $term = null) |
| 48 | 48 | { |
@@ -5,7 +5,6 @@ |
||
| 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 | { |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | */ |
| 68 | 68 | public function register() |
| 69 | 69 | { |
| 70 | - if (! $this->id || strlen($this->id) > 32) { |
|
| 70 | + if ( ! $this->id || strlen($this->id) > 32) { |
|
| 71 | 71 | throw new InvalidTaxonomyNameException('Taxonomy names must be between 1 and 32 characters in length.'); |
| 72 | 72 | } |
| 73 | 73 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | return new static(get_taxonomy($identifier)); |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | - if (! $identifier || strlen($identifier) > 32) { |
|
| 84 | + if ( ! $identifier || strlen($identifier) > 32) { |
|
| 85 | 85 | throw new InvalidTaxonomyNameException('Taxonomy names must be between 1 and 32 characters in length.'); |
| 86 | 86 | } |
| 87 | 87 | |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | public function postTypes() |
| 119 | 119 | { |
| 120 | 120 | return Collection::make($this->object_type) |
| 121 | - ->map(function ($post_type) { |
|
| 121 | + ->map(function($post_type) { |
|
| 122 | 122 | return PostType::load($post_type); |
| 123 | 123 | }); |
| 124 | 124 | } |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | */ |
| 134 | 134 | public function unregister() |
| 135 | 135 | { |
| 136 | - if (! $this->exists($this->id)) { |
|
| 136 | + if ( ! $this->exists($this->id)) { |
|
| 137 | 137 | throw new NonExistentTaxonomyException; |
| 138 | 138 | } |
| 139 | 139 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | public function supports($features) |
| 45 | 45 | { |
| 46 | - if (! is_array($features)) { |
|
| 46 | + if ( ! is_array($features)) { |
|
| 47 | 47 | $features = func_get_args(); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | */ |
| 98 | 98 | public function register() |
| 99 | 99 | { |
| 100 | - if (! $this->id || strlen($this->id) > 20) { |
|
| 100 | + if ( ! $this->id || strlen($this->id) > 20) { |
|
| 101 | 101 | throw new InvalidPostTypeNameException('Post type names must be between 1 and 20 characters in length.'); |
| 102 | 102 | } |
| 103 | 103 | |