for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Chubbyphp\Serialization;
final class NotObjectException extends \InvalidArgumentException
{
/**
* @param string $type
*
* @return self
*/
public static function createByType(string $type): self
return new self(sprintf('Input is not an object, type %s given', $type));
}
* @param string $path
public static function createByTypeAndPath(string $type, string $path): self
return new self(sprintf('Input is not an object, type %s given at path %s', $type, $path));