Skip to content

Commit 8cf4114

Browse files
Add #[NoReturn] for functions
1 parent 4e9ab39 commit 8cf4114

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Parser.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,23 @@
22

33
namespace Differ\Parser;
44

5+
use JetBrains\PhpStorm\NoReturn;
56
use function cli\line;
67
use function Differ\Differ\genDiff;
78

8-
function parse(string $string): void
9+
#[NoReturn] function parse(string $string): void
910
{
1011
line('%s', $string);
1112
exit();
1213
}
1314

14-
function parseDiff(string $pathToFile1, string $pathToFile2, string $format): void
15+
#[NoReturn] function parseDiff(string $pathToFile1, string $pathToFile2, string $format): void
1516
{
1617
$resultString = genDiff($pathToFile1, $pathToFile2, $format);
1718
parse($resultString);
1819
}
1920

20-
function parseError(string $errorMessage): void
21+
#[NoReturn] function parseError(string $errorMessage): void
2122
{
2223
parse($errorMessage);
2324
}

0 commit comments

Comments
 (0)