mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-07 20:00:50 +00:00
727b9f46f0
bfa1891c50
[cleanup] Remove 73 unused public methods (#3245)
27 lines
721 B
PHP
27 lines
721 B
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace Rector\Testing\Fixture;
|
|
|
|
use RectorPrefix202212\Nette\Utils\FileSystem;
|
|
use RectorPrefix202212\Nette\Utils\Strings;
|
|
use RectorPrefix202212\Webmozart\Assert\Assert;
|
|
final class FixtureSplitter
|
|
{
|
|
/**
|
|
* @api
|
|
* @var string
|
|
* @see https://regex101.com/r/zZDoyy/1
|
|
*/
|
|
public const SPLIT_LINE_REGEX = '#\\-\\-\\-\\-\\-\\r?\\n#';
|
|
/**
|
|
* @return array<string, string>
|
|
*/
|
|
public static function loadFileAndSplitInputAndExpected(string $filePath) : array
|
|
{
|
|
Assert::fileExists($filePath);
|
|
$fixtureFileContents = FileSystem::read($filePath);
|
|
return Strings::split($fixtureFileContents, self::SPLIT_LINE_REGEX);
|
|
}
|
|
}
|