Skip to content

Commit

Permalink
Fixing issues #50, #51 and #52
Browse files Browse the repository at this point in the history
 - Remove var in bin/doc-readme acordding with issue #50
 - Update README.md acordding with issue #51
 - Define method Basicis\Model\Model::setId() to fix error acordding with issue #52
  • Loading branch information
messiasdias authored May 16, 2021
2 parents 093c41e + a617819 commit e651e63
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ As the name says, it is made to be basic and direct.

## Get Started

<p align="center">
<img width="80" src="https://raw.githubusercontent.com/basicis/core/master/storage/assets/img/logo.png"/>
</p>

Add library in to you project with Composer
```
composer require basicis/core
Expand All @@ -41,11 +45,11 @@ APP_TIMEZONE='America/Recife'

# For MySQL databases
#DB_DRIVER="pdo_mysql"
DB_HOST="127.0.0.1"
DB_PORT=3306
DB_NAME="dbname"
DB_USER="user"
DB_PASS="userpass"
#DB_HOST="127.0.0.1"
#DB_PORT=3306
#DB_NAME="dbname"
#DB_USER="user"
#DB_PASS="userpass"
#DATABASE_URL="${DB_DRIVER}://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}"

# For Sqlite database
Expand Down
9 changes: 4 additions & 5 deletions bin/doc-readme
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#!/usr/local/bin/php
<?php
require_once "vendor/autoload.php";
$path = __DIR__."/../";
$replace = "/Link to Documentation (.*)\n/";
$src = $path."README.md";
$dst = $path."docs/README.md";
$logo = $path."storage/assets/img/logo.png";
$copyDir = $path."docs/storage/assets/img/";
$src = "README.md";
$dst = "docs/README.md";
$logo = "storage/assets/img/logo.png";
$copyDir = "docs/storage/assets/img/";

if(file_exists($logo)) {
if(!is_dir($copyDir)) {
Expand Down
14 changes: 14 additions & 0 deletions src/Model/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,20 @@ public function getProtecteds() : array
return $this->protecteds;
}

/**
* Function setId
* Set entity ID (unique on system identification)
* @param int $id
* @return Model
*/
public function setId(int $id = null) : Model
{
if ($id > 0) {
$this->id = $id;
}
return $this;
}

/**
* Function getId
* Return entity ID (unique on system identification)
Expand Down

0 comments on commit e651e63

Please sign in to comment.