Skip to content

Commit c35170c

Browse files
committed
Fix CS.
1 parent 803a5fc commit c35170c

File tree

9 files changed

+21
-36
lines changed

9 files changed

+21
-36
lines changed

.editorconfig

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
; This file is for unifying the coding style for different editors and IDEs.
2-
; More information at http://editorconfig.org
3-
2+
; More information at https://editorconfig.org
43
root = true
54

65
[*]
@@ -14,5 +13,4 @@ trim_trailing_whitespace = true
1413
end_of_line = crlf
1514

1615
[*.yml]
17-
indent_style = space
1816
indent_size = 2

.gitattributes

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
# Define the line ending behavior of the different file extensions
2-
# Set default behaviour, in case users don't have core.autocrlf set.
3-
* text=auto
4-
* text eol=lf
5-
6-
# Explicitly declare text files we want to always be normalized and converted
7-
# to native line endings on checkout.
8-
*.php text
9-
*.default text
10-
*.ctp text
11-
*.md text
12-
*.po text
13-
*.js text
14-
*.css text
15-
*.ini text
16-
*.txt text
17-
*.xml text
2+
# Set default behavior, in case users don't have core.autocrlf set.
3+
* text text=auto eol=lf
184

195
# Declare files that will always have CRLF line endings on checkout.
206
*.bat eol=crlf

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/composer.lock
22
/phpunit.phar
33
/vendor/
4-
.idea
4+
/.idea/

.travis.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,13 @@ language: php
22

33
php:
44
- 5.6
5-
- 7.0
6-
- 7.1
7-
- 7.2
8-
9-
sudo: false
5+
- 7.4
106

117
matrix:
128
fast_finish: true
139

1410
include:
15-
- php: 7.1
11+
- php: 7.4
1612
env: PHPCS=1
1713

1814
- php: 5.6
@@ -24,7 +20,11 @@ install:
2420

2521
script:
2622
- sh -c "if [ '$PHPCS' != '1' ]; then vendor/bin/phpunit; fi"
27-
- sh -c "if [ '$PHPCS' = '1' ]; then ./vendor/bin/phpcs -n -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi"
23+
- sh -c "if [ '$PHPCS' = '1' ]; then ./vendor/bin/phpcs -n -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP src/ tests/; fi"
24+
25+
cache:
26+
directories:
27+
- $HOME/.composer/cache
2828

2929
notifications:
3030
email: false

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# CakePHP Localized plugin
2-
[![Build Status](https://secure.travis-ci.org/cakephp/localized.svg?branch=master)](http://travis-ci.org/cakephp/localized)
2+
[![Build Status](https://travis-ci.org/cakephp/localized.svg?branch=master)](http://travis-ci.org/cakephp/localized)
33
[![License](https://poser.pugx.org/cakephp/localized/license.svg)](https://packagist.org/packages/cakephp/localized)
44
[![Total Downloads](https://poser.pugx.org/cakephp/localized/d/total.svg)](https://packagist.org/packages/cakephp/localized)
55

@@ -9,12 +9,12 @@ This plugin contains various localized validation classes for specific countries
99

1010
The master branch has the following requirements:
1111

12-
* CakePHP 3.1.0 or greater.
13-
* PHP 5.4.16 or greater.
12+
* CakePHP 3.5+.
13+
* PHP 5.6+.
1414

1515
## Installation
1616

17-
You can install this plugin into your CakePHP application using [composer](http://getcomposer.org).
17+
You can install this plugin into your CakePHP application using [composer](https://getcomposer.org).
1818

1919
The recommended way to install composer packages is:
2020

@@ -43,7 +43,7 @@ class PostsTable extends Table
4343
{
4444
public function validationDefault(Validator $validator)
4545
{
46-
$validator->provider('fr', FrValidation::class);
46+
$validator->setProvider('fr', FrValidation::class);
4747
$validator->add('phoneField', 'myCustomRuleNameForPhone', [
4848
'rule' => 'phone',
4949
'provider' => 'fr'

src/Validation/ItValidation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public static function cf($check)
7373
'G' => 15, 'H' => 17, 'I' => 19, 'J' => 21, 'K' => 2, 'L' => 4,
7474
'M' => 18, 'N' => 20, 'O' => 11, 'P' => 3, 'Q' => 6, 'R' => 8,
7575
'S' => 12, 'T' => 14, 'U' => 16, 'V' => 10, 'W' => 22, 'X' => 25,
76-
'Y' => 24, 'Z' => 23
76+
'Y' => 24, 'Z' => 23,
7777
];
7878
$sum = 0;
7979

src/Validation/TwValidation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public static function personId($check)
6363
'A' => 10, 'B' => 11, 'C' => 12, 'D' => 13, 'E' => 14, 'F' => 15, 'G' => 16, 'H' => 17,
6464
'I' => 34, 'J' => 18, 'K' => 19, 'L' => 20, 'M' => 21, 'N' => 22, 'O' => 35, 'P' => 23,
6565
'Q' => 24, 'R' => 25, 'S' => 26, 'T' => 27, 'U' => 28, 'V' => 29, 'W' => 32, 'X' => 30,
66-
'Y' => 31, 'Z' => 33
66+
'Y' => 31, 'Z' => 33,
6767
];
6868
$n1 = $keyTable[$check[0]];
6969
$checksum = intval($n1 / 10) + ($n1 % 10) * 9;

tests/TestCase/IntegrationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class IntegrationTest extends TestCase
3232
*/
3333
public function testLocalizedProviderIntegration()
3434
{
35-
$validator = new Validator;
35+
$validator = new Validator();
3636
$validator->setProvider('fr', FrValidation::class);
3737
$validator->add('phoneField', 'myCustomRuleNameForPhone', [
3838
'rule' => 'phone',
@@ -46,7 +46,7 @@ public function testLocalizedProviderIntegration()
4646
$this->assertCount(2, $validator);
4747
$this->assertEmpty($validator->errors([
4848
'phoneField' => '05 24 22 72 27',
49-
'postalField' => '93000'
49+
'postalField' => '93000',
5050
]));
5151

5252
$errors = $validator->errors(['phoneField' => '924.227.227', 'postalField' => '0000']);

tests/TestCase/Validation/RuValidationTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public function testPassport()
7575
$this->assertFalse(RuValidation::passport('1234123456'));
7676
$this->assertFalse(RuValidation::passport('1234 1x3456'));
7777
}
78+
7879
/**
7980
* test vatin method of RuValidation
8081
*

0 commit comments

Comments
 (0)