Automated formatting changes

This commit is contained in:
Formatter Bot 2023-09-21 22:50:19 +00:00
parent dfd81edcc3
commit 0080e35aac
4 changed files with 13 additions and 13 deletions

View File

@ -104,7 +104,7 @@ class SpreadsheetDatabaseMapper implements IODatabaseMapper
$cells[] = $row; $cells[] = $row;
} }
var_dump($cells); \var_dump($cells);
++$line; ++$line;

View File

@ -1497,7 +1497,7 @@ class Markdown
return $block; return $block;
} }
protected function checkboxUnchecked($text): string protected function checkboxUnchecked($text) : string
{ {
if ($this->markupEscaped || $this->safeMode) { if ($this->markupEscaped || $this->safeMode) {
$text = self::escape($text); $text = self::escape($text);
@ -1506,7 +1506,7 @@ class Markdown
return '<input type="checkbox" disabled /> '.$this->format($text); return '<input type="checkbox" disabled /> '.$this->format($text);
} }
protected function checkboxChecked($text): string protected function checkboxChecked($text) : string
{ {
if ($this->markupEscaped || $this->safeMode) { if ($this->markupEscaped || $this->safeMode) {
$text = self::escape($text); $text = self::escape($text);
@ -1739,7 +1739,7 @@ class Markdown
* Get only the text from a markdown string. * Get only the text from a markdown string.
* It parses to HTML once then trims the tags to get the text. * 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))); return \trim(\strip_tags($this->line($text)));
} }
@ -1777,7 +1777,7 @@ class Markdown
$this->firstHeadLevel = $level; $this->firstHeadLevel = $level;
} }
$cutIndent = $this->firstHeadLevel - 1; $cutIndent = $this->firstHeadLevel - 1;
$level = $cutIndent > $level ? 1 : $level - $cutIndent; $level = $cutIndent > $level ? 1 : $level - $cutIndent;
$indent = \str_repeat(' ', $level); $indent = \str_repeat(' ', $level);
@ -1858,7 +1858,7 @@ class Markdown
// Get the first char before the marker // Get the first char before the marker
$beforeMarkerPosition = $markerPosition - 1; $beforeMarkerPosition = $markerPosition - 1;
$charBeforeMarker = $beforeMarkerPosition >= 0 ? $text[$markerPosition - 1] : ''; $charBeforeMarker = $beforeMarkerPosition >= 0 ? $text[$markerPosition - 1] : '';
$Excerpt = ['text' => $excerpt, 'context' => $text, 'before' => $charBeforeMarker]; $Excerpt = ['text' => $excerpt, 'context' => $text, 'before' => $charBeforeMarker];
@ -2819,12 +2819,12 @@ class Markdown
return $Component['element']; return $Component['element'];
} }
protected function isBlockContinuable($Type): bool protected function isBlockContinuable($Type) : bool
{ {
return \method_exists($this, 'block' . $Type . 'Continue'); return \method_exists($this, 'block' . $Type . 'Continue');
} }
protected function isBlockCompletable($Type): bool protected function isBlockCompletable($Type) : bool
{ {
return \method_exists($this, 'block' . $Type . 'Complete'); return \method_exists($this, 'block' . $Type . 'Complete');
} }
@ -3962,7 +3962,7 @@ class Markdown
return $markup; return $markup;
} }
protected function elements(array $Elements): string protected function elements(array $Elements) : string
{ {
$markup = ''; $markup = '';
@ -3995,7 +3995,7 @@ class Markdown
$Elements = $this->linesElements($lines); $Elements = $this->linesElements($lines);
if (! \in_array('', $lines) if (! \in_array('', $lines)
&& isset($Elements[0]) && isset($Elements[0]['name']) && isset($Elements[0], $Elements[0]['name'])
&& $Elements[0]['name'] === 'p' && $Elements[0]['name'] === 'p'
) { ) {
unset($Elements[0]['name']); unset($Elements[0]['name']);
@ -4106,7 +4106,7 @@ class Markdown
# Static Methods # 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'); return \htmlspecialchars($text, $allowQuotes ? \ENT_NOQUOTES : \ENT_QUOTES, 'UTF-8');
} }

View File

@ -52,7 +52,7 @@ final class RestTest extends \PHPUnit\Framework\TestCase
$request = new HttpRequest(new HttpUri('http://httpbin.org/post')); $request = new HttpRequest(new HttpUri('http://httpbin.org/post'));
$request->setMethod(RequestMethod::POST); $request->setMethod(RequestMethod::POST);
self::assertTrue($request->setData('pdata', 'abc')); 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'] ?? ''); self::assertEquals('abc', REST::request($request)->getJsonData()['form']['pdata'] ?? '');
} }

View File

@ -144,6 +144,6 @@ final class EnumTest extends \PHPUnit\Framework\TestCase
*/ */
public function testInvalidConstantException() : void public function testInvalidConstantException() : void
{ {
self::assertEquals(null, EnumDemo::getByName('ENUM3')); self::assertNull(EnumDemo::getByName('ENUM3'));
} }
} }