From 9acdc1098211b1d564c7d007daaa01d69eb195ad Mon Sep 17 00:00:00 2001 From: Laurent Laville Date: Mon, 1 Jul 2024 13:59:24 +0000 Subject: [PATCH] clean-up code --- src/Definition/PhysicalLocation.php | 6 ------ src/Factory/PhpSerializerFactory.php | 3 --- 2 files changed, 9 deletions(-) diff --git a/src/Definition/PhysicalLocation.php b/src/Definition/PhysicalLocation.php index e06e8a2..65bae7c 100644 --- a/src/Definition/PhysicalLocation.php +++ b/src/Definition/PhysicalLocation.php @@ -10,8 +10,6 @@ use Bartlett\Sarif\Internal\JsonSerializable; use Bartlett\Sarif\Property; -use LogicException; - /** * A physical location relevant to a result. * Specifies a reference to a programming artifact together with a range of bytes or characters within that artifact. @@ -61,10 +59,6 @@ public function __construct(?ArtifactLocation $artifactLocation = null, ?Address $this->address = $address; } - if (empty($address) && empty($artifactLocation)) { - throw new LogicException('Either "address" or "artifactLocation" are required. Nothing provided.'); - } - $required = []; $optional = [ 'address', diff --git a/src/Factory/PhpSerializerFactory.php b/src/Factory/PhpSerializerFactory.php index f845f77..49f885d 100644 --- a/src/Factory/PhpSerializerFactory.php +++ b/src/Factory/PhpSerializerFactory.php @@ -12,9 +12,6 @@ use Bartlett\Sarif\Serializer\JsonSerializer; use Bartlett\Sarif\Serializer\SerializerInterface; -use const JSON_PRETTY_PRINT; -use const JSON_UNESCAPED_SLASHES; - /** * @author Laurent Laville * @since Release 1.2.0