Skip to content

Commit

Permalink
Code style fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
bobthecow committed Jan 7, 2024
1 parent 4dab2b8 commit ab4f5a5
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/CodeCleaner/ImplicitReturnPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private function addImplicitReturn(array $nodes): array
'startLine' => $last->getStartLine(),
'endLine' => $last->getEndLine(),
]);
// @codeCoverageIgnoreEnd
// @codeCoverageIgnoreEnd
} elseif ($last instanceof Expression && !($last->expr instanceof Exit_)) {
$nodes[\count($nodes) - 1] = new Return_($last->expr, [
'startLine' => $last->getStartLine(),
Expand Down
1 change: 1 addition & 0 deletions src/Readline/Libedit.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public function listHistory(): array

// decode the line
$history = \array_map([$this, 'parseHistoryLine'], $history);

// filter empty lines & comments
return \array_values(\array_filter($history));
}
Expand Down
1 change: 1 addition & 0 deletions src/TabCompletion/Matcher/ClassNamesMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function ($className) use ($class) {
// get the number of namespace separators
$nsPos = \substr_count($class, '\\');
$pieces = \explode('\\', $className);

// $methods = Mirror::get($class);
return \implode('\\', \array_slice($pieces, $nsPos, \count($pieces)));
},
Expand Down
1 change: 1 addition & 0 deletions src/Util/Str.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class Str
public static function unvis(string $input): string
{
$output = \preg_replace_callback(self::UNVIS_RX, [self::class, 'unvisReplace'], $input);

// other escapes & octal are handled by stripcslashes
return \stripcslashes($output);
}
Expand Down
2 changes: 1 addition & 1 deletion test/Exception/BreakExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function testMessage()

public function testExitShell()
{
$this->expectException(\Psy\Exception\BreakException::class);
$this->expectException(BreakException::class);
$this->expectExceptionMessage('Goodbye');

BreakException::exitShell();
Expand Down
2 changes: 1 addition & 1 deletion test/ShellTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ public function testKeepCodeBufferOpen()

public function testCodeBufferThrowsParseExceptions()
{
$this->expectException(\Psy\Exception\ParseErrorException::class);
$this->expectException(ParseErrorException::class);

$shell = new Shell($this->getConfig());
$shell->addCode('this is not valid');
Expand Down

0 comments on commit ab4f5a5

Please sign in to comment.