Skip to content

Commit

Permalink
Remoção de concatenações
Browse files Browse the repository at this point in the history
  • Loading branch information
robsonvleite committed Jul 2, 2020
1 parent 2075a4b commit 88725a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/DataLayer.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function find(?string $terms = null, ?string $params = null, string $colu
*/
public function findById(int $id, string $columns = "*"): ?DataLayer
{
return $this->find($this->primary . " = :id", "id={$id}", $columns)->fetch();
return $this->find("{$this->primary} = :id", "id={$id}", $columns)->fetch();
}

/**
Expand Down Expand Up @@ -237,7 +237,7 @@ public function save(): bool
/** Update */
if (!empty($this->data->$primary)) {
$id = $this->data->$primary;
$this->update($this->safe(), $this->primary . " = :id", "id={$id}");
$this->update($this->safe(), "{$this->primary} = :id", "id={$id}");
}

/** Create */
Expand Down Expand Up @@ -269,7 +269,7 @@ public function destroy(): bool
return false;
}

return $this->delete($this->primary . " = :id", "id={$id}");
return $this->delete("{$this->primary} = :id", "id={$id}");
}

/**
Expand Down

0 comments on commit 88725a2

Please sign in to comment.