Skip to content

Commit

Permalink
Merge pull request #2 from ebidtech/ebf-1124-ebt-validator-performanc…
Browse files Browse the repository at this point in the history
…e-issues

Refactor validator to ebt-validator
  • Loading branch information
eb-jtorres committed Aug 5, 2015
2 parents 9f05655 + bffae42 commit db36d23
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"minimum-stability": "stable",
"require": {
"php": ">=5.4",
"ebidtech/validator": "0.1.*",
"ebidtech/ebt-validator": "1.*",
"ebidtech/collection": "2.0.*"
},
"require-dev": {
Expand Down
4 changes: 2 additions & 2 deletions src/EBT/CommonObject/Id/Id.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace EBT\CommonObject\Id;

use EBT\Validator\ValidatorExtended;
use EBT\Validator\Model\Validator\Validator;
use EBT\CommonObject\Exception\InvalidArgumentException;

/**
Expand Down Expand Up @@ -43,7 +43,7 @@ public function __construct($id)
*/
protected function setId($id)
{
if (!ValidatorExtended::isPositiveInteger($id)) {
if (!Validator::isRequiredPositiveInteger($id)) {
throw InvalidArgumentException::notPositiveInteger('id', $id);
}

Expand Down
4 changes: 2 additions & 2 deletions src/EBT/CommonObject/Id/IdSetFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace EBT\CommonObject\Id;

use EBT\Validator\ValidatorBasicExtended;
use EBT\Validator\Model\Validator\Validator;
use EBT\CommonObject\Exception\InvalidArgumentException;

/**
Expand Down Expand Up @@ -44,7 +44,7 @@ public static function fromArray(array $idsArr)
*/
public static function fromString($idsStr)
{
if (!ValidatorBasicExtended::isTypeString($idsStr)) {
if (!Validator::isOptionalString($idsStr)) {
throw InvalidArgumentException::notString('ids', $idsStr);
}

Expand Down

0 comments on commit db36d23

Please sign in to comment.