Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Feb 2, 2025
1 parent ad26cb4 commit 89de2c9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"require-dev": {
"laravel/pint": "^1.6",
"orchestra/testbench": "^9.0.2",
"phpstan/phpstan": "^1.10.15",
"phpstan/phpstan": "^2.0",
"phpunit/phpunit": "^11.5"
},
"extra": {
Expand Down
6 changes: 4 additions & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ parameters:
# The level 8 is the highest level
level: 8

checkGenericClassInNonGenericObjectType: false
checkMissingIterableValueType: false
ignoreErrors:
# - identifier: missingType.generics
- identifier: missingType.iterableValue

treatPhpDocTypesAsCertain: false
2 changes: 1 addition & 1 deletion tests/Unit/DocumentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class DocumentTest extends TestCase
#[DataProvider('dataCollectionProvider')]
public function it_can_parse_given_xml($content, $schema, $expected)
{
$stub = new class(new Container()) extends Document
$stub = new class(new Container) extends Document
{
public function filterStrToUpper($value)
{
Expand Down
6 changes: 3 additions & 3 deletions tests/Unit/ReaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function it_can_extract_valid_xml_from_string()
{
$xml = '<xml><foo>foobar</foo></xml>';

$app = new Container();
$app = new Container;
$document = new Document($app);
$stub = new Reader($document);
$output = $stub->extract($xml);
Expand All @@ -26,7 +26,7 @@ public function it_can_extract_valid_xml_from_string()
#[Test]
public function it_can_load_valid_xml_from_filesystem()
{
$stub = new Reader(new Document(new Container()));
$stub = new Reader(new Document(new Container));
$output = $stub->load(__DIR__.'/fixtures/foo.xml');

$this->assertInstanceOf('\Orchestra\Parser\Xml\Document', $output);
Expand All @@ -39,7 +39,7 @@ public function it_throws_exception_when_given_invalid_xml_content()

$xml = '<xml><foo>foobar<foo></xml>';

$stub = new Reader(new Document(new Container()));
$stub = new Reader(new Document(new Container));
$output = $stub->extract($xml);
}
}

0 comments on commit 89de2c9

Please sign in to comment.