Apply "SlevomatCodingStandard.TypeHints.UselessConstantTypeHint"

Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
This commit is contained in:
Henrique Moody 2019-02-09 11:24:25 +01:00
parent c30603759e
commit 7e884cc0f4
No known key found for this signature in database
GPG key ID: 221E9281655813A6
7 changed files with 1 additions and 35 deletions

View file

@ -33,28 +33,24 @@ final class CountryCode extends AbstractSearcher
/**
* The ISO representation of a country code.
*
* @var string
*/
public const ALPHA2 = 'alpha-2';
/**
* The ISO3 representation of a country code.
*
* @var string
*/
public const ALPHA3 = 'alpha-3';
/**
* The ISO-number representation of a country code.
*
* @var string
*/
public const NUMERIC = 'numeric';
/**
* Position of the indexes of each set in the list of country codes.
*
* @var array
*/
private const SET_INDEXES = [
self::ALPHA2 => 0,
@ -65,7 +61,6 @@ final class CountryCode extends AbstractSearcher
/**
* @see http://download.geonames.org/export/dump/countryInfo.txt
*
* @var array
*/
private const COUNTRY_CODES = [
['AD', 'AND', '020'], // Andorra

View file

@ -32,44 +32,20 @@ use function preg_replace;
*/
final class CreditCard extends AbstractRule
{
/**
* @var string
*/
public const ANY = 'Any';
/**
* @var string
*/
public const AMERICAN_EXPRESS = 'American Express';
/**
* @var string
*/
public const DINERS_CLUB = 'Diners Club';
/**
* @var string
*/
public const DISCOVER = 'Discover';
/**
* @var string
*/
public const JCB = 'JCB';
/**
* @var string
*/
public const MASTERCARD = 'MasterCard';
/**
* @var string
*/
public const VISA = 'Visa';
/**
* @var array
*/
private const BRAND_REGEX_LIST = [
self::ANY => '/^[0-9]+$/',
self::AMERICAN_EXPRESS => '/^3[47]\d{13}$/',

View file

@ -37,7 +37,6 @@ final class LanguageCode extends AbstractEnvelope
/**
* @see http://www.loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt
*
* @var array
*/
public const LANGUAGE_CODES = [
['aa', 'aar'], // Afar

View file

@ -31,7 +31,6 @@ final class Tld extends AbstractRule
* List extracted from http://data.iana.org/TLD/tlds-alpha-by-domain.txt
* Version 2018100800, Last Updated Mon Oct 8 07:07:01 2018 UTC
*
* @var array
*/
private const TLD_LIST = [
'AAA', 'AARP', 'ABARTH', 'ABB', 'ABBOTT', 'ABBVIE', 'ABC', 'ABLE',

View file

@ -32,7 +32,6 @@ final class Type extends AbstractRule
/**
* Collection of available types for validation.
*
* @var array
*/
private const AVAILABLE_TYPES = [
'array' => 'array',

View file

@ -36,9 +36,6 @@ final class VideoUrl extends AbstractRule
private $service;
// phpcs:disable Generic.Files.LineLength.TooLong
/**
* @var array
*/
private const SERVICES = [
'youtube' => '@^https?://(www\.)?(?:youtube\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^\"&?/]{11})@i',
'vimeo' => '@^https?://(www\.)?(player\.)?(vimeo\.com/)((channels/[A-z]+/)|(groups/[A-z]+/videos/)|(video/))?([0-9]+)@i',

View file

@ -68,6 +68,7 @@
<property name="enableEachParameterAndReturnInspection" value="true" />
</properties>
</rule>
<rule ref="SlevomatCodingStandard.TypeHints.UselessConstantTypeHint" />
<rule ref="Squiz.PHP.CommentedOutCode" />
<rule ref="Squiz.WhiteSpace.FunctionSpacing">
<properties>