Skip to content

Commit

Permalink
Update testing dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
kloor committed May 9, 2023
1 parent 149be34 commit 0bd96eb
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 7 deletions.
26 changes: 22 additions & 4 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
<rule ref="Generic.Classes.DuplicateClassName"/>
<rule ref="Generic.CodeAnalysis.AssignmentInCondition"/>
<rule ref="Generic.CodeAnalysis.AssignmentInCondition">
<exclude name="Generic.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition"/>
</rule>
<rule ref="Generic.CodeAnalysis.EmptyPHPStatement"/>
<rule ref="Generic.CodeAnalysis.EmptyStatement">
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedCatch"/>
Expand Down Expand Up @@ -65,16 +67,19 @@

<config name="installed_paths" value="../../slevomat/coding-standard/"/>
<rule ref="SlevomatCodingStandard.Arrays.DisallowImplicitArrayCreation"/>
<rule ref="SlevomatCodingStandard.Arrays.DisallowPartiallyKeyed"/>
<rule ref="SlevomatCodingStandard.Arrays.MultiLineArrayEndBracketPlacement"/>
<rule ref="SlevomatCodingStandard.Arrays.SingleLineArrayWhitespace"/>
<rule ref="SlevomatCodingStandard.Arrays.TrailingArrayComma"/>
<rule ref="SlevomatCodingStandard.Classes.ClassConstantVisibility"/>
<rule ref="SlevomatCodingStandard.Classes.ClassLength"/>
<rule ref="SlevomatCodingStandard.Classes.ClassMemberSpacing"/>
<rule ref="SlevomatCodingStandard.Classes.ClassStructure"/>
<rule ref="SlevomatCodingStandard.Classes.ConstantSpacing"/>
<rule ref="SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants"/>
<rule ref="SlevomatCodingStandard.Classes.DisallowMultiConstantDefinition"/>
<rule ref="SlevomatCodingStandard.Classes.DisallowMultiPropertyDefinition"/>
<rule ref="SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants"/>
<rule ref="SlevomatCodingStandard.Classes.DisallowStringExpressionPropertyFetch"/>
<rule ref="SlevomatCodingStandard.Classes.EmptyLinesAroundClassBraces">
<properties>
<property name="linesCountAfterOpeningBrace" value="0"/>
Expand All @@ -90,6 +95,7 @@
<property name="minLineLength" value="80"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Classes.RequireSelfReference"/>
<rule ref="SlevomatCodingStandard.Classes.RequireSingleLineMethodSignature">
<properties>
<property name="maxLineLength" value="79"/>
Expand All @@ -115,13 +121,19 @@
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowContinueWithoutIntegerOperandInSwitch"/>
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowEmpty"/>
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowShortTernaryOperator"/>
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowTrailingMultiLineTernaryOperator"/>
<rule ref="SlevomatCodingStandard.ControlStructures.DisallowYodaComparison"/>
<rule ref="SlevomatCodingStandard.ControlStructures.EarlyExit">
<properties>
<property name="ignoreOneLineTrailingIf" value="true"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.ControlStructures.JumpStatementsSpacing"/>
<rule ref="SlevomatCodingStandard.ControlStructures.JumpStatementsSpacing">
<properties>
<property name="linesCountAfterWhenLastInCaseOrDefault" value="1"/>
<property name="linesCountAfterWhenLastInLastCaseOrDefault" value="0"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.ControlStructures.LanguageConstructWithParentheses"/>
<rule ref="SlevomatCodingStandard.ControlStructures.NewWithParentheses"/>
<rule ref="SlevomatCodingStandard.ControlStructures.RequireMultiLineTernaryOperator">
Expand All @@ -141,7 +153,11 @@
<property name="lineLengthLimit" value="79"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Functions.ArrowFunctionDeclaration"/>
<rule ref="SlevomatCodingStandard.Functions.ArrowFunctionDeclaration">
<properties>
<property name="allowMultiLine" value="true"/>
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Functions.RequireArrowFunction"/>
<rule ref="SlevomatCodingStandard.Functions.RequireTrailingCommaInDeclaration"/>
<rule ref="SlevomatCodingStandard.Functions.StrictCall"/>
Expand Down Expand Up @@ -192,6 +208,7 @@
<rule ref="SlevomatCodingStandard.PHP.TypeCast"/>
<rule ref="SlevomatCodingStandard.PHP.UselessParentheses"/>
<rule ref="SlevomatCodingStandard.PHP.UselessSemicolon"/>
<rule ref="SlevomatCodingStandard.Strings.DisallowVariableParsing"/>
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes">
<properties>
<property name="linesCountBeforeDeclare" value="1"/>
Expand All @@ -207,6 +224,7 @@
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint"/>
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing"/>
<rule ref="SlevomatCodingStandard.TypeHints.UselessConstantTypeHint"/>
<rule ref="SlevomatCodingStandard.Variables.DisallowVariableVariable"/>
<rule ref="SlevomatCodingStandard.Variables.DuplicateAssignmentToVariable"/>
<rule ref="SlevomatCodingStandard.Variables.UnusedVariable"/>
<rule ref="SlevomatCodingStandard.Variables.UselessVariable"/>
Expand Down
2 changes: 2 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
ensureArrayIntOffsetsExist="true"
ensureArrayStringOffsetsExist="true"
errorLevel="1"
findUnusedBaselineEntry="true"
findUnusedVariablesAndParams="true"
findUnusedPsalmSuppress="true"
findUnusedCode="false"
ignoreInternalFunctionFalseReturn="false"
ignoreInternalFunctionNullReturn="false"
resolveFromConfigFile="false"
Expand Down
2 changes: 1 addition & 1 deletion src/Data/TraitQuestions.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ final protected static function mapper(): \JsonMapper
* @param string $property A property name of the JSON object.
* @return bool If the name is the letter q followed by an integer.
*/
final private static function isQuestion(string $property): bool
private static function isQuestion(string $property): bool
{
$result = \filter_var(
$property,
Expand Down
4 changes: 2 additions & 2 deletions vendor-bin/psalm/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require-dev": {
"psalm/plugin-phpunit": "^0.17",
"vimeo/psalm": "^4.0"
"psalm/plugin-phpunit": "^0.18",
"vimeo/psalm": "^5.0"
}
}

0 comments on commit 0bd96eb

Please sign in to comment.