File manager - Edit - /var/www/payraty/helpdesk/vendor/rector/rector/vendor/symplify/easy-testing/src/ValueObject/ExpectedAndOutputFileInfoPair.php
Back
<?php declare (strict_types=1); namespace RectorPrefix202208\Symplify\EasyTesting\ValueObject; use RectorPrefix202208\Symplify\SmartFileSystem\SmartFileInfo; use RectorPrefix202208\Symplify\SymplifyKernel\Exception\ShouldNotHappenException; final class ExpectedAndOutputFileInfoPair { /** * @var \Symplify\SmartFileSystem\SmartFileInfo */ private $expectedFileInfo; /** * @var \Symplify\SmartFileSystem\SmartFileInfo|null */ private $outputFileInfo; public function __construct(SmartFileInfo $expectedFileInfo, ?SmartFileInfo $outputFileInfo) { $this->expectedFileInfo = $expectedFileInfo; $this->outputFileInfo = $outputFileInfo; } /** * @noRector \Rector\Privatization\Rector\ClassMethod\PrivatizeLocalOnlyMethodRector */ public function getExpectedFileContent() : string { return $this->expectedFileInfo->getContents(); } /** * @noRector \Rector\Privatization\Rector\ClassMethod\PrivatizeLocalOnlyMethodRector */ public function getOutputFileContent() : string { if (!$this->outputFileInfo instanceof SmartFileInfo) { throw new ShouldNotHappenException(); } return $this->outputFileInfo->getContents(); } /** * @noRector \Rector\Privatization\Rector\ClassMethod\PrivatizeLocalOnlyMethodRector */ public function doesOutputFileExist() : bool { return $this->outputFileInfo !== null; } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings