Skip to content

Commit e19651c

Browse files
committed
Merge pull request #55 from irfanevrens/develop
improvements on some lines of code.
2 parents 6c1a256 + caef493 commit e19651c

File tree

11 files changed

+10528
-40
lines changed

11 files changed

+10528
-40
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
tags
2-
data/*.txt
32
composer.lock
43
vendor
54
*.swp
65
docs
76
*~
87
build
8+
.idea

bin/parse

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ try {
2323
$manager = new \Pdp\PublicSuffixListManager();
2424
$parser = new Pdp\Parser($manager->getList());
2525
$url = $parser->parseUrl($domain);
26-
$suffixValid = ($parser->isSuffixValid((string) $url->host)) ? 'IS' : 'IS NOT';
26+
$suffixValid = ($parser->isSuffixValid((string) $url->getHost())) ? 'IS' : 'IS NOT';
2727

2828
print_r($url->toArray());
2929
echo sprintf('Host: %s', $url) . PHP_EOL;
3030
echo sprintf(
3131
"'%s' %s a valid public suffix.",
32-
$url->host->publicSuffix,
32+
$url->getHost()->getPublicSuffix(),
3333
$suffixValid
3434
) . PHP_EOL;
3535
} catch (\Exception $e) {

0 commit comments

Comments
 (0)