@@ -148,9 +148,9 @@ discard block |
||
| 148 | 148 | */ |
| 149 | 149 | private function deny() |
| 150 | 150 | { |
| 151 | - if(!empty($this->excepts)) { |
|
| 152 | - foreach($this->excepts as $except) { |
|
| 153 | - if(isset($this->data[$except])) unset($this->data[$except]); |
|
| 151 | + if (!empty($this->excepts)) { |
|
| 152 | + foreach ($this->excepts as $except) { |
|
| 153 | + if (isset($this->data[$except])) unset($this->data[$except]); |
|
| 154 | 154 | } |
| 155 | 155 | } |
| 156 | 156 | } |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | $data = json_decode(json_encode($this->data), true); |
| 227 | 227 | if (empty($primary) || !isset($data[$primary])) { |
| 228 | 228 | $this->error("Índice primário não encontrado: {$primary}.", __FUNCTION__); |
| 229 | - } else if(!$this->find($data[$primary])->execute()) { |
|
| 229 | + } else if (!$this->find($data[$primary])->execute()) { |
|
| 230 | 230 | $this->error("Esse registro não consta no banco de dados: {$data[$primary]}.", __FUNCTION__); |
| 231 | 231 | } |
| 232 | 232 | |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | public function create() |
| 254 | 254 | { |
| 255 | 255 | $request = $this->request; |
| 256 | - if(empty($request)) { |
|
| 256 | + if (empty($request)) { |
|
| 257 | 257 | $this->error("O array request está vazio!", __FUNCTION__); |
| 258 | 258 | } |
| 259 | 259 | |
@@ -269,6 +269,6 @@ discard block |
||
| 269 | 269 | * @return Error|null |
| 270 | 270 | */ |
| 271 | 271 | public function error(String $message, String $function): ?Error { |
| 272 | - if($message) { throw new Error($message." Método: ".strtoupper($function)); } else { return null; }; |
|
| 272 | + if ($message) { throw new Error($message . " Método: " . strtoupper($function)); } else { return null; }; |
|
| 273 | 273 | } |
| 274 | 274 | } |
| 275 | 275 | \ No newline at end of file |
@@ -150,7 +150,9 @@ |
||
| 150 | 150 | { |
| 151 | 151 | if(!empty($this->excepts)) { |
| 152 | 152 | foreach($this->excepts as $except) { |
| 153 | - if(isset($this->data[$except])) unset($this->data[$except]); |
|
| 153 | + if(isset($this->data[$except])) { |
|
| 154 | + unset($this->data[$except]); |
|
| 155 | + } |
|
| 154 | 156 | } |
| 155 | 157 | } |
| 156 | 158 | } |