Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Strip whitespace (or other characters) from the beginning and end of a string
<?php trim(string $string, string $characters = " \n\r\t\v\x00"): string
<?php         }




        $exitCode = $application->runTest(realpath(trim($testPath)));



        fwrite($statusFile, (string) $exitCode);

        fflush($statusFile);
<?php         $buffer = $this->converter->getTestCaseMethodName($event->test()); // pest-changed



        $throwable = $event->throwable();

        $buffer .= trim(

            $this->converter->getExceptionMessage($throwable).PHP_EOL. // pest-changed

            $this->converter->getExceptionDetails($throwable), // pest-changed

        );



        $fault = $this->document->createElement(

            $type,
<?php         $namespace = implode('\\', $partsFQN);

        $baseClass = sprintf('\%s', $this->class);



        if (trim($className) === '') {

            $className = 'InvalidTestName'.Str::random();

        }
<?php             );

        }



        $this->buffer = trim($this->buffer);

        $this->buffer = rtrim($this->buffer, '.').'.';



        $lines = explode(PHP_EOL, $this->buffer);
<?php                     assert(is_string($argument));



                    if (trim($argument) === '--process-isolation') {

                        continue;

                    }
<?php             $percentageOfExecutedLinesAsString = $file->percentageOfExecutedLines()->asString();



            if (! in_array($percentageOfExecutedLinesAsString, ['0.00%', '100.00%', '100.0%', ''], true)) {

                $uncoveredLines = trim(implode(', ', self::getMissingCoverage($file)));

                $uncoveredLines = sprintf('<span>%s</span>', $uncoveredLines).' <span class="text-gray"> / </span>';

            }
<?php         $dirtyFiles = [];



        foreach ($output as $dirtyFile) {

            $dirtyFiles[substr($dirtyFile, 3)] = trim(substr($dirtyFile, 0, 3));

        }



        $dirtyFiles = array_filter($dirtyFiles, fn (string $status): bool => $status !== 'D');