for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace JsonSchema\Schema;
use JsonSchema\Keyword\ExclusiveMaximumKeyword;
use JsonSchema\Keyword\ExclusiveMinimumKeyword;
use JsonSchema\Keyword\MaximumKeyword;
use JsonSchema\Keyword\MinimumKeyword;
use JsonSchema\Keyword\MultipleOfKeyword;
use JsonSchema\Keyword\TypeKeyword;
class IntegerSchema extends AbstractSchema
{
public function __construct()
parent::__construct(
new TypeKeyword('integer')
);
}
/**
* @return static
*/
public function nullable(bool $nullable = true): self
if (!$nullable) {
return $this->with(
new TypeKeyword(['integer', 'null'])
public function minimum(?int $minimum): self
new MinimumKeyword($minimum)
public function maximum(?int $maximum): self
new MaximumKeyword($maximum)
public function exclusiveMinimum(?int $exclusiveMinimum): self
new ExclusiveMinimumKeyword($exclusiveMinimum)
public function exclusiveMaximum(?int $exclusiveMaximum): self
new ExclusiveMaximumKeyword($exclusiveMaximum)
public function multipleOf(?int $multipleOf): self
new MultipleOfKeyword($multipleOf)