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 SerializerLogicException extends \LogicException
{
/**
* @param string $contentType
*
* @return self
*/
public static function createMissingContentType(string $contentType): self
return new self(sprintf('There is no encoder for content-type: "%s"', $contentType));
}
* @param string $path
* @param string $type
* @return SerializerLogicException
public static function createWrongDataType(string $path, string $type): self
return new self(sprintf('Wrong data type "%s" at path : "%s"', $type, $path));
public static function createMissingNormalizer(string $path): self
return new self(sprintf('There is no normalizer at path: "%s"', $path));
* @param string $class
public static function createMissingMapping(string $class): self
return new self(sprintf('There is no mapping for class: "%s"', $class));
* @param array $methods
public static function createMissingMethod(string $class, array $methods): self
return new self(
sprintf('There are no accessible method(s) "%s", within class: "%s"', implode('", "', $methods), $class)
);
* @param string $property
public static function createMissingProperty(string $class, string $property): self
return new self(sprintf('There is no property "%s" within class: "%s"', $property, $class));