Skip to content

Commit

Permalink
Merge pull request #255 from W0rma/fix-cs
Browse files Browse the repository at this point in the history
Fix CS
  • Loading branch information
goetas authored Oct 31, 2024
2 parents 973bc37 + 6962785 commit c990fb0
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -28,5 +28,5 @@ jobs:

- name: cs fix
run: |
wget -q https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.13.1/php-cs-fixer.phar
wget -q https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.19.3/php-cs-fixer.phar
php php-cs-fixer.phar fix --dry-run --diff
1 change: 1 addition & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ $finder = PhpCsFixer\Finder::create()
return PhpCsFixer\Config::create()
->setRules(array(
'@Symfony' => true,
'array_syntax' => false,
'concat_space' => array('spacing' => 'one'),
'phpdoc_annotation_without_dot' => false,
))
Expand Down
1 change: 0 additions & 1 deletion src/HTML5.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ public function hasErrors()
* Parse an input string.
*
* @param string $input
* @param array $options
*
* @return \DOMDocument
*/
Expand Down
2 changes: 0 additions & 2 deletions src/HTML5/Parser/DOMTreeBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,6 @@ public function fragment()
*
* This is used for handling Processor Instructions as they are
* inserted. If omitted, PI's are inserted directly into the DOM tree.
*
* @param InstructionProcessor $proc
*/
public function setInstructionProcessor(InstructionProcessor $proc)
{
Expand Down
1 change: 1 addition & 0 deletions src/HTML5/Parser/Tokenizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,7 @@ protected function isCommentEnd()
// Test for '!>'
if ('!' == $this->scanner->current() && '>' == $this->scanner->peek()) {
$this->scanner->consume(); // Consume the last '>'

return true;
}
// Unread '-' and one of '!' or '>';
Expand Down
1 change: 0 additions & 1 deletion src/HTML5/Parser/TreeBuildingRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ public function evaluate($new, $current)
case 'thead':
case 'tfoot':
case 'table': // Spec isn't explicit about this, but it's necessary.

return $this->closeIfCurrentMatches($new, $current, array(
'thead',
'tfoot',
Expand Down
2 changes: 1 addition & 1 deletion test/HTML5/Parser/DOMTreeBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

namespace Masterminds\HTML5\Tests\Parser;

use Masterminds\HTML5\Parser\DOMTreeBuilder;
use Masterminds\HTML5\Parser\Scanner;
use Masterminds\HTML5\Parser\Tokenizer;
use Masterminds\HTML5\Parser\DOMTreeBuilder;

/**
* These tests are functional, not necessarily unit tests.
Expand Down
2 changes: 1 addition & 1 deletion test/HTML5/Parser/ScannerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

namespace Masterminds\HTML5\Tests\Parser;

use Masterminds\HTML5\Parser\StringInputStream;
use Masterminds\HTML5\Parser\Scanner;
use Masterminds\HTML5\Parser\StringInputStream;

class ScannerTest extends \Masterminds\HTML5\Tests\TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion test/HTML5/Parser/TokenizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Masterminds\HTML5\Tests\Parser;

use Masterminds\HTML5\Parser\UTF8Utils;
use Masterminds\HTML5\Parser\Scanner;
use Masterminds\HTML5\Parser\Tokenizer;
use Masterminds\HTML5\Parser\UTF8Utils;

class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase
{
Expand Down
6 changes: 3 additions & 3 deletions test/HTML5/Parser/TreeBuildingRulesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

namespace Masterminds\HTML5\Tests\Parser;

use Masterminds\HTML5\Parser\TreeBuildingRules;
use Masterminds\HTML5\Parser\Tokenizer;
use Masterminds\HTML5\Parser\Scanner;
use Masterminds\HTML5\Parser\DOMTreeBuilder;
use Masterminds\HTML5\Parser\Scanner;
use Masterminds\HTML5\Parser\Tokenizer;
use Masterminds\HTML5\Parser\TreeBuildingRules;

/**
* These tests are functional, not necessarily unit tests.
Expand Down
2 changes: 1 addition & 1 deletion test/HTML5/Serializer/OutputRulesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Masterminds\HTML5\Tests\Serializer;

use Masterminds\HTML5;
use Masterminds\HTML5\Serializer\OutputRules;
use Masterminds\HTML5\Serializer\Traverser;
use Masterminds\HTML5;

class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase
{
Expand Down

0 comments on commit c990fb0

Please sign in to comment.