diff --git a/Utils/IO/Spreadsheet/SpreadsheetDatabaseMapper.php b/Utils/IO/Spreadsheet/SpreadsheetDatabaseMapper.php index e62d9d146..fb70a76a5 100755 --- a/Utils/IO/Spreadsheet/SpreadsheetDatabaseMapper.php +++ b/Utils/IO/Spreadsheet/SpreadsheetDatabaseMapper.php @@ -104,7 +104,7 @@ class SpreadsheetDatabaseMapper implements IODatabaseMapper $cells[] = $workSheet->getCell(StringUtils::intToAlphabet($j) . $line)->getCalculatedValue(); } - var_dump($cells); + \var_dump($cells); ++$line; diff --git a/Utils/Parser/Markdown/Markdown.php b/Utils/Parser/Markdown/Markdown.php index 827c74bd3..a45df3b8a 100755 --- a/Utils/Parser/Markdown/Markdown.php +++ b/Utils/Parser/Markdown/Markdown.php @@ -1501,7 +1501,7 @@ class Markdown return $block; } - protected function checkboxUnchecked($text): string + protected function checkboxUnchecked($text) : string { if ($this->markupEscaped || $this->safeMode) { $text = self::escape($text); @@ -1510,7 +1510,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); @@ -1743,7 +1743,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))); } @@ -1781,7 +1781,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); @@ -1862,7 +1862,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]; @@ -2823,12 +2823,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'); } @@ -3966,7 +3966,7 @@ class Markdown return $markup; } - protected function elements(array $Elements): string + protected function elements(array $Elements) : string { $markup = ''; @@ -3999,7 +3999,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']); @@ -4110,7 +4110,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 d2d48f337..18c56990a 100755 --- a/tests/Message/Http/RestTest.php +++ b/tests/Message/Http/RestTest.php @@ -52,6 +52,10 @@ 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')); +<<<<<<< HEAD +======= + \var_dump(REST::request($request)->getJsonData()); +>>>>>>> 0080e35aace364fcf8708442f556fff4aba75143 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')); } }