From 0080e35aace364fcf8708442f556fff4aba75143 Mon Sep 17 00:00:00 2001 From: Formatter Bot Date: Thu, 21 Sep 2023 22:50:19 +0000 Subject: [PATCH] Automated formatting changes --- .../Spreadsheet/SpreadsheetDatabaseMapper.php | 2 +- Utils/Parser/Markdown/Markdown.php | 20 +++++++++---------- tests/Message/Http/RestTest.php | 2 +- tests/Stdlib/Base/EnumTest.php | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Utils/IO/Spreadsheet/SpreadsheetDatabaseMapper.php b/Utils/IO/Spreadsheet/SpreadsheetDatabaseMapper.php index 148543973..d9ebb11e0 100755 --- a/Utils/IO/Spreadsheet/SpreadsheetDatabaseMapper.php +++ b/Utils/IO/Spreadsheet/SpreadsheetDatabaseMapper.php @@ -104,7 +104,7 @@ class SpreadsheetDatabaseMapper implements IODatabaseMapper $cells[] = $row; } - var_dump($cells); + \var_dump($cells); ++$line; diff --git a/Utils/Parser/Markdown/Markdown.php b/Utils/Parser/Markdown/Markdown.php index 923eab1f3..47e410c1c 100755 --- a/Utils/Parser/Markdown/Markdown.php +++ b/Utils/Parser/Markdown/Markdown.php @@ -1497,7 +1497,7 @@ class Markdown return $block; } - protected function checkboxUnchecked($text): string + protected function checkboxUnchecked($text) : string { if ($this->markupEscaped || $this->safeMode) { $text = self::escape($text); @@ -1506,7 +1506,7 @@ class Markdown return ' '.$this->format($text); } - protected function checkboxChecked($text): string + protected function checkboxChecked($text) : string { if ($this->markupEscaped || $this->safeMode) { $text = self::escape($text); @@ -1739,7 +1739,7 @@ class Markdown * Get only the text from a markdown string. * It parses to HTML once then trims the tags to get the text. */ - protected function fetchText($text): string + protected function fetchText($text) : string { return \trim(\strip_tags($this->line($text))); } @@ -1777,7 +1777,7 @@ class Markdown $this->firstHeadLevel = $level; } $cutIndent = $this->firstHeadLevel - 1; - $level = $cutIndent > $level ? 1 : $level - $cutIndent; + $level = $cutIndent > $level ? 1 : $level - $cutIndent; $indent = \str_repeat(' ', $level); @@ -1858,7 +1858,7 @@ class Markdown // Get the first char before the marker $beforeMarkerPosition = $markerPosition - 1; - $charBeforeMarker = $beforeMarkerPosition >= 0 ? $text[$markerPosition - 1] : ''; + $charBeforeMarker = $beforeMarkerPosition >= 0 ? $text[$markerPosition - 1] : ''; $Excerpt = ['text' => $excerpt, 'context' => $text, 'before' => $charBeforeMarker]; @@ -2819,12 +2819,12 @@ class Markdown return $Component['element']; } - protected function isBlockContinuable($Type): bool + protected function isBlockContinuable($Type) : bool { return \method_exists($this, 'block' . $Type . 'Continue'); } - protected function isBlockCompletable($Type): bool + protected function isBlockCompletable($Type) : bool { return \method_exists($this, 'block' . $Type . 'Complete'); } @@ -3962,7 +3962,7 @@ class Markdown return $markup; } - protected function elements(array $Elements): string + protected function elements(array $Elements) : string { $markup = ''; @@ -3995,7 +3995,7 @@ class Markdown $Elements = $this->linesElements($lines); if (! \in_array('', $lines) - && isset($Elements[0]) && isset($Elements[0]['name']) + && isset($Elements[0], $Elements[0]['name']) && $Elements[0]['name'] === 'p' ) { unset($Elements[0]['name']); @@ -4106,7 +4106,7 @@ class Markdown # Static Methods # - protected static function escape(string $text, bool $allowQuotes = false): string + protected static function escape(string $text, bool $allowQuotes = false) : string { return \htmlspecialchars($text, $allowQuotes ? \ENT_NOQUOTES : \ENT_QUOTES, 'UTF-8'); } diff --git a/tests/Message/Http/RestTest.php b/tests/Message/Http/RestTest.php index 10aebe4f3..ebffe8cde 100755 --- a/tests/Message/Http/RestTest.php +++ b/tests/Message/Http/RestTest.php @@ -52,7 +52,7 @@ final class RestTest extends \PHPUnit\Framework\TestCase $request = new HttpRequest(new HttpUri('http://httpbin.org/post')); $request->setMethod(RequestMethod::POST); self::assertTrue($request->setData('pdata', 'abc')); - var_dump(REST::request($request)->getJsonData()); + \var_dump(REST::request($request)->getJsonData()); self::assertEquals('abc', REST::request($request)->getJsonData()['form']['pdata'] ?? ''); } diff --git a/tests/Stdlib/Base/EnumTest.php b/tests/Stdlib/Base/EnumTest.php index 13e25e8a5..62cfe7f99 100755 --- a/tests/Stdlib/Base/EnumTest.php +++ b/tests/Stdlib/Base/EnumTest.php @@ -144,6 +144,6 @@ final class EnumTest extends \PHPUnit\Framework\TestCase */ public function testInvalidConstantException() : void { - self::assertEquals(null, EnumDemo::getByName('ENUM3')); + self::assertNull(EnumDemo::getByName('ENUM3')); } }