Skip to content

Commit eb2f656

Browse files
committed
CS fixes from php-cs-fixer
``` jeremykendall@orgrimmar  ~/dev/jeremykendall/php-domain-parser   v5 ●✚  php-cs-fixer fix --verbose Loaded config default from "/Users/jeremykendall/dev/jeremykendall/php-domain-parser/.php_cs". Using cache file ".php_cs.cache". FFFFFFFFF.FF.FF Legend: ?-unknown, I-invalid file syntax, file ignored, S-Skipped, .-no changes, F-fixed, E-error 1) src/Pdp/Domain.php (single_blank_line_at_eof) 2) src/Pdp/HttpAdapter/CurlHttpAdapter.php (phpdoc_no_alias_tag) 3) src/Pdp/HttpAdapter/HttpAdapterInterface.php (phpdoc_no_alias_tag) 4) src/Pdp/LabelsTrait.php (phpdoc_summary) 5) src/Pdp/MatchedDomain.php (phpdoc_inline_tag, phpdoc_summary) 6) src/Pdp/NullDomain.php (phpdoc_inline_tag, single_blank_line_at_eof) 7) src/Pdp/PublicSuffixList.php (phpdoc_summary, phpdoc_align) 8) src/Pdp/PublicSuffixListManager.php (phpdoc_no_alias_tag, phpdoc_order, phpdoc_separation, phpdoc_trim, braces) 9) src/Pdp/UnmatchedDomain.php (phpdoc_inline_tag, phpdoc_summary, single_blank_line_at_eof) 10) tests/src/Pdp/CheckPublicSuffixTest.php (phpdoc_no_alias_tag) 11) tests/src/Pdp/DomainTest.php (no_unused_imports) 12) tests/src/Pdp/PublicSuffixListManagerTest.php (no_spaces_inside_parenthesis, array_syntax, method_argument_space, ordered_imports) 13) tests/src/Pdp/PublicSuffixListTest.php (new_with_braces, no_unused_imports) ```
1 parent 4c66660 commit eb2f656

12 files changed

+50
-53
lines changed

src/Pdp/Domain.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ public function getRegistrableDomain();
5555
* @return bool
5656
*/
5757
public function isValid(): bool;
58-
}
58+
}

src/Pdp/HttpAdapter/CurlHttpAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Lifted pretty much completely from William Durand's excellent Geocoder
1818
* project
1919
*
20-
* @link https://github.com/willdurand/Geocoder Geocoder on GitHub
20+
* @see https://github.com/willdurand/Geocoder Geocoder on GitHub
2121
*
2222
* @author William Durand <[email protected]>
2323
* @author Jeremy Kendall <[email protected]>

src/Pdp/HttpAdapter/HttpAdapterInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Lifted pretty much completely from William Durand's excellent Geocoder
1818
* project
1919
*
20-
* @link https://github.com/willdurand/Geocoder Geocoder on GitHub
20+
* @see https://github.com/willdurand/Geocoder Geocoder on GitHub
2121
*
2222
* @author William Durand <[email protected]>
2323
* @author Jeremy Kendall <[email protected]>

src/Pdp/LabelsTrait.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
trait LabelsTrait
1515
{
1616
/**
17-
* Returns labels from input
17+
* Returns labels from input.
1818
*
1919
* @param string $input
2020
*
@@ -26,7 +26,7 @@ private function getLabels(string $input): array
2626
}
2727

2828
/**
29-
* Returns labels from input in reverse
29+
* Returns labels from input in reverse.
3030
*
3131
* @param string $input
3232
*
@@ -38,7 +38,7 @@ private function getLabelsReverse(string $input): array
3838
}
3939

4040
/**
41-
* Tells whether the domain contains multiple labels
41+
* Tells whether the domain contains multiple labels.
4242
*
4343
* @param string $domain
4444
*
@@ -50,7 +50,7 @@ private function hasLabels(string $domain): bool
5050
}
5151

5252
/**
53-
* Tells whether the domain contains one single label
53+
* Tells whether the domain contains one single label.
5454
*
5555
* @param string $domain
5656
*

src/Pdp/MatchedDomain.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ final class MatchedDomain implements Domain
3131
private $isValid;
3232

3333
/**
34-
* New instance
34+
* New instance.
3535
*
3636
* @param string|null $domain
3737
* @param string|null $publicSuffix
@@ -45,31 +45,31 @@ public function __construct(string $domain = null, string $publicSuffix = null,
4545
}
4646

4747
/**
48-
* @inheritdoc
48+
* {@inheritdoc}
4949
*/
5050
public function getDomain()
5151
{
5252
return $this->domain;
5353
}
5454

5555
/**
56-
* @inheritdoc
56+
* {@inheritdoc}
5757
*/
5858
public function getPublicSuffix()
5959
{
6060
return $this->publicSuffix;
6161
}
6262

6363
/**
64-
* @inheritdoc
64+
* {@inheritdoc}
6565
*/
6666
public function isValid(): bool
6767
{
6868
return $this->isValid;
6969
}
7070

7171
/**
72-
* @inheritdoc
72+
* {@inheritdoc}
7373
*/
7474
public function getRegistrableDomain()
7575
{
@@ -85,7 +85,7 @@ public function getRegistrableDomain()
8585
}
8686

8787
/**
88-
* Tells whether the domain has a registrable domain part
88+
* Tells whether the domain has a registrable domain part.
8989
*
9090
* @return bool
9191
*/
@@ -107,7 +107,7 @@ private function hasRegistrableDomain(): bool
107107
}
108108

