for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/**
* ReportingCloud PHP SDK
*
* PHP SDK for ReportingCloud Web API. Authored and supported by Text Control GmbH.
* @link https://www.reporting.cloud to learn more about ReportingCloud
* @link https://git.io/Jejj2 for the canonical source repository
* @license https://git.io/Jejjr
* @copyright © 2022 Text Control GmbH
*/
namespace TxTextControl\ReportingCloud\Assert;
use TxTextControl\ReportingCloud\Exception\InvalidArgumentException;
* Trait AssertRemoveTrait
* @package TxTextControl\ReportingCloud
* @author Jonathan Maron (@JonathanMaron)
trait AssertRemoveTrait
{
use ValueToStringTrait;
* Check value is a "remove_*" value
* @param mixed $value
* @param string $message
public static function assertRemove($value, string $message = ''): void
if (!is_bool($value)) {
$format = 0 === strlen($message) ? 'Expected true or false. Got: %1$s' : $message;
$message = sprintf($format, self::valueToString($value));
throw new InvalidArgumentException($message);
}