@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | use Silk\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 | * |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | } |
20 | 20 | endif; |
21 | 21 | |
22 | -if (! function_exists('off')) : |
|
22 | +if (!function_exists('off')) : |
|
23 | 23 | /** |
24 | 24 | * Remove an event listener |
25 | 25 | * |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | return $removed; |
36 | 36 | } |
37 | 37 | |
38 | - return on($handle, function ($given = null) use ($handle, $callback, $priority) { |
|
38 | + return on($handle, function($given = null) use ($handle, $callback, $priority) { |
|
39 | 39 | remove_filter($handle, $callback, $priority); |
40 | 40 | return $given; |
41 | 41 | })->withPriority($priority - 1); |
@@ -69,7 +69,7 @@ |
||
69 | 69 | */ |
70 | 70 | protected function handler() |
71 | 71 | { |
72 | - return ''; // Override this in a sub-class |
|
72 | + return ''; // Override this in a sub-class |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -49,7 +49,7 @@ |
||
49 | 49 | */ |
50 | 50 | public function collect() |
51 | 51 | { |
52 | - return Collection::make($this->toArray())->map(function ($value, $key) { |
|
52 | + return Collection::make($this->toArray())->map(function($value, $key) { |
|
53 | 53 | return new Meta($this->type, $this->id, $key); |
54 | 54 | }); |
55 | 55 | } |
@@ -31,7 +31,7 @@ |
||
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 | } |
@@ -44,10 +44,10 @@ |
||
44 | 44 | abstract public static function typeId(); |
45 | 45 | |
46 | 46 | /** |
47 | - * Get a new query builder for the model. |
|
48 | - * |
|
49 | - * @return \Silk\Contracts\BuildsQueries |
|
50 | - */ |
|
47 | + * Get a new query builder for the model. |
|
48 | + * |
|
49 | + * @return \Silk\Contracts\BuildsQueries |
|
50 | + */ |
|
51 | 51 | abstract public function newQuery(); |
52 | 52 | |
53 | 53 | /** |
@@ -195,7 +195,7 @@ |
||
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 | */ |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | */ |
200 | 200 | protected function aliasGet($key) |
201 | 201 | { |
202 | - if (! $expanded = $this->expandAlias($key)) { |
|
202 | + if (!$expanded = $this->expandAlias($key)) { |
|
203 | 203 | return null; |
204 | 204 | } |
205 | 205 | |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | return $this->object; |
246 | 246 | } |
247 | 247 | |
248 | - if (! is_null($aliased = $this->aliasGet($property))) { |
|
248 | + if (!is_null($aliased = $this->aliasGet($property))) { |
|
249 | 249 | return $aliased; |
250 | 250 | } |
251 | 251 | |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | */ |
265 | 265 | public function __isset($property) |
266 | 266 | { |
267 | - return ! is_null($this->__get($property)); |
|
267 | + return !is_null($this->__get($property)); |
|
268 | 268 | } |
269 | 269 | |
270 | 270 | /** |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | return $this->object->$property; |
51 | 51 | } |
52 | 52 | |
53 | - if (! array_key_exists($property, $this->objectAliases)) { |
|
53 | + if (!array_key_exists($property, $this->objectAliases)) { |
|
54 | 54 | return null; |
55 | 55 | } |
56 | 56 | |
@@ -66,6 +66,6 @@ discard block |
||
66 | 66 | */ |
67 | 67 | public function __isset($property) |
68 | 68 | { |
69 | - return ! is_null($this->__get($property)); |
|
69 | + return !is_null($this->__get($property)); |
|
70 | 70 | } |
71 | 71 | } |
@@ -106,7 +106,7 @@ |
||
106 | 106 | */ |
107 | 107 | protected function labels() |
108 | 108 | { |
109 | - if (! $this->labels) { |
|
109 | + if (!$this->labels) { |
|
110 | 110 | $this->labels = Labels::make( |
111 | 111 | $this->labelDefaults |
112 | 112 | )->merge($this->args->get('labels', [])); |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | */ |
45 | 45 | public function __construct($taxonomy) |
46 | 46 | { |
47 | - if (empty($taxonomy->name) || ! static::exists($taxonomy->name)) { |
|
47 | + if (empty($taxonomy->name) || !static::exists($taxonomy->name)) { |
|
48 | 48 | throw new NonExistentTaxonomyException; |
49 | 49 | } |
50 | 50 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | return static::load($identifier); |
67 | 67 | } |
68 | 68 | |
69 | - if (! $identifier || strlen($identifier) > 32) { |
|
69 | + if (!$identifier || strlen($identifier) > 32) { |
|
70 | 70 | throw new InvalidTaxonomyNameException('Taxonomy names must be between 1 and 32 characters in length.'); |
71 | 71 | } |
72 | 72 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | */ |
85 | 85 | public static function load($identifier) |
86 | 86 | { |
87 | - if (! $object = get_taxonomy($identifier)) { |
|
87 | + if (!$object = get_taxonomy($identifier)) { |
|
88 | 88 | throw new NonExistentTaxonomyException("No taxonomy exists with name '$identifier'."); |
89 | 89 | } |
90 | 90 | |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | public function postTypes() |
122 | 122 | { |
123 | 123 | return Collection::make($this->object_type) |
124 | - ->map(function ($post_type) { |
|
124 | + ->map(function($post_type) { |
|
125 | 125 | return PostType::load($post_type); |
126 | 126 | }); |
127 | 127 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | */ |
137 | 137 | public function unregister() |
138 | 138 | { |
139 | - if (! $this->exists($this->id)) { |
|
139 | + if (!$this->exists($this->id)) { |
|
140 | 140 | throw new NonExistentTaxonomyException; |
141 | 141 | } |
142 | 142 |
@@ -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 |