psalm.xml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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. <InvalidReturnType errorLevel="info" />
  83. <!-- level 7 issues - even worse -->
  84. <InvalidArgument errorLevel="info" />
  85. <InvalidPropertyAssignmentValue>
  86. <errorLevel type="suppress">
  87. <file name="src/Console/ConsoleInputSubcommand.php" />
  88. <file name="src/I18n/DateFormatTrait.php" />
  89. </errorLevel>
  90. </InvalidPropertyAssignmentValue>
  91. <!-- CakePHP Specific -->
  92. <DeprecatedClass>
  93. <errorLevel type="suppress">
  94. <file name="src/Console/Shell.php" />
  95. <file name="src/Console/ShellDispatcher.php" />
  96. <directory name="src/Shell" />
  97. </errorLevel>
  98. </DeprecatedClass>
  99. <PossiblyUndefinedArrayOffset>
  100. <errorLevel type="suppress">
  101. <file name="src/Database/Driver/Mysql.php" />
  102. <file name="src/I18n/Parser/PoFileParser.php" />
  103. <file name="src/Database/Schema/SqlserverSchema.php" />
  104. <file name="src/Http/ResponseEmitter.php" />
  105. <file name="src/View/Helper/PaginatorHelper.php" />
  106. <file name="src/View/Widget/RadioWidget.php" />
  107. </errorLevel>
  108. </PossiblyUndefinedArrayOffset>
  109. <UndefinedConstant errorLevel="suppress" />
  110. <UndefinedPropertyAssignment>
  111. <errorLevel type="suppress">
  112. <file name="src/Core/StaticConfigTrait.php" />
  113. <file name="src/Database/Log/LoggingStatement.php" />
  114. <file name="src/Http/ServerRequestFactory.php" />
  115. </errorLevel>
  116. </UndefinedPropertyAssignment>
  117. <UndefinedPropertyFetch>
  118. <errorLevel type="suppress">
  119. <file name="src/Core/StaticConfigTrait.php" />
  120. </errorLevel>
  121. </UndefinedPropertyFetch>
  122. <EmptyArrayAccess>
  123. <errorLevel type="suppress">
  124. <file name="src/Database/Dialect/SqlserverDialectTrait.php" />
  125. </errorLevel>
  126. </EmptyArrayAccess>
  127. <LoopInvalidation>
  128. <errorLevel type="suppress">
  129. <file name="src/View/Form/EntityContext.php" />
  130. <file name="src/Core/Configure/Engine/IniConfig.php" />
  131. </errorLevel>
  132. </LoopInvalidation>
  133. <UndefinedClass>
  134. <errorLevel type="suppress">
  135. <file name="src/Cache/Engine/MemcachedEngine.php" />
  136. <file name="src/Cache/Engine/RedisEngine.php" />
  137. <file name="src/ORM/Behavior/Translate/EavStrategy.php" />
  138. </errorLevel>
  139. </UndefinedClass>
  140. <UndefinedMethod>
  141. <errorLevel type="suppress">
  142. <file name="src/Console/Shell.php" />
  143. <file name="src/Controller/Component/AuthComponent.php" />
  144. <file name="src/Datasource/Paginator.php" />
  145. <file name="src/ORM/Association.php" />
  146. <file name="src/ORM/Association/BelongsToMany.php" />
  147. </errorLevel>
  148. </UndefinedMethod>
  149. <NullReference>
  150. <errorLevel type="suppress">
  151. <file name="src/Database/Driver.php" />
  152. </errorLevel>
  153. </NullReference>
  154. <PossiblyUndefinedMethod>
  155. <errorLevel type="suppress">
  156. <file name="src/ORM/LazyEagerLoader.php" />
  157. <file name="src/ORM/ResultSet.php" />
  158. <file name="src/View/XmlView.php" />
  159. </errorLevel>
  160. </PossiblyUndefinedMethod>
  161. <InvalidPassByReference>
  162. <errorLevel type="suppress">
  163. <file name="src/Console/ConsoleInput.php" />
  164. </errorLevel>
  165. </InvalidPassByReference>
  166. <InvalidCast>
  167. <errorLevel type="suppress">
  168. <file name="src/Core/functions.php" />
  169. </errorLevel>
  170. </InvalidCast>
  171. </issueHandlers>
  172. </psalm>