Skip to content

Commit 116e82c

Browse files
committed
Revert "Fix CS violations"
This reverts commit f676209.
1 parent f676209 commit 116e82c

File tree

10 files changed

+67
-112
lines changed

10 files changed

+67
-112
lines changed

src/Pdp/HttpAdapter/CurlHttpAdapter.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
11
<?php
22

33
/**
4-
* PHP Domain Parser: Public Suffix List based URL parsing.
4+
* PHP Domain Parser: Public Suffix List based URL parsing
55
*
66
* @link http://github.com/jeremykendall/php-domain-parser for the canonical source repository
7-
*
87
* @copyright Copyright (c) 2014 Jeremy Kendall (http://about.me/jeremykendall)
98
* @license http://github.com/jeremykendall/php-domain-parser/blob/master/LICENSE MIT License
109
*/
11-
1210
namespace Pdp\HttpAdapter;
1311

1412
/**
15-
* cURL http adapter.
13+
* cURL http adapter
1614
*
1715
* Lifted pretty much completely from William Durand's excellent Geocoder
1816
* project
19-
*
2017
* @link https://github.com/willdurand/Geocoder Geocoder on GitHub
21-
*
2218
* @author William Durand <[email protected]>
2319
* @author Jeremy Kendall <[email protected]>
2420
*/

src/Pdp/HttpAdapter/HttpAdapterInterface.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
11
<?php
22

33
/**
4-
* PHP Domain Parser: Public Suffix List based URL parsing.
4+
* PHP Domain Parser: Public Suffix List based URL parsing
55
*
66
* @link http://github.com/jeremykendall/php-domain-parser for the canonical source repository
7-
*
87
* @copyright Copyright (c) 2014 Jeremy Kendall (http://about.me/jeremykendall)
98
* @license http://github.com/jeremykendall/php-domain-parser/blob/master/LICENSE MIT License
109
*/
11-
1210
namespace Pdp\HttpAdapter;
1311

1412
/**
15-
* Interface for http adapters.
13+
* Interface for http adapters
1614
*
1715
* Lifted pretty much completely from William Durand's excellent Geocoder
1816
* project
19-
*
2017
* @link https://github.com/willdurand/Geocoder Geocoder on GitHub
21-
*
2218
* @author William Durand <[email protected]>
2319
* @author Jeremy Kendall <[email protected]>
2420
*/
@@ -27,8 +23,7 @@ interface HttpAdapterInterface
2723
/**
2824
* Returns the content fetched from a given URL.
2925
*
30-
* @param string $url
31-
*
26+
* @param string $url
3227
* @return string Retrieved content
3328
*/
3429
public function getContent($url);

src/Pdp/Parser.php

Lines changed: 27 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
<?php
22

33
/**
4-
* PHP Domain Parser: Public Suffix List based URL parsing.
4+
* PHP Domain Parser: Public Suffix List based URL parsing
55
*
66
* @link http://github.com/jeremykendall/php-domain-parser for the canonical source repository
7-
*
87
* @copyright Copyright (c) 2014 Jeremy Kendall (http://about.me/jeremykendall)
98
* @license http://github.com/jeremykendall/php-domain-parser/blob/master/LICENSE MIT License
109
*/
11-
1210
namespace Pdp;
1311

1412
use Pdp\Uri\Url;
1513
use Pdp\Uri\Url\Host;
1614

1715
/**
18-
* Parser.
16+
* Parser
1917
*
2018
* This class is reponsible for Public Suffix List based url parsing
2119
*/
@@ -35,10 +33,9 @@ class Parser
3533
protected $isNormalized = false;
3634

3735
/**
38-
* Public constructor.
36+
* Public constructor
3937
*
4038
* @codeCoverageIgnore
41-
*
4239
* @param PublicSuffixList $publicSuffixList Instance of PublicSuffixList
4340
*/
4441
public function __construct(PublicSuffixList $publicSuffixList)
@@ -47,11 +44,10 @@ public function __construct(PublicSuffixList $publicSuffixList)
4744
}
4845

4946
/**
50-
* Parses url.
51-
*
52-
* @param string $url Url to parse
47+
* Parses url
5348
*
54-
* @return Url Object representation of url
49+
* @param string $url Url to parse
50+
* @return Url Object representation of url
5551
*/
5652
public function parseUrl($url)
5753
{
@@ -93,11 +89,10 @@ public function parseUrl($url)
9389
}
9490

9591
/**
96-
* Parses host part of url.
92+
* Parses host part of url
9793
*
98-
* @param string $host Host part of url
99-
*
100-
* @return Host Object representation of host portion of url
94+
* @param string $host Host part of url
95+
* @return Host Object representation of host portion of url
10196
*/
10297
public function parseHost($host)
10398
{
@@ -126,10 +121,9 @@ public function parseHost($host)
126121

127122
/**
128123
* Get the raw public suffix based on the cached public suffix list file.
129-
* Return false if the provided suffix is not included in the PSL.
130-
*
131-
* @param string $host The host to process
124+
* Return false if the provided suffix is not included in the PSL
132125
*
126+
* @param string $host The host to process
133127
* @return string|false The suffix or false if suffix not included in the PSL
134128
*/
135129
protected function getRawPublicSuffix($host)
@@ -179,10 +173,9 @@ protected function getRawPublicSuffix($host)
179173
}
180174

