Skip to content

Commit

Permalink
correcoes de documentacao
Browse files Browse the repository at this point in the history
  • Loading branch information
brunobmorais committed Sep 10, 2022
1 parent a71f133 commit 9158749
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Crud.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ abstract class Crud {
*/
public function select(string $fields = "*", string $add = "", array $values = null, bool $returnModel = false, bool $debug = false)
{
if (strlen($add) > 0) { $add = " " . $add; }
if (strlen($add)>0) { $add = " " . $add; }
$sql = "SELECT {$fields} FROM {$this->tableName}{$add}";
if ($debug) { echo $sql; die(); }
if ($returnModel) {
Expand Down Expand Up @@ -64,7 +64,7 @@ public function update(string $fields, array $values = null, string $where = nul
$fields_T = "";
$atributos = explode(",", $fields);

foreach($atributos as $item) { $fields_T .= ", {$item} = ?"; }
foreach ($atributos as $item) { $fields_T .= ", {$item} = ?"; }
$fields_T = substr($fields_T, 2);
$sql = "UPDATE {$this->tableName} SET {$fields_T}";
if (isset($where)) { $sql .= " WHERE $where"; }
Expand All @@ -89,7 +89,8 @@ public function delete(array $values = null, string $where = null, bool $debug =
/**
* @return false|string
*/
public function lastInsertId(){
public function lastInsertId()
{
return $this->lastId();
}

Expand Down

0 comments on commit 9158749

Please sign in to comment.