@@ -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 | /** |
@@ -193,7 +193,7 @@ |
||
| 193 | 193 | */ |
| 194 | 194 | public function __isset($property) |
| 195 | 195 | { |
| 196 | - return ! is_null($this->__get($property)); |
|
| 196 | + return !is_null($this->__get($property)); |
|
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | /** |
@@ -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', [])); |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | */ |
| 127 | 127 | public function mediateCallback($given = null) |
| 128 | 128 | { |
| 129 | - if (! $this->shouldInvoke(func_get_args())) { |
|
| 129 | + if (!$this->shouldInvoke(func_get_args())) { |
|
| 130 | 130 | return $given; |
| 131 | 131 | } |
| 132 | 132 | |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | * Check if any of the conditions returns false, |
| 151 | 151 | * if so, do not invoke. |
| 152 | 152 | */ |
| 153 | - return ! $this->conditions()->contains(function ($key, $callback) use ($arguments) { |
|
| 153 | + return !$this->conditions()->contains(function($key, $callback) use ($arguments) { |
|
| 154 | 154 | return false === $callback->callArray($arguments); |
| 155 | 155 | }); |
| 156 | 156 | } |
@@ -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 | |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | */ |
| 67 | 67 | public function __construct(WP_Post $post = null) |
| 68 | 68 | { |
| 69 | - if (! $post) { |
|
| 69 | + if (!$post) { |
|
| 70 | 70 | $post = new WP_Post(new stdClass); |
| 71 | 71 | $post->post_type = static::postTypeId(); |
| 72 | 72 | } |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | */ |
| 134 | 134 | public static function fromGlobal() |
| 135 | 135 | { |
| 136 | - if (! $GLOBALS['post'] instanceof WP_Post) { |
|
| 136 | + if (!$GLOBALS['post'] instanceof WP_Post) { |
|
| 137 | 137 | throw new PostNotFoundException('Global $post not an instance of WP_Post'); |
| 138 | 138 | } |
| 139 | 139 | |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | { |
| 10 | 10 | public function execute() |
| 11 | 11 | { |
| 12 | - if (! $this->model->id) { |
|
| 12 | + if (!$this->model->id) { |
|
| 13 | 13 | $result = wp_insert_post($this->model->object->to_array(), true); |
| 14 | 14 | } else { |
| 15 | 15 | $result = wp_update_post($this->model->object, true); |
@@ -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 | |