181175
/**
182-
* Returns the public suffix portion of provided host.
183-
*
184-
* @param string $host host
176+
* Returns the public suffix portion of provided host
185177
*
178+
* @param string $host host
186179
* @return string|null public suffix or null if host does not contain a public suffix
187180
*/
188181
public function getPublicSuffix($host)
@@ -219,24 +212,22 @@ public function getPublicSuffix($host)
219212
*
220213
* Validity determined by whether or not the suffix is included in the PSL.
221214
*
222-
* @param string $host Host part
223-
*
224-
* @return bool True is suffix is valid, false otherwise
215+
* @param string $host Host part
216+
* @return bool True is suffix is valid, false otherwise
225217
*/
226218
public function isSuffixValid($host)
227219
{
228220
return $this->getRawPublicSuffix($host) !== false;
229221
}
230222

231223
/**
232-
* Returns registerable domain portion of provided host.
224+
* Returns registerable domain portion of provided host
233225
*
234226
* Per the test cases provided by Mozilla
235227
* (http://mxr.mozilla.org/mozilla-central/source/netwerk/test/unit/data/test_psl.txt?raw=1),
236228
* this method should return null if the domain provided is a public suffix.
237229
*
238-
* @param string $host host
239-
*
230+
* @param string $host host
240231
* @return string registerable domain
241232
*/
242233
public function getRegisterableDomain($host)
@@ -259,10 +250,9 @@ public function getRegisterableDomain($host)
259250
}
260251

261252
/**
262-
* Returns the subdomain portion of provided host.
263-
*
264-
* @param string $host host
253+
* Returns the subdomain portion of provided host
265254
*
255+
* @param string $host host
266256
* @return string subdomain
267257
*/
268258
public function getSubdomain($host)
@@ -289,8 +279,7 @@ public function getSubdomain($host)
289279
* If a URL is not punycoded, then it may be an IDNA URL, so it must be
290280
* converted to ASCII. Performs conversion and sets flag.
291281
*
292-
* @param string $part Host part
293-
*
282+
* @param string $part Host part
294283
* @return string Host part, transformed if not punycoded
295284
*/
296285
protected function normalize($part)
@@ -309,8 +298,7 @@ protected function normalize($part)
309298
* Converts any normalized part back to IDNA. Performs conversion and
310299
* resets flag.
311300
*
312-
* @param string $part Host part
313-
*
301+
* @param string $part Host part
314302
* @return string Denormalized host part
315303
*/
316304
protected function denormalize($part)
@@ -324,27 +312,25 @@ protected function denormalize($part)
324312
}
325313

326314
/**
327-
* Tests host for presence of '.'.
315+
* Tests host for presence of '.'
328316
*
329317
* Related to #22
330318
*
331-
* @param string $host Host part of url
332-
*
333-
* @return bool True if multi-label domain, false otherwise
319+
* @param string $host Host part of url
320+
* @return bool True if multi-label domain, false otherwise
334321
*/
335322
protected function isMutliLabelDomain($host)
336323
{
337324
return strpos($host, '.') !== false;
338325
}
339326

340327
/**
341-
* Tests host to determine if it is an IP address.
328+
* Tests host to determine if it is an IP address
342329
*
343330
* Related to #43
344331
*
345-
* @param string $host Host part of url
346-
*
347-
* @return bool True if host is an ip address, false otherwise
332+
* @param string $host Host part of url
333+
* @return bool True if host is an ip address, false otherwise
348334
*/
349335
protected function isIpv4Address($host)
350336
{

src/Pdp/PublicSuffixList.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
<?php
22

33
/**
4-
* PHP Domain Parser: Public Suffix List based URL parsing.
4+
* PHP Domain Parser: Public Suffix List based URL parsing
55
*
66
* @link http://github.com/jeremykendall/php-domain-parser for the canonical source repository
7-
*
87
* @copyright Copyright (c) 2014 Jeremy Kendall (http://about.me/jeremykendall)
98
* @license http://github.com/jeremykendall/php-domain-parser/blob/master/LICENSE MIT License
109
*/
11-
1210
namespace Pdp;
1311

1412
/**
15-
* Public Suffix List.
13+
* Public Suffix List
1614
*/
1715
class PublicSuffixList extends \ArrayObject
1816
{
1917
/**
20-
* Public constructor.
18+
* Public constructor
2119
*
2220
* @param mixed $list Array representing Public Suffix List or PHP Public Suffix List file
2321
*/

0 commit comments

Comments
 (0)