Skip to content

Commit

Permalink
clean-up code
Browse files Browse the repository at this point in the history
  • Loading branch information
llaville committed Jul 1, 2024
1 parent 5966274 commit 61decc7
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/Builder/ArtifactChange.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
final class ArtifactChange extends Declaration
{
protected \Bartlett\Sarif\Definition\ArtifactLocation $artifactLocation;
protected Definition\ArtifactLocation $artifactLocation;
/**
* @var Definition\Replacement[] $replacements
*/
Expand Down
4 changes: 1 addition & 3 deletions src/Definition/ExternalPropertyFileReference.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
use Bartlett\Sarif\Property\LocationArtifact;
use Bartlett\Sarif\Property\Properties;

use DomainException;

/**
* An externalPropertyFileReference object contains information that enables a SARIF consumer
* to locate the external property files that contain the values of all externalized properties associated with theRun.
Expand Down Expand Up @@ -49,7 +47,7 @@ final class ExternalPropertyFileReference extends JsonSerializable
* @param ArtifactLocation|null $location
* @param string $guid
*/
public function __construct(ArtifactLocation $location = null, string $guid = '')
public function __construct(?ArtifactLocation $location = null, string $guid = '')
{
if ($location instanceof ArtifactLocation) {
$this->location = $location;
Expand Down
2 changes: 0 additions & 2 deletions src/Definition/GraphTraversal.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
use Bartlett\Sarif\Property\ResultGraphIndex;
use Bartlett\Sarif\Property\RunGraphIndex;

use DomainException;
use function is_int;
use function is_numeric;

/**
* Represents a path through a graph.
Expand Down
7 changes: 0 additions & 7 deletions src/Definition/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
use Bartlett\Sarif\Property\Properties;
use Bartlett\Sarif\Property\Text;

use DomainException;

/**
* Encapsulates a message intended to be read by the end user.
*
Expand Down Expand Up @@ -52,11 +50,6 @@ final class Message extends JsonSerializable

public function __construct(string $text = '', string $id = '')
{
// Any of "id", "text" are required
if (empty($id) && empty($text)) {
throw new DomainException('Either "id" or "text" are required. Nothing provided.');
}

$this->id = $id;
$this->text = $text;

Expand Down

0 comments on commit 61decc7

Please sign in to comment.