| @@ -101,7 +101,7 @@ discard block | ||
| 101 | 101 | |
| 102 | 102 | public function use(string $resource): self | 
| 103 | 103 |      { | 
| 104 | -        if (! $this->resources->pluck('name')->contains($resource)) { | |
| 104 | +        if (!$this->resources->pluck('name')->contains($resource)) { | |
| 105 | 105 |              throw new ResourceNotRegistered("No resource registered for: {$resource}"); | 
| 106 | 106 | } | 
| 107 | 107 | |
| @@ -110,14 +110,14 @@ discard block | ||
| 110 | 110 | return $this; | 
| 111 | 111 | } | 
| 112 | 112 | |
| 113 | - public function getResource():? array | |
| 113 | + public function getResource(): ? array | |
| 114 | 114 |      { | 
| 115 | 115 | return $this->resource; | 
| 116 | 116 | } | 
| 117 | 117 | |
| 118 | 118 | public function get(string $method = 'GET') | 
| 119 | 119 |      { | 
| 120 | -        if (! $this->checkAbility('get')) { | |
| 120 | +        if (!$this->checkAbility('get')) { | |
| 121 | 121 |              throw new MethodNotAllowed("Method get is not available on this resource"); | 
| 122 | 122 | } | 
| 123 | 123 | |
| @@ -126,16 +126,16 @@ discard block | ||
| 126 | 126 | |
| 127 | 127 | public function find($identifier, string $method = 'GET') | 
| 128 | 128 |      { | 
| 129 | -        if (! $this->checkAbility('find')) { | |
| 129 | +        if (!$this->checkAbility('find')) { | |
| 130 | 130 |              throw new MethodNotAllowed("Method find is not available on this resource"); | 
| 131 | 131 | } | 
| 132 | 132 | |
| 133 | - return $this->call($method, $this->resource['endpoint'] . '/' . (string) $identifier); | |
| 133 | + return $this->call($method, $this->resource['endpoint'].'/'.(string) $identifier); | |
| 134 | 134 | } | 
| 135 | 135 | |
| 136 | 136 | public function create(array $data) | 
| 137 | 137 |      { | 
| 138 | -        if (! $this->checkAbility('create')) { | |
| 138 | +        if (!$this->checkAbility('create')) { | |
| 139 | 139 |              throw new MethodNotAllowed("Method create is not available on this resource"); | 
| 140 | 140 | } | 
| 141 | 141 | |
| @@ -144,20 +144,20 @@ discard block | ||
| 144 | 144 | |
| 145 | 145 | public function update($identifier, array $data, string $method = 'PUT') | 
| 146 | 146 |      { | 
| 147 | -        if (! $this->checkAbility('update')) { | |
| 147 | +        if (!$this->checkAbility('update')) { | |
| 148 | 148 |              throw new MethodNotAllowed("Method update is not available on this resource"); | 
| 149 | 149 | } | 
| 150 | 150 | |
| 151 | - return $this->call($method, $this->resource['endpoint'] . '/' . (string) $identifier, $data); | |
| 151 | + return $this->call($method, $this->resource['endpoint'].'/'.(string) $identifier, $data); | |
| 152 | 152 | } | 
| 153 | 153 | |
| 154 | 154 | public function delete($identifier, string $method = 'DELETE') | 
| 155 | 155 |      { | 
| 156 | -        if (! $this->checkAbility('delete')) { | |
| 156 | +        if (!$this->checkAbility('delete')) { | |
| 157 | 157 |              throw new MethodNotAllowed("Method delete is not available on this resource"); | 
| 158 | 158 | } | 
| 159 | 159 | |
| 160 | - return $this->call($method, $this->resource['endpoint'] . '/' . (string) $identifier); | |
| 160 | + return $this->call($method, $this->resource['endpoint'].'/'.(string) $identifier); | |
| 161 | 161 | } | 
| 162 | 162 | |
| 163 | 163 | public function append(...$appends): self | 
| @@ -203,7 +203,7 @@ discard block | ||
| 203 | 203 | $uri = ''; | 
| 204 | 204 | |
| 205 | 205 |          if ($this->getScheme() !== '') { | 
| 206 | - $uri .= $this->getScheme() . '://'; | |
| 206 | + $uri .= $this->getScheme().'://'; | |
| 207 | 207 | } | 
| 208 | 208 | |
| 209 | 209 |          if ($this->getHost() !== '') { | 
| @@ -212,9 +212,9 @@ discard block | ||
| 212 | 212 | |
| 213 | 213 | $uri .= rtrim($this->getPath(), '/'); | 
| 214 | 214 | |
| 215 | - $uri .= '/' . rtrim($endpoint, '/'); | |
| 215 | + $uri .= '/'.rtrim($endpoint, '/'); | |
| 216 | 216 | |
| 217 | - $uri .= '/' . rtrim($this->appends, '/'); | |
| 217 | + $uri .= '/'.rtrim($this->appends, '/'); | |
| 218 | 218 | |
| 219 | 219 | return $uri; | 
| 220 | 220 | } | 
| @@ -226,7 +226,7 @@ discard block | ||
| 226 | 226 |      { | 
| 227 | 227 | $scheme = strtolower($scheme); | 
| 228 | 228 | |
| 229 | -        if (! in_array($scheme, $this->allowedSchemes)) { | |
| 229 | +        if (!in_array($scheme, $this->allowedSchemes)) { | |
| 230 | 230 | throw new UnsupportedScheme( | 
| 231 | 231 |                  "The scheme `{$scheme}` isn't valid. It should be either `http` or `https`." | 
| 232 | 232 | ); |