Skip to content

Commit

Permalink
enabling strict type enforcement and updating WriteOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
dcarbone committed Nov 18, 2020
1 parent 5735790 commit f112603
Show file tree
Hide file tree
Showing 87 changed files with 330 additions and 104 deletions.
4 changes: 3 additions & 1 deletion src/ACL/ACLClient.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\ACL;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\ACL;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/ACL/ACLEntry.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\ACL;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\ACL;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/ACL/ACLReplicationStatus.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\ACL;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\ACL;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
6 changes: 4 additions & 2 deletions src/AbstractClient.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down Expand Up @@ -110,7 +112,7 @@ protected function doRequest(Request $r): array {
// If we actually have a client defined...
if (isset($this->config->HttpClient) && $this->config->HttpClient instanceof ClientInterface) {
$response =
$this->config->HttpClient->send($r->toPsrRequest(), $this->config->getGuzzleRequestOptions());
$this->config->HttpClient->send($r->toPsrRequest(), $this->config->getGuzzleRequestOptions($r));
} // Otherwise, throw error to be caught below
else {
throw new \RuntimeException('Unable to execute query as no HttpClient has been defined.');
Expand Down
4 changes: 3 additions & 1 deletion src/AbstractModel.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/AbstractModels.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Agent/AgentCheck.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Agent;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Agent;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Agent/AgentCheckRegistration.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Agent;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Agent;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Agent/AgentCheckUpdate.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Agent;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Agent;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Agent/AgentClient.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Agent;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Agent;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Agent/AgentMember.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Agent;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Agent;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Agent/AgentService.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Agent;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Agent;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Agent/AgentServiceCheck.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Agent;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Agent;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Agent/AgentServiceRegistration.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Agent;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Agent;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Agent/GaugeValue.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Agent;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Agent;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Agent/MemberOpts.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Agent;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Agent;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Agent/MetricsInfo.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Agent;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Agent;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Agent/PointValue.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Agent;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Agent;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Agent/SampledValue.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Agent;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Agent;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Catalog/CatalogClient.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Catalog;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Catalog;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Catalog/CatalogDeregistration.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Catalog;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Catalog;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Catalog/CatalogNode.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Catalog;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Catalog;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Catalog/CatalogRegistration.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Catalog;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Catalog;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Catalog/CatalogService.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Catalog;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Catalog;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Catalog/Node.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Catalog;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Catalog;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Config.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Consul.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Coordinate/Coordinate.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Coordinate;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Coordinate;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Coordinate/CoordinateClient.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Coordinate;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Coordinate;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Coordinate/CoordinateConfig.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Coordinate;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Coordinate;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Coordinate/CoordinateDatacenterMap.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Coordinate;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Coordinate;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Coordinate/CoordinateEntry.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Coordinate;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Coordinate;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Coordinate/DimensionalityConflictException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Coordinate;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Coordinate;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Coordinate/funcs.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Coordinate;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Coordinate;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Error.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Event/EventClient.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Event;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Event;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Event/UserEvent.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Event;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Event;


/*
Expand Down
4 changes: 3 additions & 1 deletion src/HasSettableStringTags.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/HasStringTags.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Health/HealthCheck.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Health;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Health;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Health/HealthCheckDefinition.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Health;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Health;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Health/HealthChecks.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Health;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Health;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Health/HealthClient.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Health;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Health;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/Health/ServiceEntry.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\Health;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\Health;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/HttpAuth.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/KV/KVClient.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\KV;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\KV;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/KV/KVPair.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\KV;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\KV;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
4 changes: 3 additions & 1 deletion src/KV/KVPairs.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php namespace DCarbone\PHPConsulAPI\KV;
<?php declare(strict_types=1);

namespace DCarbone\PHPConsulAPI\KV;

/*
Copyright 2016-2020 Daniel Carbone ([email protected])
Expand Down
Loading

0 comments on commit f112603

Please sign in to comment.