psalm.xml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. <?xml version="1.0"?>
  2. <psalm
  3. totallyTyped="false"
  4. allowCoercionFromStringToClassConst="true"
  5. allowStringToStandInForClass="true"
  6. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  7. xmlns="https://getpsalm.org/schema/config"
  8. xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
  9. >
  10. <projectFiles>
  11. <directory name="src" />
  12. <ignoreFiles>
  13. <directory name="vendor" />
  14. <directory name="src/TestSuite" />
  15. <directory name="src/Filesystem"/>
  16. </ignoreFiles>
  17. </projectFiles>
  18. <issueHandlers>
  19. <LessSpecificReturnType errorLevel="info" />
  20. <!-- level 3 issues - slightly lazy code writing, but provably low false-negatives -->
  21. <MissingClosureReturnType errorLevel="info" />
  22. <MissingReturnType errorLevel="info" />
  23. <MissingPropertyType errorLevel="info" />
  24. <InvalidDocblock errorLevel="info" />
  25. <MisplacedRequiredParam errorLevel="info" />
  26. <PropertyNotSetInConstructor errorLevel="info" />
  27. <MissingConstructor errorLevel="info" />
  28. <MissingClosureParamType errorLevel="info" />
  29. <MissingParamType errorLevel="info" />
  30. <RedundantCondition>
  31. <errorLevel type="suppress">
  32. <file name="src/Utility/Hash.php" />
  33. </errorLevel>
  34. </RedundantCondition>
  35. <DocblockTypeContradiction errorLevel="info" />
  36. <RedundantConditionGivenDocblockType errorLevel="info" />
  37. <UnresolvableInclude errorLevel="info" />
  38. <RawObjectIteration errorLevel="info" />
  39. <!-- level 4 issues - points to possible deficiencies in logic, higher false-positives -->
  40. <MoreSpecificReturnType errorLevel="info" />
  41. <LessSpecificReturnStatement errorLevel="info" />
  42. <TypeCoercion errorLevel="info" />
  43. <PossiblyFalseArgument errorLevel="info" />
  44. <PossiblyFalseIterator errorLevel="info" />
  45. <PossiblyFalseOperand errorLevel="info" />
  46. <PossiblyFalsePropertyAssignmentValue errorLevel="info" />
  47. <PossiblyFalseReference errorLevel="info" />
  48. <PossiblyInvalidArgument errorLevel="info" />
  49. <PossiblyInvalidArrayAccess errorLevel="info" />
  50. <PossiblyInvalidArrayAssignment errorLevel="info" />
  51. <PossiblyInvalidArrayOffset errorLevel="info" />
  52. <PossiblyInvalidFunctionCall errorLevel="info" />
  53. <PossiblyInvalidIterator errorLevel="info" />
  54. <PossiblyInvalidMethodCall errorLevel="info" />
  55. <PossiblyInvalidOperand errorLevel="info" />
  56. <PossiblyInvalidPropertyAssignment errorLevel="info" />
  57. <PossiblyInvalidPropertyAssignmentValue errorLevel="info" />
  58. <PossiblyInvalidPropertyFetch errorLevel="info" />
  59. <PossiblyNullArgument errorLevel="info" />
  60. <PossiblyNullArrayAccess errorLevel="info" />
  61. <PossiblyNullArrayAssignment errorLevel="info" />
  62. <PossiblyNullArrayOffset errorLevel="info" />
  63. <PossiblyNullFunctionCall errorLevel="info" />
  64. <PossiblyNullIterator errorLevel="info" />
  65. <PossiblyNullOperand errorLevel="info" />
  66. <PossiblyNullPropertyAssignment errorLevel="info" />
  67. <PossiblyNullPropertyAssignmentValue errorLevel="info" />
  68. <PossiblyNullPropertyFetch errorLevel="info" />
  69. <PossiblyNullReference errorLevel="info" />
  70. <!-- level 5 issues - should be avoided at mosts costs... -->
  71. <InvalidScalarArgument errorLevel="info" />
  72. <InvalidOperand errorLevel="info" />
  73. <NoInterfaceProperties errorLevel="info" />
  74. <TypeDoesNotContainType errorLevel="info" />
  75. <TypeDoesNotContainNull errorLevel="info" />
  76. <ImplementedReturnTypeMismatch errorLevel="info" />
  77. <!-- level 6 issues - really bad things -->
  78. <InvalidNullableReturnType errorLevel="info" />
  79. <NullableReturnStatement errorLevel="info" />
  80. <MoreSpecificImplementedParamType errorLevel="info" />
  81. <LessSpecificImplementedReturnType errorLevel="info" />
  82. <InvalidReturnStatement errorLevel="info" />
  83. <InvalidReturnType errorLevel="info" />
  84. <!-- level 7 issues - even worse -->
  85. <InvalidArgument errorLevel="info" />
  86. <InvalidPropertyAssignmentValue>
  87. <errorLevel type="suppress">
  88. <file name="src/Console/ConsoleInputSubcommand.php" />
  89. <file name="src/I18n/DateFormatTrait.php" />
  90. </errorLevel>
  91. </InvalidPropertyAssignmentValue>
  92. <!-- CakePHP Specific -->
  93. <DeprecatedClass>
  94. <errorLevel type="suppress">
  95. <file name="src/Console/Shell.php" />
  96. <file name="src/Console/ShellDispatcher.php" />
  97. <directory name="src/Shell" />
  98. </errorLevel>
  99. </DeprecatedClass>
  100. <PossiblyUndefinedArrayOffset>
  101. <errorLevel type="suppress">
  102. <file name="src/Database/Driver/Mysql.php" />
  103. <file name="src/I18n/Parser/PoFileParser.php" />
  104. <file name="src/Database/Schema/SqlserverSchema.php" />
  105. <file name="src/Http/ResponseEmitter.php" />
  106. <file name="src/View/Helper/PaginatorHelper.php" />
  107. <file name="src/View/Widget/RadioWidget.php" />
  108. </errorLevel>
  109. </PossiblyUndefinedArrayOffset>
  110. <UndefinedConstant errorLevel="suppress" />
  111. <UndefinedPropertyAssignment>
  112. <errorLevel type="suppress">
  113. <file name="src/Core/StaticConfigTrait.php" />
  114. <file name="src/Database/Log/LoggingStatement.php" />
  115. <file name="src/Http/ServerRequestFactory.php" />
  116. </errorLevel>
  117. </UndefinedPropertyAssignment>
  118. <UndefinedPropertyFetch>
  119. <errorLevel type="suppress">
  120. <file name="src/Core/StaticConfigTrait.php" />
  121. </errorLevel>
  122. </UndefinedPropertyFetch>
  123. <EmptyArrayAccess>
  124. <errorLevel type="suppress">
  125. <file name="src/Database/Dialect/SqlserverDialectTrait.php" />
  126. </errorLevel>
  127. </EmptyArrayAccess>
  128. <LoopInvalidation>
  129. <errorLevel type="suppress">
  130. <file name="src/View/Form/EntityContext.php" />
  131. <file name="src/Core/Configure/Engine/IniConfig.php" />
  132. </errorLevel>
  133. </LoopInvalidation>
  134. <UndefinedClass>
  135. <errorLevel type="suppress">
  136. <file name="src/Cache/Engine/MemcachedEngine.php" />
  137. <file name="src/Cache/Engine/RedisEngine.php" />
  138. <file name="src/ORM/Behavior/Translate/EavStrategy.php" />
  139. </errorLevel>
  140. </UndefinedClass>
  141. <UndefinedMethod>
  142. <errorLevel type="suppress">
  143. <file name="src/Console/Shell.php" />
  144. <file name="src/Controller/Component/AuthComponent.php" />
  145. <file name="src/Datasource/Paginator.php" />
  146. <file name="src/ORM/Association.php" />
  147. <file name="src/ORM/Association/BelongsToMany.php" />
  148. </errorLevel>
  149. </UndefinedMethod>
  150. <NullReference>
  151. <errorLevel type="suppress">
  152. <file name="src/Database/Driver.php" />
  153. </errorLevel>
  154. </NullReference>
  155. <PossiblyUndefinedMethod>
  156. <errorLevel type="suppress">
  157. <file name="src/ORM/LazyEagerLoader.php" />
  158. <file name="src/ORM/ResultSet.php" />
  159. <file name="src/View/XmlView.php" />
  160. </errorLevel>
  161. </PossiblyUndefinedMethod>
  162. <InvalidPassByReference>
  163. <errorLevel type="suppress">
  164. <file name="src/Console/ConsoleInput.php" />
  165. </errorLevel>
  166. </InvalidPassByReference>
  167. <InvalidCast>
  168. <errorLevel type="suppress">
  169. <file name="src/Core/functions.php" />
  170. </errorLevel>
  171. </InvalidCast>
  172. </issueHandlers>
  173. </psalm>