mirror of
https://github.com/pestphp/pest.git
synced 2026-09-05 22:33:35 +02:00
chore: coding style changes
This commit is contained in:
+1
-25
@@ -10,23 +10,14 @@ use Symfony\Component\Console\Output\OutputInterface;
|
||||
|
||||
final class KernelDump
|
||||
{
|
||||
/**
|
||||
* The output buffer, if any.
|
||||
*/
|
||||
private string $buffer = '';
|
||||
|
||||
/**
|
||||
* Creates a new Kernel Dump instance.
|
||||
*/
|
||||
public function __construct(
|
||||
private readonly OutputInterface $output,
|
||||
) {
|
||||
// ...
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable the output buffering.
|
||||
*/
|
||||
public function enable(): void
|
||||
{
|
||||
if (class_exists(Execution::class) && Execution::running()) {
|
||||
@@ -40,9 +31,6 @@ final class KernelDump
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable the output buffering.
|
||||
*/
|
||||
public function disable(): void
|
||||
{
|
||||
@ob_clean();
|
||||
@@ -52,17 +40,11 @@ final class KernelDump
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Terminate the output buffering.
|
||||
*/
|
||||
public function terminate(): void
|
||||
{
|
||||
$this->disable();
|
||||
}
|
||||
|
||||
/**
|
||||
* Flushes the buffer.
|
||||
*/
|
||||
private function flush(): void
|
||||
{
|
||||
View::renderUsing($this->output);
|
||||
@@ -103,17 +85,11 @@ final class KernelDump
|
||||
$this->buffer = '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given output contains an opening headline.
|
||||
*/
|
||||
private function isOpeningHeadline(string $output): bool
|
||||
{
|
||||
return str_contains($output, 'by Sebastian Bergmann and contributors.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given output contains an opening headline.
|
||||
*/
|
||||
private function isInternalError(string $output): bool
|
||||
{
|
||||
return str_contains($output, 'An error occurred inside PHPUnit.');
|
||||
|
||||
Reference in New Issue
Block a user