assert right argument types
This commit is contained in:
parent
f730a380ec
commit
760b7b2509
@ -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') {
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user