Declare visibility for constants

Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
This commit is contained in:
Henrique Moody 2018-05-10 21:19:42 +02:00
parent aa4b111c90
commit 5d0ecabfdc
No known key found for this signature in database
GPG key ID: 221E9281655813A6
23 changed files with 43 additions and 43 deletions

View file

@ -15,7 +15,7 @@ namespace Respect\Validation\Exceptions;
class AlphaException extends ValidationException
{
const EXTRA = 1;
public const EXTRA = 1;
public static $defaultTemplates = [
self::MODE_DEFAULT => [

View file

@ -15,7 +15,7 @@ namespace Respect\Validation\Exceptions;
class AlwaysInvalidException extends ValidationException
{
const SIMPLE = 1;
public const SIMPLE = 1;
public static $defaultTemplates = [
self::MODE_DEFAULT => [

View file

@ -15,8 +15,8 @@ namespace Respect\Validation\Exceptions;
class AttributeException extends NestedValidationException implements NonOmissibleExceptionInterface
{
const NOT_PRESENT = 0;
const INVALID = 1;
public const NOT_PRESENT = 0;
public const INVALID = 1;
public static $defaultTemplates = [
self::MODE_DEFAULT => [
self::NOT_PRESENT => 'Attribute {{name}} must be present',

View file

@ -15,7 +15,7 @@ namespace Respect\Validation\Exceptions;
class CreditCardException extends ValidationException
{
const BRANDED = 1;
public const BRANDED = 1;
public static $defaultTemplates = [
self::MODE_DEFAULT => [

View file

@ -15,8 +15,8 @@ namespace Respect\Validation\Exceptions;
class GroupedValidationException extends NestedValidationException
{
const NONE = 0;
const SOME = 1;
public const NONE = 0;
public const SOME = 1;
public static $defaultTemplates = [
self::MODE_DEFAULT => [

View file

@ -15,8 +15,8 @@ namespace Respect\Validation\Exceptions;
class IpException extends ValidationException
{
const STANDARD = 0;
const NETWORK_RANGE = 1;
public const STANDARD = 0;
public const NETWORK_RANGE = 1;
public static $defaultTemplates = [
self::MODE_DEFAULT => [

View file

@ -15,7 +15,7 @@ namespace Respect\Validation\Exceptions;
class KeySetException extends GroupedValidationException implements NonOmissibleExceptionInterface
{
const STRUCTURE = 2;
public const STRUCTURE = 2;
/**
* @var array

View file

@ -15,7 +15,7 @@ namespace Respect\Validation\Exceptions;
class KeyValueException extends ValidationException
{
const COMPONENT = 1;
public const COMPONENT = 1;
public static $defaultTemplates = [
self::MODE_DEFAULT => [

View file

@ -15,10 +15,10 @@ namespace Respect\Validation\Exceptions;
class LengthException extends ValidationException
{
const BOTH = 0;
const LOWER = 1;
const GREATER = 2;
const EXACT = 3;
public const BOTH = 0;
public const LOWER = 1;
public const GREATER = 2;
public const EXACT = 3;
public static $defaultTemplates = [
self::MODE_DEFAULT => [

View file

@ -15,7 +15,7 @@ namespace Respect\Validation\Exceptions;
class MaxException extends ValidationException
{
const INCLUSIVE = 1;
public const INCLUSIVE = 1;
public static $defaultTemplates = [
self::MODE_DEFAULT => [

View file

@ -15,7 +15,7 @@ namespace Respect\Validation\Exceptions;
class MinException extends ValidationException
{
const INCLUSIVE = 1;
public const INCLUSIVE = 1;
public static $defaultTemplates = [
self::MODE_DEFAULT => [

View file

@ -15,8 +15,8 @@ namespace Respect\Validation\Exceptions;
class NotBlankException extends ValidationException
{
const STANDARD = 0;
const NAMED = 1;
public const STANDARD = 0;
public const NAMED = 1;
public static $defaultTemplates = [
self::MODE_DEFAULT => [

View file

@ -19,8 +19,8 @@ namespace Respect\Validation\Exceptions;
*/
final class NotEmptyException extends ValidationException
{
const STANDARD = 0;
const NAMED = 1;
public const STANDARD = 0;
public const NAMED = 1;
public static $defaultTemplates = [
self::MODE_DEFAULT => [
self::STANDARD => 'The value must not be empty',

View file

@ -15,8 +15,8 @@ namespace Respect\Validation\Exceptions;
class NotOptionalException extends ValidationException
{
const STANDARD = 0;
const NAMED = 1;
public const STANDARD = 0;
public const NAMED = 1;
public static $defaultTemplates = [
self::MODE_DEFAULT => [

View file

@ -15,8 +15,8 @@ namespace Respect\Validation\Exceptions;
class OptionalException extends ValidationException
{
const STANDARD = 0;
const NAMED = 1;
public const STANDARD = 0;
public const NAMED = 1;
public static $defaultTemplates = [
self::MODE_DEFAULT => [

View file

@ -20,9 +20,9 @@ use function Respect\Stringifier\stringify;
class ValidationException extends InvalidArgumentException implements ExceptionInterface
{
const MODE_DEFAULT = 1;
const MODE_NEGATIVE = 2;
const STANDARD = 0;
public const MODE_DEFAULT = 1;
public const MODE_NEGATIVE = 2;
public const STANDARD = 0;
public static $defaultTemplates = [
self::MODE_DEFAULT => [
self::STANDARD => '{{name}} must be valid',

View file

@ -15,7 +15,7 @@ namespace Respect\Validation\Exceptions;
class VideoUrlException extends ValidationException
{
const SERVICE = 1;
public const SERVICE = 1;
public static $defaultTemplates = [
self::MODE_DEFAULT => [

View file

@ -20,9 +20,9 @@ use Respect\Validation\Exceptions\ComponentException;
*/
class CountryCode extends AbstractRule
{
const ALPHA2 = 'alpha-2';
const ALPHA3 = 'alpha-3';
const NUMERIC = 'numeric';
public const ALPHA2 = 'alpha-2';
public const ALPHA3 = 'alpha-3';
public const NUMERIC = 'numeric';
/**
* @see http://download.geonames.org/export/dump/countryInfo.txt

View file

@ -17,12 +17,12 @@ use Respect\Validation\Exceptions\ComponentException;
class CreditCard extends AbstractRule
{
const AMERICAN_EXPRESS = 'American Express';
const DINERS_CLUB = 'Diners Club';
const DISCOVER = 'Discover';
const JCB = 'JCB';
const MASTERCARD = 'MasterCard';
const VISA = 'Visa';
public const AMERICAN_EXPRESS = 'American Express';
public const DINERS_CLUB = 'Diners Club';
public const DISCOVER = 'Discover';
public const JCB = 'JCB';
public const MASTERCARD = 'MasterCard';
public const VISA = 'Visa';
/**
* @var string

View file

@ -15,7 +15,7 @@ namespace Respect\Validation\Rules;
class Imei extends AbstractRule
{
const IMEI_SIZE = 15;
public const IMEI_SIZE = 15;
/**
* @see https://en.wikipedia.org/wiki/International_Mobile_Station_Equipment_Identity

View file

@ -20,8 +20,8 @@ use Respect\Validation\Exceptions\ComponentException;
*/
class LanguageCode extends AbstractRule
{
const ALPHA2 = 'alpha-2';
const ALPHA3 = 'alpha-3';
public const ALPHA2 = 'alpha-2';
public const ALPHA3 = 'alpha-3';
/**
* @see http://www.loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt

View file

@ -17,7 +17,7 @@ use Respect\Validation\Exceptions\ComponentException;
class PostalCode extends Regex
{
const DEFAULT_PATTERN = '/^$/';
public const DEFAULT_PATTERN = '/^$/';
/**
* @see http://download.geonames.org/export/dump/countryInfo.txt

View file

@ -21,7 +21,7 @@ use Symfony\Component\Validator\Validation;
class Sf extends AbstractRule
{
const SYMFONY_CONSTRAINT_NAMESPACE = 'Symfony\Component\Validator\Constraints\%s';
public const SYMFONY_CONSTRAINT_NAMESPACE = 'Symfony\Component\Validator\Constraints\%s';
public $name;
private $constraint;