Skip to content

Commit

Permalink
fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
BruceGitHub committed May 11, 2022
1 parent 4baa288 commit 10e4fba
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
5 changes: 1 addition & 4 deletions src/Psalm/Report/ConsoleReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,16 @@
use Psalm\Internal\Analyzer\DataFlowNodeData;
use Psalm\Internal\Analyzer\IssueData;
use Psalm\Report;
use Psalm\Report\PrettyPrintArray\PrettyCompare;
use Psalm\Report\PrettyPrintArray\PrettyDetectArray;
use Psalm\Report\PrettyPrintArray\PrettyFormat;
use Psalm\Report\PrettyPrintArray\PrettyGeneric;
use Psalm\Report\PrettyPrintArray\PrettyCompare;
use Throwable;

use function basename;
use function count;
use function explode;
use function get_cfg_var;
use function ini_get;
use function join;
use function sprintf;
use function strlen;
use function strtr;
use function substr;
Expand Down
11 changes: 8 additions & 3 deletions src/Psalm/Report/PrettyPrintArray/PrettyCompare.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

namespace Psalm\Report\PrettyPrintArray;

use function count;
use function explode;
use function join;
use function sprintf;

use const PHP_EOL;

final class PrettyCompare
{
public function compare(array $arrays): string
Expand All @@ -15,8 +22,7 @@ public function compare(array $arrays): string
$indexOne = 0;
$paired = [];

for ($indexTwo = 0; $indexTwo <= $maxOf; $indexTwo++)
{
for ($indexTwo = 0; $indexTwo <= $maxOf; $indexTwo++) {
$rowProvided = $provided[$indexTwo] ?? '';

if (isset($requested[$indexOne]) && $requested[$indexOne] !== '') {
Expand All @@ -41,5 +47,4 @@ public function compare(array $arrays): string

return join(PHP_EOL, $pairedFormattedResult);
}

}
2 changes: 1 addition & 1 deletion src/Psalm/Report/PrettyPrintArray/PrettyDetectArray.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ private function getFirstArrayPayload(string $payload): ?array
}
$posEnd = $this->getPositionOfEndArray($payload);

$payloadArray = substr($payload, $posStart,$posEnd);
$payloadArray = substr($payload, $posStart, $posEnd);
$nextPayload = substr($payload, $posStart+$posEnd);

return [
Expand Down
2 changes: 0 additions & 2 deletions src/Psalm/Report/PrettyPrintArray/PrettyGeneric.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,4 @@ public static function revertNormalizedTokens(string $payload): string
{
return str_replace('psalm-key', 'array-key', $payload);
}


}

0 comments on commit 10e4fba

Please sign in to comment.