Skip to content

Commit

Permalink
SlevomatCodingStandard.Commenting.DocCommentSpacing
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-worman committed Dec 14, 2022
1 parent 6435423 commit 69658e8
Show file tree
Hide file tree
Showing 231 changed files with 104 additions and 267 deletions.
5 changes: 1 addition & 4 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,5 @@

<!-- Disallows empty comments. -->
<rule ref="SlevomatCodingStandard.Commenting.EmptyComment"/>
<!-- <rule ref="SlevomatCodingStandard.Commenting.DocCommentSpacing">-->
<!-- <properties>-->
<!-- </properties>-->
<!-- </rule>-->
<rule ref="SlevomatCodingStandard.Commenting.DocCommentSpacing"/>
</ruleset>
1 change: 0 additions & 1 deletion src/Psalm/Aliases.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ final class Aliases
* @param array<lowercase-string, string> $functions_flipped
* @param array<string, string> $constants_flipped
* @internal
*
* @psalm-mutation-free
*/
public function __construct(
Expand Down
6 changes: 0 additions & 6 deletions src/Psalm/Codebase.php
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,6 @@ public function findReferencesToProperty(string $property_id): array

/**
* @return CodeLocation[]
*
* @psalm-return array<int, CodeLocation>
*/
public function findReferencesToClassLike(string $fq_class_name): array
Expand Down Expand Up @@ -782,7 +781,6 @@ public function traitHasCorrectCasing(string $fq_trait_name): bool
* a method, closure, or function.
*
* @param non-empty-string $function_id
*
* @return FunctionStorage|MethodStorage
*/
public function getFunctionLikeStorage(
Expand Down Expand Up @@ -834,7 +832,6 @@ public function methodExists(

/**
* @param string|MethodIdentifier $method_id
*
* @return array<int, FunctionLikeParameter>
*/
public function getMethodParams($method_id): array
Expand Down Expand Up @@ -909,7 +906,6 @@ public function getAppearingMethodId($method_id): ?string

/**
* @param string|MethodIdentifier $method_id
*
* @return array<string, MethodIdentifier>
*/
public function getOverriddenMethodIds($method_id): array
Expand Down Expand Up @@ -1927,7 +1923,6 @@ public function queueClassLikeForScanning(

/**
* @param array<string> $taints
*
* @psalm-suppress PossiblyUnusedMethod
*/
public function addTaintSource(
Expand Down Expand Up @@ -1955,7 +1950,6 @@ public function addTaintSource(

/**
* @param array<string> $taints
*
* @psalm-suppress PossiblyUnusedMethod
*/
public function addTaintSink(
Expand Down
9 changes: 2 additions & 7 deletions src/Psalm/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ class Config

/**
* These are special object classes that allow any and all properties to be get/set on them
*
* @var array<int, lowercase-string>
*/
protected $universal_object_crates;
Expand Down Expand Up @@ -205,7 +206,6 @@ class Config
* The directory to store PHP Parser (and other) caches
*
* @internal
*
* @var string|null
*/
public $cache_directory;
Expand Down Expand Up @@ -728,9 +728,9 @@ public function computeHash(): string

/**
* Creates a new config object from an XML string
*
* @param string|null $current_dir Current working directory, if different to $base_dir
* @param non-empty-string $file_contents
*
* @throws ConfigException
*/
public static function loadFromXML(
Expand Down Expand Up @@ -769,7 +769,6 @@ private static function loadDomDocument(string $base_dir, string $file_contents)

/**
* @param non-empty-string $file_contents
*
* @throws ConfigException
*/
private static function validateXmlConfig(string $base_dir, string $file_contents): void
Expand Down Expand Up @@ -939,12 +938,10 @@ private static function processConfigDeprecations(

/**
* @param non-empty-string $file_contents
*
* @psalm-suppress MixedMethodCall
* @psalm-suppress MixedAssignment
* @psalm-suppress MixedArgument
* @psalm-suppress MixedPropertyFetch
*
* @throws ConfigException
*/
private static function fromXmlAndPaths(
Expand Down Expand Up @@ -1556,9 +1553,7 @@ private static function requirePath(string $path): void

/**
* @template T
*
* @param T::class $must_extend
*
* @return class-string<T>
*/
private function getPluginClassForPath(Codebase $codebase, string $path, string $must_extend): string
Expand Down
4 changes: 0 additions & 4 deletions src/Psalm/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,6 @@ public function updateReferencesPossiblyFromConfusingScope(

/**
* @param array<string, Union> $new_vars_in_scope
*
* @return array<string, Union>
*/
public function getRedefinedVars(array $new_vars_in_scope, bool $include_new_vars = false): array
Expand Down Expand Up @@ -635,9 +634,7 @@ public function decrementReferenceCount(string $ref_id): void
/**
* @param Clause[] $clauses
* @param array<string, bool> $changed_var_ids
*
* @return array{list<Clause>, list<Clause>}
*
* @psalm-pure
*/
public static function removeReconciledClauses(array $clauses, array $changed_var_ids): array
Expand Down Expand Up @@ -666,7 +663,6 @@ public static function removeReconciledClauses(array $clauses, array $changed_va

/**
* @param Clause[] $clauses
*
* @return list<Clause>
*/
public static function filterClauses(
Expand Down
7 changes: 0 additions & 7 deletions src/Psalm/ErrorBaseline.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ final class ErrorBaseline
{
/**
* @param array<string,array<string,array{o:int, s:array<int, string>}>> $existingIssues
*
*
* @psalm-pure
*/
public static function countTotalIssues(array $existingIssues): int
Expand Down Expand Up @@ -72,7 +70,6 @@ public static function create(

/**
* @return array<string,array<string,array{o:int, s: list<string>}>>
*
* @throws ConfigException
*/
public static function read(FileProvider $fileProvider, string $baselineFile): array
Expand Down Expand Up @@ -132,9 +129,7 @@ public static function read(FileProvider $fileProvider, string $baselineFile): a

/**
* @param array<string, list<IssueData>> $issues
*
* @return array<string, array<string, array{o: int, s: list<string>}>>
*
* @throws ConfigException
*/
public static function update(
Expand Down Expand Up @@ -180,7 +175,6 @@ public static function update(

/**
* @param array<string, list<IssueData>> $issues
*
* @return array<string,array<string,array{o:int, s:array<int, string>}>>
*/
private static function countIssueTypesByFile(array $issues): array
Expand All @@ -192,7 +186,6 @@ private static function countIssueTypesByFile(array $issues): array
array_merge(...array_values($issues)),
/**
* @param array<string,array<string,array{o:int, s:array<int, string>}>> $carry
*
* @return array<string,array<string,array{o:int, s:array<int, string>}>>
*/
static function (array $carry, IssueData $issue): array {
Expand Down
10 changes: 0 additions & 10 deletions src/Psalm/Internal/Algebra.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ class Algebra
{
/**
* @param array<string, non-empty-list<non-empty-list<Assertion>>> $all_types
*
* @return array<string, non-empty-list<non-empty-list<Assertion>>>
*
* @psalm-pure
*/
public static function negateTypes(array $all_types): array
Expand Down Expand Up @@ -74,9 +72,7 @@ public static function negateTypes(array $all_types): array
* (!$a) && (!$b) && ($a || $b || $c) => $c
*
* @param list<Clause> $clauses
*
* @return list<Clause>
*
* @psalm-pure
*/
public static function simplifyCNF(array $clauses): array
Expand Down Expand Up @@ -330,7 +326,6 @@ public static function simplifyCNF(array $clauses): array
* @param list<Clause> $clauses
* @param array<string, bool> $cond_referenced_var_ids
* @param array<string, array<int, array<int, Assertion>>> $active_truths
*
* @return array<string, list<list<Assertion>>>
*/
public static function getTruthsFromFormula(
Expand Down Expand Up @@ -403,9 +398,7 @@ public static function getTruthsFromFormula(

/**
* @param non-empty-list<Clause> $clauses
*
* @return list<Clause>
*
* @psalm-pure
*/
public static function groupImpossibilities(array $clauses): array
Expand Down Expand Up @@ -522,9 +515,7 @@ public static function groupImpossibilities(array $clauses): array
/**
* @param list<Clause> $left_clauses
* @param list<Clause> $right_clauses
*
* @return list<Clause>
*
* @psalm-pure
*/
public static function combineOredClauses(
Expand Down Expand Up @@ -645,7 +636,6 @@ public static function combineOredClauses(
* (!$a || !$c || !$f)
*
* @param list<Clause> $clauses
*
* @return non-empty-list<Clause>
*/
public static function negateFormula(array $clauses): array
Expand Down
1 change: 0 additions & 1 deletion src/Psalm/Internal/Analyzer/AttributesAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ private static function getAttributeClassFlags(

/**
* @param iterable<AttributeGroup> $attribute_groups
*
* @return Generator<int, Attribute>
*/
private static function iterateAttributeNodes(iterable $attribute_groups): Generator
Expand Down
6 changes: 0 additions & 6 deletions src/Psalm/Internal/Analyzer/CommentAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ class CommentAnalyzer
/**
* @param array<string, array<string, Union>>|null $template_type_map
* @param array<string, TypeAlias> $type_aliases
*
* @throws DocblockParseException if there was a problem parsing the docblock
*
* @return list<VarDocblockComment>
*/
public static function getTypeFromComment(
Expand All @@ -66,9 +64,7 @@ public static function getTypeFromComment(
/**
* @param array<string, array<string, Union>>|null $template_type_map
* @param array<string, TypeAlias> $type_aliases
*
* @return list<VarDocblockComment>
*
* @throws DocblockParseException if there was a problem parsing the docblock
*/
public static function arrayToDocblocks(
Expand Down Expand Up @@ -260,9 +256,7 @@ public static function sanitizeDocblockType(string $docblock_type): string

/**
* @throws DocblockParseException if an invalid string is found
*
* @return non-empty-list<string>
*
* @psalm-pure
*/
public static function splitDocLine(string $return_block): array
Expand Down
1 change: 0 additions & 1 deletion src/Psalm/Internal/Analyzer/DataFlowNodeData.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

/**
* @psalm-immutable
*
* @internal
*/
class DataFlowNodeData
Expand Down
1 change: 0 additions & 1 deletion src/Psalm/Internal/Analyzer/FileAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ public function analyze(

/**
* @param array<int, PhpParser\Node\Stmt> $stmts
*
* @return list<PhpParser\Node\Stmt>
*/
public function populateCheckers(array $stmts): array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ class ReturnTypeAnalyzer
* @param Closure|Function_|ClassMethod|ArrowFunction $function
* @param PhpParser\Node\Stmt[] $function_stmts
* @param string[] $compatible_method_ids
*
* @return false|null
*
* @psalm-suppress PossiblyUnusedReturnValue unused but seems important
* @psalm-suppress ComplexMethod Unavoidably complex method
*/
Expand Down Expand Up @@ -781,7 +779,6 @@ public static function verifyReturnType(

/**
* @param Closure|Function_|ClassMethod|ArrowFunction $function
*
* @return false|null
*/
public static function checkReturnType(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ class ReturnTypeCollector
*
* @param array<PhpParser\Node> $stmts
* @param list<Union> $yield_types
*
* @return list<Union> a list of return types
*
* @psalm-suppress ComplexMethod to be refactored
*/
public static function getReturnTypes(
Expand Down
2 changes: 0 additions & 2 deletions src/Psalm/Internal/Analyzer/FunctionLikeAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,7 @@ public function __construct($function, SourceAnalyzer $source, FunctionLikeStora

/**
* @param bool $add_mutations whether or not to add mutations to this method
*
* @return false|null
*
* @psalm-suppress PossiblyUnusedReturnValue unused but seems important
*/
public function analyze(
Expand Down
1 change: 1 addition & 0 deletions src/Psalm/Internal/Analyzer/MethodAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public function __construct(

/**
* Determines whether a given method is static or not
*
* @param array<string> $suppressed_issues
*/
public static function checkStatic(
Expand Down
2 changes: 0 additions & 2 deletions src/Psalm/Internal/Analyzer/MethodComparator.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ class MethodComparator
{
/**
* @param string[] $suppressed_issues
*
* @return false|null
*
* @psalm-suppress PossiblyUnusedReturnValue unused but seems important
*/
public static function compare(
Expand Down

0 comments on commit 69658e8

Please sign in to comment.