Skip to content

Instantly share code, notes, and snippets.

@muglug

muglug/psalm.xml Secret

Last active August 31, 2021 13:25
Show Gist options
  • Save muglug/6c6ac543a51d94c62967bd861783ed07 to your computer and use it in GitHub Desktop.
Save muglug/6c6ac543a51d94c62967bd861783ed07 to your computer and use it in GitHub Desktop.
Psalm config for Vimeo
<?xml version="1.0"?>
<psalm
name="CodeInspection for Vimeo"
stopOnFirstError="false"
useDocblockTypes="true"
autoloader="xxx/xxx/xxx.php"
cacheFileContentHashes="false"
useAssertForType="true"
totallyTyped="true"
>
<projectFiles>
<directory name="xxx/xxx" />
<directory name="xxx/yyy" />
<directory name="xxx/zzz" />
<file name="xxx/xxx/xxx.php" />
<ignoreFiles>
<file name="xxx/xxx/xxx.php" />
<directory name="xxx/yyy/zzz" />
</ignoreFiles>
</projectFiles>
<stubs>
<file name="xxx/xxx/xxx.php" />
</stubs>
<fileExtensions>
<extension name=".php" />
<extension name=".phtml" scanner="xxx/xxx/xxx.php" checker="xxx/xxx/xxx.php" />
</fileExtensions>
<plugins>
<plugin filename="xxx/xxx/xxx.php" />
<!--<plugin filename="xxx/xxx/xxx.php" />-->
</plugins>
<issueHandlers>
<MethodSignatureMismatch>
<errorLevel type="info">
<directory name="xxx/xxx" />
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</MethodSignatureMismatch>
<TypeDoesNotContainNull errorLevel="info" />
<InvalidOperand errorLevel="info" />
<PossiblyNullOperand errorLevel="suppress" />
<NullOperand errorLevel="suppress" />
<UndefinedPropertyFetch>
<errorLevel type="suppress">
<directory name="xxx/xxx" />
</errorLevel>
</UndefinedPropertyFetch>
<UnusedVariable>
<errorLevel type="suppress">
<directory name="xxx/xxx" />
</errorLevel>
</UnusedVariable>
<UnusedMethod>
<errorLevel type="suppress">
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</UnusedMethod>
<UnusedClass>
<errorLevel type="suppress">
<directory name="xxx/xxx" />
</errorLevel>
</UnusedClass>
<UndefinedThisPropertyAssignment errorLevel="info">
<errorLevel type="suppress">
<directory name="xxx/xxx" />
<file name="xxx/xxx/xxx.php" />
</errorLevel>
<errorLevel type="error">
<directory name="xxx/xxx" />
</errorLevel>
</UndefinedThisPropertyAssignment>
<UndefinedPropertyAssignment>
<errorLevel type="suppress">
<file name="xxx/xxx/xxx.php" />
<directory name="xxx/xxx" />
</errorLevel>
</UndefinedPropertyAssignment>
<UndefinedThisPropertyFetch errorLevel="info">
<errorLevel type="suppress">
<directory name="xxx/xxx" />
<file name="xxx/xxx/xxx.php" />
</errorLevel>
<errorLevel type="error">
<directory name="xxx/xxx" />
</errorLevel>
</UndefinedThisPropertyFetch>
<UndefinedVariable>
<errorLevel type="suppress">
<directory name="xxx/xxx" />
</errorLevel>
</UndefinedVariable>
<UndefinedConstant>
<errorLevel type="suppress">
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</UndefinedConstant>
<UndefinedClass>
<errorLevel type="suppress">
<directory name="xxx/xxx" />
<file name="xxx/xxx/xxx.php" />
<directory name="xxx/xxx" />
</errorLevel>
</UndefinedClass>
<InvalidPropertyAssignment>
<errorLevel type="suppress">
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</InvalidPropertyAssignment>
<InvalidPropertyFetch>
<errorLevel type="suppress">
<directory name="xxx/xxx" />
</errorLevel>
</InvalidPropertyFetch>
<InvalidArrayAssignment>
<errorLevel type="suppress">
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</InvalidArrayAssignment>
<PossiblyNullArrayOffset errorLevel="info" />
<ImplementedReturnTypeMismatch errorLevel="info" />
<PossiblyInvalidArrayAccess>
<errorLevel type="suppress">
<directory name="xxx/xxx" />
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</PossiblyInvalidArrayAccess>
<EmptyArrayAccess errorLevel="suppress" />
<NullArrayAccess errorLevel="info">
<errorLevel type="error">
<directory name="xxx/xxx" />
</errorLevel>
</NullArrayAccess>
<PossiblyNullArrayAccess errorLevel="suppress" />
<ForbiddenCode>
<errorLevel type="suppress">
<directory name="xxx/xxx" />
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</ForbiddenCode>
<PossiblyNullReference>
<errorLevel type="suppress">
<directory name="xxx/xxx" />
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</PossiblyNullReference>
<PossiblyFalseReference>
<errorLevel type="suppress">
<directory name="xxx/xxx" />
</errorLevel>
</PossiblyFalseReference>
<PossiblyNullArgument>
<errorLevel type="suppress">
<directory name="xxx/xxx" />
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</PossiblyNullArgument>
<NullArgument>
<errorLevel type="suppress">
<directory name="xxx/xxx" />
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</NullArgument>
<InvalidReturnType>
<errorLevel type="suppress">
<directory name="xxx/xxx" />
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</InvalidReturnType>
<MoreSpecificReturnType errorLevel="suppress" />
<InvalidCast>
<errorLevel type="info">
<directory name="xxx/xxx" />
</errorLevel>
</InvalidCast>
<InvalidDocblock errorLevel="suppress">
<errorLevel type="error">
<directory name="xxx/xxx" />
</errorLevel>
</InvalidDocblock>
<MissingDocblockType>
<errorLevel type="suppress">
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</MissingDocblockType>
<InvalidScalarArgument errorLevel="info">
<errorLevel type="error">
<directory name="xxx/xxx" />
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</InvalidScalarArgument>
<DeprecatedMethod errorLevel="info">
<errorLevel type="error">
<directory name="xxx/xxx" />
</errorLevel>
</DeprecatedMethod>
<NoInterfaceProperties errorLevel="info" />
<MixedArgument errorLevel="suppress">
<errorLevel type="error">
<file name="xxx/xxx/xxx.php" />
<directory name="xxx/xxx" />
</errorLevel>
</MixedArgument>
<MixedAssignment errorLevel="suppress">
<errorLevel type="error">
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</MixedAssignment>
<MixedOperand errorLevel="suppress">
<errorLevel type="error">
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</MixedOperand>
<MixedMethodCall errorLevel="suppress">
<errorLevel type="error">
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</MixedMethodCall>
<MixedPropertyFetch errorLevel="suppress">
<errorLevel type="error">
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</MixedPropertyFetch>
<MixedPropertyAssignment errorLevel="suppress">
<errorLevel type="error">
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</MixedPropertyAssignment>
<MixedInferredReturnType errorLevel="suppress">
<errorLevel type="error">
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</MixedInferredReturnType>
<MixedReturnStatement errorLevel="suppress" />
<MixedArrayAccess errorLevel="suppress" />
<MixedArrayAssignment errorLevel="suppress" />
<MixedArrayOffset errorLevel="suppress" />
<MixedTypeCoercion errorLevel="suppress" />
<MoreSpecificImplementedParamType errorLevel="info" />
<MismatchingDocblockReturnType>
<errorLevel type="suppress">
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</MismatchingDocblockReturnType>
<MismatchingDocblockParamType>
<errorLevel type="suppress">
<directory name="xxx/xxx" />
</errorLevel>
</MismatchingDocblockParamType>
<TypeCoercion errorLevel="info" />
<PossiblyNullPropertyFetch errorLevel="suppress">
<errorLevel type="error">
<directory name="xxx/xxx" />
</errorLevel>
</PossiblyNullPropertyFetch>
<TooManyArguments errorLevel="info" />
<MisplacedRequiredParam errorLevel="suppress" />
<MissingPropertyType errorLevel="info">
<errorLevel type="suppress">
<directory name="xxx/xxx" />
</errorLevel>
<errorLevel type="error">
<directory name="xxx/xxx" />
</errorLevel>
</MissingPropertyType>
<MissingReturnType errorLevel="info">
<errorLevel type="suppress">
<directory name="xxx/xxx" />
</errorLevel>
<errorLevel type="error">
<directory name="xxx/xxx" />
</errorLevel>
</MissingReturnType>
<LessSpecificReturnType>
<errorLevel type="suppress">
<directory name="xxx/xxx" />
</errorLevel>
</LessSpecificReturnType>
<LessSpecificReturnStatement errorLevel="info" />
<MissingClosureReturnType errorLevel="suppress" />
<MisplacedRequiredParam errorLevel="suppress" />
<TooFewArguments>
<errorLevel type="suppress">
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</TooFewArguments>
<RedundantCondition>
<errorLevel type="suppress">
<directory name="xxx/xxx" />
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</RedundantCondition>
<DocblockTypeContradiction errorLevel="info" />
<RedundantConditionGivenDocblockType errorLevel="info" />
<InvalidArgument>
<errorLevel type="suppress">
<directory name="xxx/xxx" />
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</InvalidArgument>
<PossiblyFalseArgument errorLevel="info">
<errorLevel type="error">
<directory name="xxx/xxx" />
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</PossiblyFalseArgument>
<PossiblyInvalidArgument>
<errorLevel type="suppress">
<file name="xxx/xxx/xxx.php" />
<directory name="xxx/xxx" />
</errorLevel>
<errorLevel type="info">
<directory name="xxx/xxx" />
</errorLevel>
</PossiblyInvalidArgument>
<PossiblyUndefinedVariable>
<errorLevel type="suppress">
<directory name="xxx/xxx" />
</errorLevel>
</PossiblyUndefinedVariable>
<PossiblyUndefinedGlobalVariable errorLevel="info" />
<MissingConstructor errorLevel="suppress" />
<PossiblyUndefinedMethod>
<errorLevel type="suppress">
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</PossiblyUndefinedMethod>
<UndefinedMethod>
<errorLevel type="suppress">
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</UndefinedMethod>
<DuplicateClass>
<errorLevel type="suppress">
<directory name="xxx/xxx" />
<file name="xxx/xxx/xxx.php" />
</errorLevel>
</DuplicateClass>
<PropertyNotSetInConstructor errorLevel="info">
<errorLevel type="suppress">
<directory name="xxx/xxx" />
</errorLevel>
</PropertyNotSetInConstructor>
<PossiblyUnusedMethod>
<errorLevel type="suppress">
<directory name="xxx/xxx" />
</errorLevel>
</PossiblyUnusedMethod>
<UnusedClass>
<errorLevel type="suppress">
<directory name="xxx/xxx" />
</errorLevel>
</UnusedClass>
<MissingParamType errorLevel="info" />
<MissingClosureParamType errorLevel="info" />
</issueHandlers>
<mockClasses>
<class name="Mockery" />
<class name="Mockery\Mock" />
<class name="Mockery\MockInterface" />
<class name="PHPUnit_Framework_MockObject_MockObject" />
<class name="PHPUnit\Framework\MockObject\MockObject" />
</mockClasses>
</psalm>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment