Skip to content

Commit

Permalink
TestFormFactory: fix static call
Browse files Browse the repository at this point in the history
  • Loading branch information
xificurk committed Mar 2, 2023
1 parent da16e1e commit 6c8fb61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/FormRenderer/TestFormFactory.php
Expand Up @@ -15,8 +15,8 @@ final class TestFormFactory
public function create(): Form
{
$form = new Form();
if (method_exists($form, 'initialize')) { // BC with nette/forms <3.1.2
$form::initialize(true);
if (method_exists(Form::class, 'initialize')) { // BC with nette/forms <3.1.2
Form::initialize(true);
}
$form->setAction('#');
$form->getElementPrototype()->addClass('form-class1');
Expand Down
2 changes: 1 addition & 1 deletion tests/PHPStan/conditional.config.tests.php
Expand Up @@ -9,7 +9,7 @@
if (InstalledVersions::satisfies(new VersionParser(), 'nette/forms', '>=3.1.2')) {
// method available since nette/forms 3.1.2
$config['parameters']['ignoreErrors'][] = [
'message' => '~Call to function method_exists\\(\\) with Nette\\\\Forms\\\\Form and \'initialize\' will always evaluate to true~',
'message' => '~Call to function method_exists\\(\\) with \'Nette\\\\\\\\Forms\\\\\\\\Form\' and \'initialize\' will always evaluate to true~',
'path' => '../../tests/FormRenderer/TestFormFactory.php',
'count' => 1,
];
Expand Down

0 comments on commit 6c8fb61

Please sign in to comment.