Skip to content

Commit

Permalink
improved QA
Browse files Browse the repository at this point in the history
  • Loading branch information
petrparolek authored and f3l1x committed Dec 22, 2020
1 parent f79f17a commit 963460e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 23 deletions.
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
"nette/http": "^3.0.0",
"nette/security": "^3.0.0",
"nettrine/orm": "^0.5.0",
"ninjify/qa": "^0.10.0",
"ninjify/qa": "^0.11.0",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan-deprecation-rules": "^0.11",
"phpstan/phpstan-nette": "^0.11",
"phpstan/phpstan-shim": "^0.11",
"phpstan/phpstan-strict-rules": "^0.11",
"phpunit/phpunit": "^8.1.0",
"phpstan/phpstan-deprecation-rules": "^0.12",
"phpstan/phpstan-nette": "^0.12",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-strict-rules": "^0.12",
"phpunit/phpunit": "^8.5|^9.5",
"tracy/tracy": "^2.7.0"
},
"autoload": {
Expand Down
18 changes: 10 additions & 8 deletions src/DI/KnpLabsBehaviorExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,17 @@ public function loadConfiguration(): void
->setAutowired(false);
}

if ($config->tree !== false) {
$builder->addDefinition($this->prefix('tree'))
->setFactory(TreeSubscriber::class, [
$classAnalyzerDefinition,
$isRecursive,
$config->tree->nodeTrait,
])
->setAutowired(false);
if ($config->tree === false) {
return;
}

$builder->addDefinition($this->prefix('tree'))
->setFactory(TreeSubscriber::class, [
$classAnalyzerDefinition,
$isRecursive,
$config->tree->nodeTrait,
])
->setAutowired(false);
}

}
19 changes: 10 additions & 9 deletions tests/coverage.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?xml version="1.0"?>
<phpunit>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./../src</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-clover" target="./../coverage.xml"/>
</logging>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage includeUncoveredFiles="true">
<include>
<directory suffix=".php">./../src</directory>
</include>
<report>
<clover outputFile="./../coverage.xml"/>
</report>
</coverage>
<logging/>
</phpunit>

0 comments on commit 963460e

Please sign in to comment.