@@ -45,7 +45,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -174,7 +174,7 @@ |
||
| 174 | 174 | public function children() |
| 175 | 175 | { |
| 176 | 176 | return Collection::make(get_term_children($this->id, static::TAXONOMY)) |
| 177 | - ->map([static::class, 'fromID']); |
|
| 177 | + ->map([static::class, 'fromID']); |
|
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | /** |
@@ -53,7 +53,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | |