%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64 User : addictionfreeind ( 1003) PHP Version : 7.2.34 Disable Function : exec,passthru,shell_exec,system Directory : /home/addictionfreeind/www/admin1/vendor/phpro/grumphp/src/Fixer/ |
Upload File : |
<?php
declare(strict_types=1);
namespace GrumPHP\Fixer;
/**
* @template TResult
* @psalm-readonly
*/
class FixResult
{
/**
* @var \Throwable|null
*/
private $error;
/**
* @var TResult|null
*/
private $result;
/**
* @param TResult|null $result
*/
private function __construct($result, ?\Throwable $error)
{
$this->error = $error;
$this->result = $result;
}
public static function failed(\Throwable $error): self
{
return new self(null, $error);
}
/**
* @param mixed $result
*/
public static function success($result): self
{
return new self($result, null);
}
public function ok(): bool
{
return null === $this->error;
}
/**
* @return TResult|null
*/
public function result()
{
return $this->result;
}
public function error(): ?\Throwable
{
return $this->error;
}
}