assert right argument types

This commit is contained in:
Daniel Seifert 2024-05-13 15:26:19 +02:00
bovenliggende f730a380ec
commit 760b7b2509
2 gewijzigde bestanden met toevoegingen van 6 en 1 verwijderingen

Bestand weergeven

@ -15,6 +15,7 @@ declare(strict_types=1);
namespace D3\DataWizard\Application\Model;
use Assert\Assert;
use D3\DataWizard\Application\Model\Exceptions\ExportFileException;
use D3\DataWizard\Application\Model\Exceptions\InputUnvalidException;
use D3\DataWizard\Application\Model\Exceptions\NoSuitableRendererException;
@ -154,6 +155,9 @@ abstract class ExportBase implements QueryBase
{
[ $queryString, $parameters ] = $query;
Assert::that($queryString)->string();
Assert::that($parameters)->isArray();
$queryString = trim($queryString);
if (strtolower(substr($queryString, 0, 6)) !== 'select') {

Bestand weergeven

@ -30,7 +30,8 @@
"league/csv": "^9.0",
"mathieuviossat/arraytotexttable": "^1.0",
"form-manager/form-manager": "^6.1",
"d3/modcfg": "^7.0"
"d3/modcfg": "^7.0",
"beberlei/assert": "^3.3.2"
},
"require-dev": {
"d3/testingtools": "^1.2.0.0",