109109
/**
110-
* Returns the additional label to generate the registrable domain
110+
* Returns the additional label to generate the registrable domain.
111111
*
112112
* @param string[] $domainLabels
113113
* @param string[] $publicSuffixLabels

src/Pdp/NullDomain.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,34 @@
1414
final class NullDomain implements Domain
1515
{
1616
/**
17-
* @inheritdoc
17+
* {@inheritdoc}
1818
*/
1919
public function getDomain()
2020
{
2121
return null;
2222
}
2323

2424
/**
25-
* @inheritdoc
25+
* {@inheritdoc}
2626
*/
2727
public function getPublicSuffix()
2828
{
2929
return null;
3030
}
3131

3232
/**
33-
* @inheritdoc
33+
* {@inheritdoc}
3434
*/
3535
public function getRegistrableDomain()
3636
{
3737
return null;
3838
}
3939

4040
/**
41-
* @inheritdoc
41+
* {@inheritdoc}
4242
*/
4343
public function isValid(): bool
4444
{
4545
return false;
4646
}
47-
}
47+
}

src/Pdp/PublicSuffixList.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ public function __construct($rules = null)
3434
}
3535

3636
/**
37-
* Filter the rules parameter
37+
* Filter the rules parameter.
3838
*
3939
* @param array|string|null $rules
4040
*
41-
* @throws TypeError if the $rules is not an array, a string or null
41+
* @throws TypeError if the $rules is not an array, a string or null
4242
* @throws InvalidArgumentException if path does not exist or is not readable
4343
*
4444
* @return array
@@ -65,7 +65,7 @@ private function filterRules($rules): array
6565
}
6666

6767
/**
68-
* Returns PSL rules
68+
* Returns PSL rules.
6969
*
7070
* @return array
7171
*/
@@ -75,7 +75,7 @@ public function getRules(): array
7575
}
7676

7777
/**
78-
* Returns PSL public info for a given domain
78+
* Returns PSL public info for a given domain.
7979
*
8080
* @param string|null $domain
8181
*
@@ -97,9 +97,9 @@ public function query(string $domain = null): Domain
9797
}
9898

9999
/**
100-
* Tells whether the given domain is valid
100+
* Tells whether the given domain is valid.
101101
*
102-
* @param string|null $domain
102+
* @param string|null $domain
103103
*
104104
* @return bool
105105
*/
@@ -125,7 +125,7 @@ private function isMatchable($domain): bool
125125
}
126126

127127
/**
128-
* Tells whether the domain starts with a dot character
128+
* Tells whether the domain starts with a dot character.
129129
*
130130
* @param string $domain
131131
*
@@ -137,7 +137,7 @@ private function hasLeadingDot($domain): bool
137137
}
138138

139139
/**
140-
* Tells whether the submitted domain is an IP address
140+
* Tells whether the submitted domain is an IP address.
141141
*
142142
* @param string $domain
143143
*
@@ -166,7 +166,7 @@ private function normalize(string $domain): string
166166

167167
/**
168168
* Returns the matched public suffix or null
169-
* if none found
169+
* if none found.
170170
*
171171
* @param array $labels
172172
*
@@ -204,7 +204,7 @@ private function findPublicSuffix(array $labels)
204204
}
205205

206206
/**
207-
* Tells whether a PSL exception rule is found
207+
* Tells whether a PSL exception rule is found.
208208
*
209209
* @param string $label
210210
* @param array $rules
@@ -218,7 +218,7 @@ private function isExceptionRule(string $label, array $rules): bool
218218
}
219219

220220
/**
221-
* Tells whether a PSL wildcard rule is found
221+
* Tells whether a PSL wildcard rule is found.
222222
*
223223
* @param array $rules
224224
*
@@ -230,7 +230,7 @@ private function isWildcardRule(array $rules): bool
230230
}
231231

232232
/**
233-
* Tells whether a PSL label matches the given domain label
233+
* Tells whether a PSL label matches the given domain label.
234234
*
235235
* @param string $label
236236
* @param array $rules
@@ -243,7 +243,7 @@ private function matchExists(string $label, array $rules): bool
243243
}
244244

245245
/**
246-
* Returns the MatchedDomain value object
246+
* Returns the MatchedDomain value object.
247247
*
248248
* @param string $domain
249249
* @param string $publicSuffix
@@ -260,7 +260,7 @@ private function handleMatches(string $domain, string $publicSuffix): MatchedDom
260260
}
261261

262262
/**
263-
* Tells whether the domain is punycoded
263+
* Tells whether the domain is punycoded.
264264
*
265265
* @param string $domain
266266
*
@@ -272,7 +272,7 @@ private function isPunycoded(string $domain): bool
272272
}
273273

274274
/**
275-
* Returns the UnmatchedDomain value object
275+
* Returns the UnmatchedDomain value object.
276276
*
277277
* @param string $domain
278278
*

src/Pdp/PublicSuffixListManager.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class PublicSuffixListManager
4141
*/
4242
public function __construct(string $cacheDir = null)
4343
{
44-
$this->cacheDir = $cacheDir ?? realpath(dirname(__DIR__, 2) . DIRECTORY_SEPARATOR . 'data');
44+
$this->cacheDir = $cacheDir ?? realpath(dirname(__DIR__, 2) . DIRECTORY_SEPARATOR . 'data');
4545
}
4646

