Skip to content
Permalink
Browse files

Fully qualify constants and function calls (#1849)

This should give a small performance boost.
Part of #1837.

The change is enforced via phpcs and can be autofixed
with phpcbf.
  • Loading branch information...
LeSuisse authored and muglug committed Jun 26, 2019
1 parent e4e48d2 commit f29826b958b3fcb4456f5ea0aa9eefe021b92d1e
Showing with 1,448 additions and 5 deletions.
  1. +2 −1 composer.json
  2. +12 −0 phpcs.xml
  3. +14 −0 src/Psalm/CodeLocation.php
  4. +2 −0 src/Psalm/CodeLocation/ParseErrorLocation.php
  5. +18 −0 src/Psalm/Codebase.php
  6. +45 −0 src/Psalm/Config.php
  7. +17 −0 src/Psalm/Config/Creator.php
  8. +1 −0 src/Psalm/Config/ErrorLevelFileFilter.php
  9. +19 −0 src/Psalm/Config/FileFilter.php
  10. +7 −0 src/Psalm/Config/IssueHandler.php
  11. +2 −0 src/Psalm/Config/ProjectFileFilter.php
  12. +10 −0 src/Psalm/Context.php
  13. +17 −0 src/Psalm/DocComment.php
  14. +14 −0 src/Psalm/ErrorBaseline.php
  15. +1 −0 src/Psalm/FileBasedPluginAdapter.php
  16. +6 −0 src/Psalm/FileManipulation.php
  17. +3 −0 src/Psalm/Internal/Analyzer/AlgebraAnalyzer.php
  18. +2 −0 src/Psalm/Internal/Analyzer/CanAlias.php
  19. +14 −0 src/Psalm/Internal/Analyzer/ClassAnalyzer.php
  20. +8 −0 src/Psalm/Internal/Analyzer/ClassLikeAnalyzer.php
  21. +21 −0 src/Psalm/Internal/Analyzer/CommentAnalyzer.php
  22. +8 −0 src/Psalm/Internal/Analyzer/FileAnalyzer.php
  23. +3 −0 src/Psalm/Internal/Analyzer/FunctionAnalyzer.php
  24. +4 −0 src/Psalm/Internal/Analyzer/FunctionLike/ReturnTypeAnalyzer.php
  25. +3 −0 src/Psalm/Internal/Analyzer/FunctionLike/ReturnTypeCollector.php
  26. +13 −0 src/Psalm/Internal/Analyzer/FunctionLikeAnalyzer.php
  27. +4 −0 src/Psalm/Internal/Analyzer/MethodAnalyzer.php
  28. +6 −0 src/Psalm/Internal/Analyzer/NamespaceAnalyzer.php
  29. +48 −0 src/Psalm/Internal/Analyzer/ProjectAnalyzer.php
  30. +7 −0 src/Psalm/Internal/Analyzer/ScopeAnalyzer.php
  31. +7 −0 src/Psalm/Internal/Analyzer/Statements/Block/DoAnalyzer.php
  32. +3 −0 src/Psalm/Internal/Analyzer/Statements/Block/ForAnalyzer.php
  33. +9 −0 src/Psalm/Internal/Analyzer/Statements/Block/ForeachAnalyzer.php
  34. +16 −0 src/Psalm/Internal/Analyzer/Statements/Block/IfAnalyzer.php
  35. +5 −0 src/Psalm/Internal/Analyzer/Statements/Block/LoopAnalyzer.php
  36. +7 −0 src/Psalm/Internal/Analyzer/Statements/Block/SwitchAnalyzer.php
  37. +10 −0 src/Psalm/Internal/Analyzer/Statements/Block/TryAnalyzer.php
  38. +2 −0 src/Psalm/Internal/Analyzer/Statements/Block/WhileAnalyzer.php
  39. +4 −0 src/Psalm/Internal/Analyzer/Statements/Expression/ArrayAnalyzer.php
  40. +7 −0 src/Psalm/Internal/Analyzer/Statements/Expression/AssertionFinder.php
  41. +8 −0 src/Psalm/Internal/Analyzer/Statements/Expression/Assignment/ArrayAssignmentAnalyzer.php
  42. +4 −0 src/Psalm/Internal/Analyzer/Statements/Expression/Assignment/PropertyAssignmentAnalyzer.php
  43. +3 −0 src/Psalm/Internal/Analyzer/Statements/Expression/AssignmentAnalyzer.php
  44. +12 −0 src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOpAnalyzer.php
  45. +9 −0 src/Psalm/Internal/Analyzer/Statements/Expression/Call/FunctionCallAnalyzer.php
  46. +11 −0 src/Psalm/Internal/Analyzer/Statements/Expression/Call/MethodCallAnalyzer.php
  47. +6 −0 src/Psalm/Internal/Analyzer/Statements/Expression/Call/NewAnalyzer.php
  48. +9 −0 src/Psalm/Internal/Analyzer/Statements/Expression/Call/StaticCallAnalyzer.php
  49. +14 −0 src/Psalm/Internal/Analyzer/Statements/Expression/CallAnalyzer.php
  50. +10 −0 src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/ArrayFetchAnalyzer.php
  51. +3 −0 src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/ConstFetchAnalyzer.php
  52. +7 −0 src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/PropertyFetchAnalyzer.php
  53. +1 −0 src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/VariableFetchAnalyzer.php
  54. +20 −0 src/Psalm/Internal/Analyzer/Statements/Expression/IncludeAnalyzer.php
  55. +10 −0 src/Psalm/Internal/Analyzer/Statements/Expression/TernaryAnalyzer.php
  56. +11 −0 src/Psalm/Internal/Analyzer/Statements/ExpressionAnalyzer.php
  57. +2 −0 src/Psalm/Internal/Analyzer/Statements/ReturnAnalyzer.php
  58. +20 −0 src/Psalm/Internal/Analyzer/StatementsAnalyzer.php
  59. +13 −0 src/Psalm/Internal/Analyzer/TypeAnalyzer.php
  60. +13 −0 src/Psalm/Internal/Clause.php
  61. +12 −0 src/Psalm/Internal/Codebase/Analyzer.php
  62. +5 −0 src/Psalm/Internal/Codebase/CallMap.php
  63. +14 −0 src/Psalm/Internal/Codebase/ClassLikes.php
  64. +6 −0 src/Psalm/Internal/Codebase/Functions.php
  65. +7 −0 src/Psalm/Internal/Codebase/Methods.php
  66. +8 −0 src/Psalm/Internal/Codebase/Populator.php
  67. +3 −0 src/Psalm/Internal/Codebase/Properties.php
  68. +2 −0 src/Psalm/Internal/Codebase/PropertyMap.php
  69. +2 −0 src/Psalm/Internal/Codebase/Reflection.php
  70. +14 −0 src/Psalm/Internal/Codebase/Scanner.php
  71. +1 −0 src/Psalm/Internal/Diff/AstDiffer.php
  72. +6 −0 src/Psalm/Internal/Diff/ClassStatementsDiffer.php
  73. +6 −0 src/Psalm/Internal/Diff/FileDiffer.php
  74. +4 −0 src/Psalm/Internal/Diff/FileStatementsDiffer.php
  75. +4 −0 src/Psalm/Internal/Diff/NamespaceStatementsDiffer.php
  76. +2 −0 src/Psalm/Internal/ExecutionEnvironment/BuildInfoCollector.php
  77. +7 −0 src/Psalm/Internal/ExecutionEnvironment/GitInfoCollector.php
  78. +3 −0 src/Psalm/Internal/ExecutionEnvironment/SystemCommandExecutor.php
  79. +4 −0 src/Psalm/Internal/FileManipulation/FileManipulationBuffer.php
  80. +9 −0 src/Psalm/Internal/FileManipulation/FunctionDocblockManipulator.php
  81. +42 −0 src/Psalm/Internal/Fork/Pool.php
  82. +7 −0 src/Psalm/Internal/Fork/PsalmRestarter.php
  83. +1 −0 src/Psalm/Internal/LanguageServer/ClientHandler.php
  84. +2 −0 src/Psalm/Internal/LanguageServer/EmitterTrait.php
  85. +17 −0 src/Psalm/Internal/LanguageServer/LanguageServer.php
  86. +3 −0 src/Psalm/Internal/LanguageServer/Message.php
  87. +4 −0 src/Psalm/Internal/LanguageServer/ProtocolStreamReader.php
  88. +3 −0 src/Psalm/Internal/LanguageServer/Server/TextDocument.php
  89. +4 −0 src/Psalm/Internal/PluginManager/Command/DisableCommand.php
  90. +4 −0 src/Psalm/Internal/PluginManager/Command/EnableCommand.php
  91. +7 −0 src/Psalm/Internal/PluginManager/Command/ShowCommand.php
  92. +7 −0 src/Psalm/Internal/PluginManager/ComposerLock.php
  93. +4 −0 src/Psalm/Internal/PluginManager/ConfigFile.php
  94. +6 −0 src/Psalm/Internal/PluginManager/PluginList.php
  95. +6 −0 src/Psalm/Internal/PluginManager/PluginListFactory.php
  96. +17 −0 src/Psalm/Internal/Provider/ClassLikeStorageCacheProvider.php
  97. +2 −0 src/Psalm/Internal/Provider/ClassLikeStorageProvider.php
  98. +7 −0 src/Psalm/Internal/Provider/FileProvider.php
  99. +8 −0 src/Psalm/Internal/Provider/FileReferenceCacheProvider.php
  100. +6 −0 src/Psalm/Internal/Provider/FileReferenceProvider.php
  101. +17 −0 src/Psalm/Internal/Provider/FileStorageCacheProvider.php
  102. +2 −0 src/Psalm/Internal/Provider/FileStorageProvider.php
  103. +3 −0 src/Psalm/Internal/Provider/FunctionExistenceProvider.php
  104. +3 −0 src/Psalm/Internal/Provider/FunctionParamsProvider.php
  105. +3 −0 src/Psalm/Internal/Provider/FunctionReturnTypeProvider.php
  106. +3 −0 src/Psalm/Internal/Provider/MethodExistenceProvider.php
  107. +3 −0 src/Psalm/Internal/Provider/MethodParamsProvider.php
  108. +3 −0 src/Psalm/Internal/Provider/MethodReturnTypeProvider.php
  109. +3 −0 src/Psalm/Internal/Provider/MethodVisibilityProvider.php
  110. +22 −0 src/Psalm/Internal/Provider/ParserCacheProvider.php
  111. +3 −0 src/Psalm/Internal/Provider/PropertyExistenceProvider.php
  112. +3 −0 src/Psalm/Internal/Provider/PropertyTypeProvider.php
  113. +3 −0 src/Psalm/Internal/Provider/PropertyVisibilityProvider.php
  114. +1 −0 src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayColumnReturnTypeProvider.php
  115. +4 −0 src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayFilterReturnTypeProvider.php
  116. +6 −0 src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayMapReturnTypeProvider.php
  117. +2 −0 src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayMergeReturnTypeProvider.php
  118. +5 −0 src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayReduceReturnTypeProvider.php
  119. +1 −0 src/Psalm/Internal/Provider/ReturnTypeProvider/ArraySliceReturnTypeProvider.php
  120. +1 −0 src/Psalm/Internal/Provider/ReturnTypeProvider/IteratorToArrayReturnTypeProvider.php
  121. +9 −0 src/Psalm/Internal/Provider/ReturnTypeProvider/ParseUrlReturnTypeProvider.php
  122. +1 −0 src/Psalm/Internal/Provider/ReturnTypeProvider/SimpleXmlElementAsXml.php
  123. +1 −0 src/Psalm/Internal/Provider/ReturnTypeProvider/StrReplaceReturnTypeProvider.php
  124. +1 −0 src/Psalm/Internal/Provider/ReturnTypeProvider/VersionCompareReturnTypeProvider.php
  125. +10 −0 src/Psalm/Internal/Provider/StatementsProvider.php
  126. +5 −0 src/Psalm/Internal/Scanner/PhpStormMetaScanner.php
  127. +3 −0 src/Psalm/Internal/Traverser/CustomTraverser.php
  128. +6 −0 src/Psalm/Internal/Type/ParseTree.php
  129. +12 −0 src/Psalm/Internal/Type/TypeCombination.php
  130. +1 −0 src/Psalm/Internal/Visitor/CloningVisitor.php
  131. +8 −0 src/Psalm/Internal/Visitor/PartialParserVisitor.php
  132. +22 −0 src/Psalm/Internal/Visitor/ReflectorVisitor.php
  133. +2 −0 src/Psalm/Issue/ArgumentIssue.php
  134. +3 −0 src/Psalm/Issue/CodeIssue.php
  135. +2 −0 src/Psalm/Issue/FunctionIssue.php
  136. +2 −0 src/Psalm/Issue/MethodIssue.php
  137. +14 −0 src/Psalm/IssueBuffer.php
  138. +20 −0 src/Psalm/Plugin/Shepherd.php
  139. +2 −0 src/Psalm/PluginRegistrationSocket.php
  140. +3 −0 src/Psalm/Progress/DebugProgress.php
  141. +3 −0 src/Psalm/Progress/DefaultProgress.php
  142. +6 −0 src/Psalm/Progress/LongProgress.php
  143. +6 −0 src/Psalm/Progress/Progress.php
  144. +2 −0 src/Psalm/Report.php
  145. +2 −0 src/Psalm/Report/CheckstyleReport.php
  146. +7 −0 src/Psalm/Report/CompactReport.php
  147. +1 −0 src/Psalm/Report/ConsoleReport.php
  148. +1 −0 src/Psalm/Report/EmacsReport.php
  149. +1 −0 src/Psalm/Report/JsonReport.php
  150. +1 −0 src/Psalm/Report/JsonSummaryReport.php
  151. +1 −0 src/Psalm/Report/PylintReport.php
  152. +2 −0 src/Psalm/Report/SonarqubeReport.php
  153. +1 −0 src/Psalm/Report/TextReport.php
  154. +3 −0 src/Psalm/Storage/Assertion.php
  155. +3 −0 src/Psalm/Storage/FunctionLikeStorage.php
  156. +24 −0 src/Psalm/Type.php
  157. +13 −0 src/Psalm/Type/Algebra.php
  158. +11 −0 src/Psalm/Type/Atomic.php
  159. +3 −0 src/Psalm/Type/Atomic/CallableTrait.php
  160. +3 −0 src/Psalm/Type/Atomic/GenericTrait.php
  161. +1 −0 src/Psalm/Type/Atomic/GetClassT.php
  162. +2 −0 src/Psalm/Type/Atomic/HasIntersectionTrait.php
  163. +6 −0 src/Psalm/Type/Atomic/ObjectLike.php
  164. +2 −0 src/Psalm/Type/Atomic/TArray.php
  165. +5 −0 src/Psalm/Type/Atomic/TClassString.php
  166. +3 −0 src/Psalm/Type/Atomic/TGenericObject.php
  167. +3 −0 src/Psalm/Type/Atomic/TIterable.php
  168. +5 −0 src/Psalm/Type/Atomic/TKeyOfClassConstant.php
  169. +5 −0 src/Psalm/Type/Atomic/TLiteralClassString.php
  170. +4 −0 src/Psalm/Type/Atomic/TLiteralString.php
  171. +2 −0 src/Psalm/Type/Atomic/TNamedObject.php
  172. +4 −0 src/Psalm/Type/Atomic/TObjectWithProperties.php
  173. +1 −0 src/Psalm/Type/Atomic/TTemplateParam.php
  174. +15 −0 src/Psalm/Type/Reconciler.php
  175. +10 −0 src/Psalm/Type/Union.php
  176. +4 −4 src/command_functions.php
  177. +2 −0 src/functions.php
  178. +1 −0 tests/AnnotationTest.php
  179. +2 −0 tests/ArrayAccessTest.php
  180. +3 −0 tests/BinaryOperationTest.php
  181. +2 −0 tests/ClassTest.php
  182. +2 −0 tests/CodebaseTest.php
  183. +1 −0 tests/ComposerLockTest.php
  184. +8 −0 tests/Config/ConfigFileTest.php
  185. +13 −0 tests/Config/ConfigTest.php
  186. +2 −0 tests/Config/CreatorTest.php
  187. +1 −0 tests/Config/Plugin/Hook/SqlStringProvider.php
  188. +8 −0 tests/Config/PluginTest.php
  189. +13 −0 tests/DocumentationTest.php
  190. +13 −0 tests/EndToEnd/PsalmEndToEndTest.php
  191. +1 −0 tests/ErrorBaselineTest.php
  192. +5 −0 tests/FileDiffTest.php
  193. +1 −0 tests/FileManipulation/ClassConstantMoveTest.php
  194. +1 −0 tests/FileManipulation/ClassMoveTest.php
  195. +1 −0 tests/FileManipulation/FileManipulationTest.php
  196. +1 −0 tests/FileManipulation/MethodMoveTest.php
  197. +1 −0 tests/FileManipulation/NamespaceMoveTest.php
  198. +1 −0 tests/FileManipulation/PropertyMoveTest.php
  199. +1 −0 tests/FileManipulation/UndefinedVariableManipulationTest.php
  200. +2 −0 tests/FileReferenceTest.php
  201. +4 −0 tests/FileUpdates/AnalyzedMethodTest.php
  202. +4 −0 tests/FileUpdates/CachedStorageTest.php
  203. +5 −0 tests/FileUpdates/ErrorAfterUpdateTest.php
  204. +4 −0 tests/FileUpdates/ErrorFixTest.php
  205. +7 −0 tests/FileUpdates/TemporaryUpdateTest.php
  206. +2 −0 tests/FunctionCallTest.php
  207. +4 −0 tests/IncludeTest.php
  208. +1 −0 tests/Internal/Provider/ClassLikeStorageInstanceCacheProvider.php
  209. +4 −0 tests/Internal/Provider/FakeFileProvider.php
  210. +1 −0 tests/Internal/Provider/FileStorageInstanceCacheProvider.php
  211. +1 −0 tests/Internal/Provider/ParserInstanceCacheProvider.php
  212. +2 −0 tests/IssueSuppressionTest.php
  213. +1 −0 tests/JsonOutputTest.php
  214. +2 −0 tests/ListTest.php
  215. +1 −0 tests/Loop/DoTest.php
  216. +1 −0 tests/Loop/ForTest.php
  217. +1 −0 tests/Loop/ForeachTest.php
  218. +1 −0 tests/MagicMethodAnnotationTest.php
  219. +2 −0 tests/MagicPropertyTest.php
  220. +3 −0 tests/MethodCallTest.php
  221. +2 −0 tests/MethodSignatureTest.php
  222. +9 −0 tests/ProjectCheckerTest.php
  223. +1 −0 tests/PropertyTypeTest.php
  224. +1 −0 tests/PsalmPluginTest.php
  225. +2 −0 tests/RedundantConditionTest.php
  226. +6 −0 tests/ReportOutputTest.php
  227. +2 −0 tests/ScopeTest.php
  228. +4 −0 tests/StubTest.php
  229. +2 −0 tests/SwitchTypeTest.php
  230. +1 −0 tests/Template/ClassTemplateExtendsTest.php
  231. +1 −0 tests/Template/ClassTemplateTest.php
  232. +5 −0 tests/TestCase.php
  233. +2 −0 tests/TestConfig.php
  234. +2 −0 tests/TraitTest.php
  235. +6 −0 tests/Traits/InvalidCodeAnalysisTestTrait.php
  236. +6 −0 tests/Traits/ValidCodeAnalysisTestTrait.php
  237. +1 −0 tests/TypeCombinationTest.php
  238. +3 −0 tests/TypeParseTest.php
  239. +1 −0 tests/TypeReconciliationTest.php
  240. +2 −0 tests/TypeTest.php
  241. +3 −0 tests/UnusedCodeTest.php
  242. +2 −0 tests/UnusedVariableTest.php
@@ -51,7 +51,8 @@
"bamarni/composer-bin-plugin": "^1.2",
"psalm/plugin-phpunit": "^0.6",
"phpmyadmin/sql-parser": "^5.0",
"symfony/process": "^4.3"
"symfony/process": "^4.3",
"slevomat/coding-standard": "^5.0"
},
"suggest": {
"ext-igbinary": "^2.0.5"
@@ -1,6 +1,18 @@
<?xml version="1.0"?>
<ruleset name="PHP_CodeSniffer">
<config name="installed_paths" value="../../slevomat/coding-standard"/>
<rule ref="PSR2" />
<!-- Forbid usage of a function or a class constant via fallback global name -->
<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly">
<properties>
<property name="allowFallbackGlobalConstants" type="boolean" value="false"/>
<property name="allowFallbackGlobalFunctions" type="boolean" value="false"/>
<property name="allowFullyQualifiedGlobalConstants" type="boolean" value="true"/>
<property name="allowFullyQualifiedGlobalFunctions" type="boolean" value="true"/>
<property name="allowFullyQualifiedGlobalClasses" type="boolean" value="true"/>
</properties>
<exclude name="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName"/>
</rule>

<file>bin/</file>
<file>src/</file>
@@ -3,6 +3,20 @@
use PhpParser;
use Psalm\Internal\Analyzer\CommentAnalyzer;
use function strlen;
use function strpos;
use function explode;
use function substr;
use function trim;
use function preg_replace;
use function str_replace;
use function preg_quote;
use function preg_match;
use const PREG_OFFSET_CAPTURE;
use function strrpos;
use function min;
use function max;
use function substr_count;
class CodeLocation
{
@@ -2,6 +2,8 @@
namespace Psalm\CodeLocation;
use PhpParser;
use function substr_count;
use function substr;
class ParseErrorLocation extends \Psalm\CodeLocation
{
@@ -17,6 +17,24 @@
use Psalm\Storage\ClassLikeStorage;
use Psalm\Storage\FileStorage;
use Psalm\Storage\FunctionLikeStorage;
use const PHP_MAJOR_VERSION;
use const PHP_MINOR_VERSION;
use function in_array;
use function array_combine;
use function strpos;
use function strtolower;
use function explode;
use function array_merge;
use function substr;
use function error_log;
use function ksort;
use function krsort;
use function preg_match;
use function strlen;
use function count;
use function array_shift;
use function substr_count;
use function strrpos;
class Codebase
{
@@ -20,6 +20,51 @@
use Psalm\Progress\Progress;
use Psalm\Progress\VoidProgress;
use SimpleXMLElement;
use const PHP_EOL;
use function realpath;
use function is_dir;
use function dirname;
use const DIRECTORY_SEPARATOR;
use function file_exists;
use function file_get_contents;
use function sha1;
use function libxml_use_internal_errors;
use function libxml_get_errors;
use const LIBXML_ERR_FATAL;
use const LIBXML_ERR_ERROR;
use function libxml_clear_errors;
use function sys_get_temp_dir;
use function mkdir;
use function trigger_error;
use const E_USER_ERROR;
use function phpversion;
use function version_compare;
use function intval;
use function strtolower;
use function preg_replace;
use function class_exists;
use function count;
use function reset;
use function preg_quote;
use function in_array;
use function explode;
use function get_class;
use function array_pop;
use function strpos;
use function preg_match;
use function array_merge;
use function get_defined_constants;
use function get_defined_functions;
use function json_decode;
use function array_unique;
use function strtr;
use function strrpos;
use function substr;
use function substr_count;
use function scandir;
use function filetype;
use function unlink;
use function rmdir;
class Config
{
@@ -3,6 +3,23 @@
use Psalm\Exception\ConfigCreationException;
use Psalm\Internal\Provider;
use function is_dir;
use const DIRECTORY_SEPARATOR;
use function file_exists;
use function json_decode;
use function file_get_contents;
use function is_array;
use function dirname;
use function str_replace;
use function implode;
use function array_merge;
use function preg_replace;
use function array_unique;
use function sort;
use function glob;
use function explode;
use function array_shift;
use function count;
class Creator
{
@@ -2,6 +2,7 @@
namespace Psalm\Config;
use SimpleXMLElement;
use function in_array;
class ErrorLevelFileFilter extends FileFilter
{
@@ -3,6 +3,25 @@
use SimpleXMLElement;
use Psalm\Exception\ConfigException;
use function is_bool;
use function strtolower;
use const DIRECTORY_SEPARATOR;
use function strpos;
use function array_map;
use function array_filter;
use function glob;
use function realpath;
use function is_dir;
use function readlink;
use function stripos;
use function str_replace;
use function preg_match;
use function set_error_handler;
use const E_WARNING;
use function restore_error_handler;
use function preg_replace;
use function in_array;
use function explode;
class FileFilter
{
@@ -2,6 +2,13 @@
namespace Psalm\Config;
use SimpleXMLElement;
use function in_array;
use function strtolower;
use function array_filter;
use function array_map;
use function substr;
use function scandir;
use function dirname;
class IssueHandler
{
@@ -2,6 +2,8 @@
namespace Psalm\Config;
use SimpleXMLElement;
use function strpos;
use function stripos;
class ProjectFileFilter extends FileFilter
{
@@ -8,6 +8,16 @@
use Psalm\Type\Reconciler;
use Psalm\Type;
use Psalm\Type\Union;
use function in_array;
use function count;
use function array_filter;
use function preg_quote;
use function preg_match;
use function strpos;
use function array_keys;
use function strtolower;
use function preg_replace;
use function json_encode;
class Context
{
@@ -3,6 +3,23 @@
namespace Psalm;
use Psalm\Exception\DocblockParseException;
use function trim;
use function preg_replace;
use function explode;
use function preg_match;
use function rtrim;
use function str_replace;
use function implode;
use function preg_match_all;
use const PREG_SET_ORDER;
use function array_filter;
use function strlen;
use function min;
use function str_repeat;
use function substr;
use function in_array;
use const PREG_OFFSET_CAPTURE;
use function strpos;
class DocComment
{
@@ -2,6 +2,20 @@
namespace Psalm;
use Psalm\Internal\Provider\FileProvider;
use function array_reduce;
use const LIBXML_NOBLANKS;
use function str_replace;
use function min;
use function array_intersect;
use function array_filter;
use function strpos;
use function ksort;
use function array_merge;
use function get_loaded_extensions;
use function usort;
use function implode;
use function phpversion;
use function array_map;
class ErrorBaseline
{
@@ -4,6 +4,7 @@
use Psalm\Internal\Analyzer\ClassLikeAnalyzer;
use Psalm\Internal\Scanner\FileScanner;
use SimpleXMLElement;
use function reset;
class FileBasedPluginAdapter implements Plugin\PluginEntryPointInterface
{
@@ -1,6 +1,12 @@
<?php
namespace Psalm;
use function sha1;
use function strrpos;
use function strlen;
use function substr;
use function trim;
class FileManipulation
{
/** @var int */
@@ -8,6 +8,9 @@
use Psalm\Issue\RedundantCondition;
use Psalm\IssueBuffer;
use Psalm\Type\Algebra;
use function array_intersect_key;
use function count;
use function array_unique;
/**
* @internal
@@ -5,6 +5,8 @@
use Psalm\Aliases;
use Psalm\CodeLocation;
use Psalm\Internal\FileManipulation\FileManipulationBuffer;
use function implode;
use function strtolower;
trait CanAlias
{
@@ -35,6 +35,20 @@
use Psalm\Storage\ClassLikeStorage;
use Psalm\Storage\FunctionLikeParameter;
use Psalm\Type;
use function preg_replace;
use function preg_match;
use function explode;
use function array_pop;
use function array_merge;
use function strtolower;
use function implode;
use function substr;
use function array_map;
use function array_shift;
use function str_replace;
use function count;
use function array_search;
use function array_keys;
/**
* @internal
@@ -17,6 +17,14 @@
use Psalm\StatementsSource;
use Psalm\Storage\ClassLikeStorage;
use Psalm\Type;
use function strtolower;
use function preg_replace;
use function in_array;
use function preg_match;
use function explode;
use function array_pop;
use function implode;
use function gettype;
/**
* @internal
@@ -14,6 +14,27 @@
use Psalm\Internal\Scanner\VarDocblockComment;
use Psalm\Internal\Type\ParseTree;
use Psalm\Type;
use function trim;
use function substr_count;
use function strlen;
use function preg_replace;
use function str_replace;
use function preg_match;
use function count;
use function reset;
use function preg_split;
use const PREG_SPLIT_DELIM_CAPTURE;
use const PREG_SPLIT_NO_EMPTY;
use function array_shift;
use function implode;
use function substr;
use function strpos;
use function strtolower;
use function in_array;
use function explode;
use function array_merge;
use const PREG_OFFSET_CAPTURE;
use function rtrim;
/**
* @internal
@@ -11,6 +11,14 @@
use Psalm\IssueBuffer;
use Psalm\StatementsSource;
use Psalm\Type;
use function implode;
use function strtolower;
use function explode;
use function strpos;
use function array_keys;
use function count;
use function array_merge;
use function array_diff;
/**
* @internal

0 comments on commit f29826b

Please sign in to comment.
You can’t perform that action at this time.