Skip to content

Commit

Permalink
fixed some php 5.4 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
philiplb committed Jul 29, 2019
1 parent 0aeb63f commit 9197fe7
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 25 deletions.
4 changes: 1 addition & 3 deletions src/Valdi/Validator/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

namespace Valdi\Validator;

use const FILTER_VALIDATE_EMAIL;

/**
* Validator for e-mail addresses.
*/
Expand All @@ -24,7 +22,7 @@ class Email extends AbstractFilter
*/
public function getFilter()
{
return FILTER_VALIDATE_EMAIL;
return \FILTER_VALIDATE_EMAIL;
}

/**
Expand Down
4 changes: 1 addition & 3 deletions src/Valdi/Validator/Floating.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

namespace Valdi\Validator;

use const FILTER_VALIDATE_FLOAT;

/**
* Validator for floats. It's not named "Float" as it is a reserved class name
* in PHP7.
Expand All @@ -25,7 +23,7 @@ class Floating extends AbstractFilter
*/
protected function getFilter()
{
return FILTER_VALIDATE_FLOAT;
return \FILTER_VALIDATE_FLOAT;
}

/**
Expand Down
4 changes: 1 addition & 3 deletions src/Valdi/Validator/IP.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

namespace Valdi\Validator;

use const FILTER_VALIDATE_IP;

/**
* Validator for IPs.
*/
Expand All @@ -24,7 +22,7 @@ class IP extends AbstractFilter
*/
protected function getFilter()
{
return FILTER_VALIDATE_IP;
return \FILTER_VALIDATE_IP;
}

/**
Expand Down
7 changes: 2 additions & 5 deletions src/Valdi/Validator/IPv4.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@

namespace Valdi\Validator;

use const FILTER_FLAG_IPV4;
use const FILTER_VALIDATE_IP;

/**
* Validator for IP v4 addresses.
*/
Expand All @@ -25,15 +22,15 @@ class IPv4 extends AbstractFilter
*/
protected function getFilter()
{
return FILTER_VALIDATE_IP;
return \FILTER_VALIDATE_IP;
}

/**
* {@inheritdoc}
*/
protected function getFlags()
{
return FILTER_FLAG_IPV4;
return \FILTER_FLAG_IPV4;
}

/**
Expand Down
7 changes: 2 additions & 5 deletions src/Valdi/Validator/IPv6.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@

namespace Valdi\Validator;

use const FILTER_FLAG_IPV6;
use const FILTER_VALIDATE_IP;

/**
* Validator for floats.
*/
Expand All @@ -25,15 +22,15 @@ class IPv6 extends AbstractFilter
*/
protected function getFilter()
{
return FILTER_VALIDATE_IP;
return \FILTER_VALIDATE_IP;
}

/**
* {@inheritdoc}
*/
protected function getFlags()
{
return FILTER_FLAG_IPV6;
return \FILTER_FLAG_IPV6;
}

/**
Expand Down
4 changes: 1 addition & 3 deletions src/Valdi/Validator/Integer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

namespace Valdi\Validator;

use const FILTER_VALIDATE_INT;

/**
* Validator for integers.
*/
Expand All @@ -24,7 +22,7 @@ class Integer extends AbstractFilter
*/
protected function getFilter()
{
return FILTER_VALIDATE_INT;
return \FILTER_VALIDATE_INT;
}

/**
Expand Down
4 changes: 1 addition & 3 deletions src/Valdi/Validator/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

namespace Valdi\Validator;

use const FILTER_VALIDATE_URL;

/**
* Validator for Urls.
*/
Expand All @@ -24,7 +22,7 @@ class Url extends AbstractFilter
*/
public function getFilter()
{
return FILTER_VALIDATE_URL;
return \FILTER_VALIDATE_URL;
}

/**
Expand Down

0 comments on commit 9197fe7

Please sign in to comment.