Skip to content

Commit

Permalink
- Add the isUrl validator.
Browse files Browse the repository at this point in the history
- Add var dump check.
- Define return type for several methods.
  • Loading branch information
Luis Nobrega committed Feb 25, 2018
1 parent dfb661b commit 50cf09e
Show file tree
Hide file tree
Showing 13 changed files with 1,344 additions and 344 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
- Add the following validator isUrl.
- Refactor unit tests to mock also PHP built-in methods.
- Add type casting.

## [1.0.5] - 2018-02-25
### Added
- Add the isUrl validator.
- Add var dump check.
- Define return type for several methods.

## [1.0.4] - 2018-02-21
### Added
- Added the following validator: isEmail.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ This is a Base Model that can be extended to define Models. It helps handling da
* isNull
* isNotNull
* isArray
* isEmail
* Model to array and JSON, preserving hidden attributes.
* Define attributes using arrays of data.
* Can define, when validation fails, if an exception is thrown.
Expand Down
20 changes: 14 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lfbn/base-model",
"version": "1.0.4",
"description": "This is a Base Model that can be extended to define Models. It helps handling data validation, and data conversion.",
"version": "1.0.5",
"description": "This is a Base Model that can be extended to define Models. It helps handling data validation, and extracting data.",
"keywords": ["validation", "model"],
"homepage": "https://github.com/lfbn/base-model",
"license": "MIT",
Expand All @@ -21,16 +21,19 @@
"squizlabs/php_codesniffer": "^3.2",
"phpunit/php-code-coverage": "^6.0",
"jakub-onderka/php-parallel-lint": "^0.9.2",
"jakub-onderka/php-console-highlighter": "^0.3.2"
"jakub-onderka/php-console-highlighter": "^0.3.2",
"jakub-onderka/php-var-dump-check": "^0.2.0"
},
"scripts": {
"lint": "parallel-lint src tests",
"phpunit": "phpunit --verbose --colors=always --testdox",
"var-dump-check": "var-dump-check src tests",
"phpcs": "phpcs src tests --standard=psr2 -sp --colors",
"phpunit": "phpunit --verbose --colors=always --testdox",
"tests": [
"@lint",
"@phpunit",
"@phpcs"
"@var-dump-check",
"@phpcs",
"@phpunit"
]
},
"config": {
Expand All @@ -40,5 +43,10 @@
"psr-4": {
"Lfbn\\BaseModel\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Lfbn\\BaseModel\\Tests\\": "tests/"
}
}
}
Loading

0 comments on commit 50cf09e

Please sign in to comment.