4747
/**
@@ -72,7 +72,7 @@ public function fetchListFromSource(): int
7272
*
7373
* This method is based heavily on the code found in generateEffectiveTLDs.php
7474
*
75-
* @link https://github.com/usrflo/registered-domain-libs/blob/master/generateEffectiveTLDs.php
75+
* @see https://github.com/usrflo/registered-domain-libs/blob/master/generateEffectiveTLDs.php
7676
* A copy of the Apache License, Version 2.0, is provided with this
7777
* distribution
7878
*
@@ -103,7 +103,7 @@ public function parseListToArray(string $textFile): array
103103
*
104104
* This method is based heavily on the code found in generateEffectiveTLDs.php
105105
*
106-
* @link https://github.com/usrflo/registered-domain-libs/blob/master/generateEffectiveTLDs.php
106+
* @see https://github.com/usrflo/registered-domain-libs/blob/master/generateEffectiveTLDs.php
107107
* A copy of the Apache License, Version 2.0, is provided with this
108108
* distribution
109109
*
@@ -173,9 +173,9 @@ public function getList(): PublicSuffixList
173173
* @param string $filename Filename in cache dir where data will be written
174174
* @param mixed $data Data to write
175175
*
176-
* @return int Number of bytes that were written to the file
177-
*
178176
* @throws Exception if unable to write file
177+
*
178+
* @return int Number of bytes that were written to the file
179179
*/
180180
protected function write($filename, $data): int
181181
{

src/Pdp/UnmatchedDomain.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ final class UnmatchedDomain implements Domain
3131
private $isValid;
3232

3333
/**
34-
* New instance
34+
* New instance.
3535
*
3636
* @param string|null $domain
3737
* @param string|null $publicSuffix
@@ -45,31 +45,31 @@ public function __construct(string $domain = null, string $publicSuffix = null,
4545
}
4646

4747
/**
48-
* @inheritdoc
48+
* {@inheritdoc}
4949
*/
5050
public function getDomain()
5151
{
5252
return $this->domain;
5353
}
5454

5555
/**
56-
* @inheritdoc
56+
* {@inheritdoc}
5757
*/
5858
public function getPublicSuffix()
5959
{
6060
return $this->publicSuffix;
6161
}
6262

6363
/**
64-
* @inheritdoc
64+
* {@inheritdoc}
6565
*/
6666
public function isValid(): bool
6767
{
6868
return $this->isValid;
6969
}
7070

7171
/**
72-
* @inheritdoc
72+
* {@inheritdoc}
7373
*/
7474
public function getRegistrableDomain()
7575
{
@@ -85,7 +85,7 @@ public function getRegistrableDomain()
8585
}
8686

8787
/**
88-
* Tells whether the domain has a registrable domain part
88+
* Tells whether the domain has a registrable domain part.
8989
*
9090
* @return bool
9191
*/
@@ -107,7 +107,7 @@ private function hasRegistrableDomain(): bool
107107
}
108108

109109
/**
110-
* Returns the additional label to generate the registrable domain
110+
* Returns the additional label to generate the registrable domain.
111111
*
112112
* @param string[] $domainLabels
113113
* @param string[] $publicSuffixLabels
@@ -118,4 +118,4 @@ private function getAdditionalLabel($domainLabels, $publicSuffixLabels): array
118118
{
119119
return array_slice($domainLabels, count($domainLabels) - count($publicSuffixLabels) - 1, 1);
120120
}
121-
}
121+
}

0 commit comments

Comments
 (0)