Skip to content

Commit

Permalink
Update phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
xificurk committed Nov 7, 2021
1 parent 246e4bd commit ee8cc44
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
15 changes: 7 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@
"require-dev": {
"nette/tester": "2.4.1",
"mockery/mockery": "1.4.4",
"phpstan/phpstan": "0.12.99",
"phpstan/phpstan-strict-rules": "0.12.11",
"pepakriz/phpstan-exception-rules": "0.11.7",
"phpstan/phpstan-nette": "0.12.21",
"nepada/phpstan-nette-tester": "0.3.2",
"spaze/phpstan-disallowed-calls": "1.11.0",
"phpstan/phpstan-mockery": "0.12.14",
"phpstan/phpstan": "1.1.1.",
"phpstan/phpstan-strict-rules": "1.0.0",
"phpstan/phpstan-nette": "1.0.0",
"nepada/phpstan-nette-tester": "0.4.0",
"spaze/phpstan-disallowed-calls": "2.0.0",
"phpstan/phpstan-mockery": "1.0.0",
"php-parallel-lint/php-parallel-lint": "1.3.1",
"nepada/coding-standard": "7.4.0",
"nepada/coding-standard": "7.4.1",
"nette/di": "^3.0.6@dev",
"nette/schema": "^1.0.3@dev",
"nette/bootstrap": ">=3.0@dev",
Expand Down
9 changes: 6 additions & 3 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
includes:
- vendor/phpstan/phpstan-strict-rules/rules.neon
- vendor/pepakriz/phpstan-exception-rules/extension.neon
- vendor/phpstan/phpstan-nette/extension.neon
- vendor/phpstan/phpstan-nette/rules.neon
- vendor/spaze/phpstan-disallowed-calls/extension.neon
Expand All @@ -12,8 +11,12 @@ parameters:
paths:
- src

exceptionRules:
uncheckedExceptions:
exceptions:
implicitThrows: false
check:
missingCheckedExceptionInThrows: true
tooWideThrowType: true
uncheckedExceptionClasses:
- LogicException
- Nette\InvalidStateException

Expand Down
2 changes: 1 addition & 1 deletion phpstan.tests.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ parameters:
- php
- phpt

excludes_analyse:
excludePaths:
- tests/temp/*
2 changes: 1 addition & 1 deletion src/FormRenderer/Bootstrap3Renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ protected function getTemplateRenderer(): TemplateRenderer
protected function prepareForm(Form $form): void
{
$primaryButton = $this->findPrimaryButton($form);
/** @var Controls\Button $control */
foreach ($form->getComponents(true, Controls\Button::class) as $control) {
/** @var Controls\Button $control */
$controlPrototype = $control->getControlPrototype();
$classes = Helpers::parseClassList($controlPrototype->getClass());
if (in_array('btn', $classes, true)) {
Expand Down
2 changes: 1 addition & 1 deletion src/FormRenderer/Bootstrap4Renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ protected function getTemplateRenderer(): TemplateRenderer
protected function prepareForm(Form $form): void
{
$primaryButton = $this->findPrimaryButton($form);
/** @var Controls\Button $control */
foreach ($form->getComponents(true, Controls\Button::class) as $control) {
/** @var Controls\Button $control */
$controlPrototype = $control->getControlPrototype();
$classes = Helpers::parseClassList($controlPrototype->getClass());
if (in_array('btn', $classes, true)) {
Expand Down

0 comments on commit ee8cc44

Please sign in to comment.