style: fix indentation, alignment, and docblock annotations
- Correct getChoices() docblock to reflect translated label => enum backing value order instead of value => label - Re-indent Smart Links menu config to match actual array nesting - Align assignment operators in RefreshStatsCommand - Add missing newline at end of RefreshStatsCommand.php
This commit is contained in:
1 parent
07773acb8d
commit
b138056e43
90 files changed
+622
-272
No files matched your search
@@ -0,0 +1,62 @@
|
||||
# PHPStan configuration of the plugin, modeled on Mautic core's phpstan.neon.
|
||||
#
|
||||
# The analysis needs the autoloader of a Mautic installation: the bootstrap file
|
||||
# (Tests/bootstrap.php) walks up from the plugin directory until it finds
|
||||
# vendor/autoload.php. Run it either from a Mautic installation that has this
|
||||
# plugin in docroot/plugins/, or after a `composer install` in the plugin
|
||||
# directory (which pulls mautic/core-lib and the require-dev tools):
|
||||
#
|
||||
# vendor/bin/phpstan analyse --no-progress -c phpstan.neon
|
||||
includes:
|
||||
# The documented debt found when the tooling was introduced (see readme.md, Coding
|
||||
# standards): Doctrine-assigned entity ids, historical migrations referencing the
|
||||
# pre-rename entity classes, and core's generic AbstractCommonModel::getRepository()
|
||||
# annotations. New errors still fail the analysis; regenerate the baseline after
|
||||
# fixing entries with `phpstan analyse --generate-baseline -c phpstan.neon`.
|
||||
- phpstan-baseline.neon
|
||||
|
||||
parameters:
|
||||
level: 6
|
||||
reportUnmatchedIgnoredErrors: false
|
||||
treatPhpDocTypesAsCertain: false
|
||||
|
||||
paths:
|
||||
- Catalog
|
||||
- Command
|
||||
- Config
|
||||
- Controller
|
||||
- DependencyInjection
|
||||
- Entity
|
||||
- Event
|
||||
- EventListener
|
||||
- Form
|
||||
- Integration
|
||||
- Migrations
|
||||
- Model
|
||||
- Security
|
||||
- Service
|
||||
- Tests
|
||||
- Twig
|
||||
- Validator
|
||||
- MT3SMarketingProgramBundle.php
|
||||
|
||||
excludePaths:
|
||||
- Resources
|
||||
- Translations
|
||||
- Assets
|
||||
|
||||
# The same pragmatic ignores Mautic core keeps in its own phpstan.neon.
|
||||
ignoreErrors:
|
||||
- identifier: missingType.generics
|
||||
# not all IDEs are as smart as PHPSTAN and need the type hint
|
||||
- identifier: function.alreadyNarrowedType
|
||||
- identifier: instanceof.alwaysTrue
|
||||
- '/Variable \$\w+ might not be defined\./'
|
||||
# test mocks
|
||||
- '#Parameter (.*?) class (.*?) expects (.*?)PHPUnit\\Framework\\MockObject\\MockObject given#'
|
||||
- '#is not subtype of native type PHPUnit\\Framework\\MockObject\\MockObject#'
|
||||
- '#Call to an undefined method PHPUnit\\Framework\\MockObject\\MockObject#'
|
||||
- '#expects (.*?) PHPUnit\\Framework\\MockObject\\MockObject given#'
|
||||
|
||||
bootstrapFiles:
|
||||
- Tests/bootstrap.php
|
||||
Reference in new issue
Block a user