Skip to content

Commit 9a3874e

Browse files
committed
Run PHP-CS-Fixer
1 parent 17a2dc1 commit 9a3874e

File tree

15 files changed

+79
-76
lines changed

15 files changed

+79
-76
lines changed

src/PHPHtmlParser/Content.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,6 @@ public function char(?int $char = null): string
7474

7575
/**
7676
* Gets a string from the current character position.
77-
*
78-
* @param int $length
79-
* @return string
8077
*/
8178
public function string(int $length = 1): string
8279
{
@@ -85,6 +82,7 @@ public function string(int $length = 1): string
8582
do {
8683
$string .= $this->char($position++);
8784
} while ($position < $this->pos + $length);
85+
8886
return $string;
8987
}
9088

src/PHPHtmlParser/DTO/Selector/RuleDTO.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ private function __construct(array $values)
5353
public static function makeFromPrimitives(string $tag, string $operator, $key, $value, bool $noKey, bool $alterNext): RuleDTO
5454
{
5555
return new RuleDTO([
56-
'tag' => $tag,
57-
'operator' => $operator,
58-
'key' => $key,
59-
'value' => $value,
60-
'noKey' => $noKey,
56+
'tag' => $tag,
57+
'operator' => $operator,
58+
'key' => $key,
59+
'value' => $value,
60+
'noKey' => $noKey,
6161
'alterNext' => $alterNext,
6262
]);
6363
}

src/PHPHtmlParser/DTO/TagDTO.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ private function __construct(array $values = [])
3939
public static function makeFromPrimitives(bool $status = false, bool $closing = false, ?HtmlNode $node = null, ?string $tag = null): TagDTO
4040
{
4141
return new TagDTO([
42-
'status' => $status,
42+
'status' => $status,
4343
'closing' => $closing,
44-
'node' => $node,
45-
'tag' => $tag,
44+
'node' => $node,
45+
'tag' => $tag,
4646
]);
4747
}
4848

@@ -56,17 +56,11 @@ public function isClosing(): bool
5656
return $this->closing;
5757
}
5858

59-
/**
60-
* @return mixed
61-
*/
6259
public function getNode(): ?HtmlNode
6360
{
6461
return $this->node;
6562
}
6663

67-
/**
68-
* @return mixed
69-
*/
7064
public function getTag(): ?string
7165
{
7266
return $this->tag;

src/PHPHtmlParser/Discovery/CleanerDiscovery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class CleanerDiscovery
1212
/**
1313
* @var Cleaner|null
1414
*/
15-
private static $parser = null;
15+
private static $parser;
1616

1717
public static function find(): CleanerInterface
1818
{

src/PHPHtmlParser/Discovery/DomParserDiscovery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class DomParserDiscovery
1212
/**
1313
* @var ParserInterface|null
1414
*/
15-
private static $parser = null;
15+
private static $parser;
1616

1717
public static function find(): ParserInterface
1818
{

src/PHPHtmlParser/Discovery/SeekerDiscovery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class SeekerDiscovery
1212
/**
1313
* @var SeekerInterface|null
1414
*/
15-
private static $seeker = null;
15+
private static $seeker;
1616

1717
public static function find(): SeekerInterface
1818
{

src/PHPHtmlParser/Discovery/SelectorParserDiscovery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class SelectorParserDiscovery
1212
/**
1313
* @var ParserInterface|null
1414
*/
15-
private static $parser = null;
15+
private static $parser;
1616

1717
public static function find(): ParserInterface
1818
{

src/PHPHtmlParser/Dom.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
namespace PHPHtmlParser;
66

7-
use GuzzleHttp\Psr7\Request;
87
use GuzzleHttp\Client;
8+
use GuzzleHttp\Psr7\Request;
99
use PHPHtmlParser\Contracts\Dom\CleanerInterface;
1010
use PHPHtmlParser\Contracts\Dom\ParserInterface;
1111
use PHPHtmlParser\Contracts\DomInterface;

src/PHPHtmlParser/Selector/Seeker.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,15 @@ private function match(
298298
case '!=':
299299
return $value !== $pattern;
300300
case '^=':
301-
return \preg_match('/^' . \preg_quote($pattern, '/') . '/',
302-
$value) == 1;
301+
return \preg_match(
302+
'/^' . \preg_quote($pattern, '/') . '/',
303+
$value
304+
) == 1;
303305
case '$=':
304-
return \preg_match('/' . \preg_quote($pattern, '/') . '$/',
305-
$value) == 1;
306+
return \preg_match(
307+
'/' . \preg_quote($pattern, '/') . '$/',
308+
$value
309+
) == 1;
306310
case '*=':
307311
if ($pattern[0] == '/') {
308312
return \preg_match($pattern, $value) == 1;

src/PHPHtmlParser/StaticDom.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
namespace PHPHtmlParser;
66

7-
use GuzzleHttp\Psr7\Request;
87
use GuzzleHttp\Client;
8+
use GuzzleHttp\Psr7\Request;
99
use PHPHtmlParser\Exceptions\ChildNotFoundException;
1010
use PHPHtmlParser\Exceptions\CircularException;
1111
use PHPHtmlParser\Exceptions\NotLoadedException;
@@ -18,7 +18,7 @@
1818
*/
1919
final class StaticDom
2020
{
21-
private static $dom = null;
21+
private static $dom;
2222

2323
/**
2424
* Attempts to call the given method on the most recent created dom

0 commit comments

Comments
 (0)