-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
169 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
<?xml version="1.0"?> | ||
<psalm | ||
errorLevel="3" | ||
resolveFromConfigFile="true" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns="https://getpsalm.org/schema/config" | ||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" | ||
allowStringToStandInForClass="true" | ||
allowCoercionFromStringToClassConst="true" | ||
findUnusedPsalmSuppress="true" | ||
skipChecksOnUnresolvableIncludes="true" | ||
> | ||
<plugins> | ||
<pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin"/> | ||
<pluginClass class="Psalm\MockeryPlugin\Plugin"/> | ||
</plugins> | ||
<projectFiles> | ||
<directory name="/"/> | ||
<ignoreFiles> | ||
<directory name="vendor"/> | ||
<directory name="bitrix/modules/sprint.migration"/> | ||
</ignoreFiles> | ||
</projectFiles> | ||
|
||
<extraFiles> | ||
<directory name="vendor/sheerockoff/bitrix-ci/files/bitrix"/> | ||
</extraFiles> | ||
|
||
<issueHandlers> | ||
<DeprecatedMethod> | ||
<errorLevel type="suppress"> | ||
<directory name="/"/> | ||
</errorLevel> | ||
</DeprecatedMethod> | ||
<DeprecatedClass> | ||
<errorLevel type="suppress"> | ||
<directory name="/"/> | ||
</errorLevel> | ||
</DeprecatedClass> | ||
<UndefinedGlobalVariable> | ||
<errorLevel type="suppress"> | ||
<referencedVariable name="$APPLICATION" /> | ||
<referencedVariable name="$USER" /> | ||
</errorLevel> | ||
</UndefinedGlobalVariable> | ||
|
||
<PropertyNotSetInConstructor> | ||
<errorLevel type="suppress"> | ||
<directory name="/"/> | ||
</errorLevel> | ||
</PropertyNotSetInConstructor> | ||
|
||
<UndefinedConstant> | ||
<errorLevel type="suppress"> | ||
<directory name="/"/> | ||
</errorLevel> | ||
</UndefinedConstant> | ||
|
||
<InvalidArgument> | ||
<errorLevel type="suppress"> | ||
<directory name="/"/> | ||
</errorLevel> | ||
</InvalidArgument> | ||
|
||
<TooFewArguments> | ||
<errorLevel type="suppress"> | ||
<directory name="/"/> | ||
</errorLevel> | ||
</TooFewArguments> | ||
|
||
<ArgumentTypeCoercion> | ||
<errorLevel type="suppress"> | ||
<directory name="/"/> | ||
</errorLevel> | ||
</ArgumentTypeCoercion> | ||
|
||
<LessSpecificReturnStatement> | ||
<errorLevel type="suppress"> | ||
<directory name="/"/> | ||
</errorLevel> | ||
</LessSpecificReturnStatement> | ||
|
||
<UndefinedFunction> | ||
<errorLevel type="suppress"> | ||
<directory name="/"/> | ||
</errorLevel> | ||
</UndefinedFunction> | ||
|
||
<UndefinedMagicPropertyFetch> | ||
<errorLevel type="suppress"> | ||
<directory name="/"/> | ||
</errorLevel> | ||
</UndefinedMagicPropertyFetch> | ||
|
||
<UnresolvableInclude> | ||
<errorLevel type="suppress"> | ||
<directory name="/"/> | ||
</errorLevel> | ||
</UnresolvableInclude> | ||
</issueHandlers> | ||
</psalm> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="RegioStandard"> | ||
<description>RegioMedia PHP Coding Standard</description> | ||
|
||
<!-- Основа: https://www.php-fig.org/psr/psr-2/ --> | ||
<rule ref="PSR2" /> | ||
|
||
<!-- Включают обязательность док-блоков для классов и функций --> | ||
<rule ref="Squiz.Commenting.FunctionComment" /> | ||
<rule ref="Squiz.Commenting.FunctionCommentThrowTag" /> | ||
<rule ref="Squiz.Commenting.ClassComment"> | ||
<exclude name="Squiz.Commenting.ClassComment.TagNotAllowed"/>. | ||
</rule> | ||
<rule ref="Squiz.Commenting.VariableComment" /> | ||
|
||
<!-- увеличивает лимит на длину строки по сравнению с PSR-2 --> | ||
<rule ref="Generic.Files.LineLength"> | ||
<properties> | ||
<property name="lineLimit" value="140"/> | ||
<property name="absoluteLineLimit" value="200"/> | ||
</properties> | ||
</rule> | ||
|
||
<!-- предупреждает об использовании нежелательных функций (устаревшие и отладочные) --> | ||
<rule ref="Generic.PHP.ForbiddenFunctions"> | ||
<properties> | ||
<property name="error" value="false" /> | ||
<property name="forbiddenFunctions" type="array" | ||
value="sizeof=>count,delete=>unset,d=>null,var_dump=>null" /> | ||
</properties> | ||
</rule> | ||
|
||
<!-- запрещает использование двойных кавычек там, где они не нужны --> | ||
<rule ref="Squiz.Strings.DoubleQuoteUsage.NotRequired" /> | ||
</ruleset> |