Skip to content

Commit

Permalink
big update: to php7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
lefuturiste committed Oct 7, 2018
1 parent 61bf78f commit 4f8de4c
Show file tree
Hide file tree
Showing 5 changed files with 322 additions and 337 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ vendor
composer.lock
.idea
.idea/
.idea/*
.idea/*
null
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"email": "contact@lefuturiste.fr"
}
],
"require": {},
"require": {
"ext-mbstring": "*"
},
"autoload": {
"psr-4": {
"Validator\\": "src"
Expand Down
6 changes: 2 additions & 4 deletions src/ValidationError.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ class ValidationError

private $attributes;

public function __construct($key, $rule, $attributes = [])
public function __construct(string $key, string $rule, $attributes = [])
{
$this->key = $key;
$this->rule = $rule;
$this->attributes = $attributes;

//chose the language
}

public function __toString()
public function __toString(): string
{
$params = array_merge([
ValidationLanguage::getMessages()[$this->rule],
Expand Down
Loading

0 comments on commit 4f8de4c

Please sign in to comment.