for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Dgame\Ensurance;
use Throwable;
/**
* Interface EnsuranceInterface
* @package Dgame\Ensurance
*/
interface EnsuranceInterface
{
* @param mixed $value
*
* @return mixed
public function then($value);
public function else($value);
* @param mixed $default
public function get($default = null);
* @return bool
public function isEnsured(): bool;
* @param string $message
* @param mixed ...$args
$args
array
public function orThrow(string $message, ...$args);
public function hasThrowable(): bool;
* @param Throwable $throwable
public function setThrowable(Throwable $throwable);
* @return Throwable|null
public function getThrowable(): ?Throwable;
public function disregardThrowable();
public function releaseThrowable(): ?Throwable;
* @param self $ensurance
$ensurance
\self
This check looks for @param annotations where the type inferred by our type inference engine differs from the declared type.
@param
It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.
public function transferEnsurance(self $ensurance);
}