Skip to content

Commit

Permalink
php-cs-fixer and some more work
Browse files Browse the repository at this point in the history
  • Loading branch information
dcarbone committed Feb 5, 2021
1 parent 0d3ce50 commit bf689b6
Show file tree
Hide file tree
Showing 156 changed files with 1,478 additions and 1,360 deletions.
27 changes: 13 additions & 14 deletions src/ACL/ACLClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
*/

use DCarbone\Go\HTTP;
use DCarbone\PHPConsulAPI\AbstractClient;
Expand All @@ -28,13 +28,12 @@

/**
* Class ACLClient
* @package DCarbone\PHPConsulAPI\ACL
*/
class ACLClient extends AbstractClient
{
/**
* @return \DCarbone\PHPConsulAPI\ValuedWriteStringResponse
* @throws \GuzzleHttp\Exception\GuzzleException
* @return \DCarbone\PHPConsulAPI\ValuedWriteStringResponse
*/
public function Bootstrap(): ValuedWriteStringResponse
{
Expand All @@ -44,8 +43,8 @@ public function Bootstrap(): ValuedWriteStringResponse
/**
* @param \DCarbone\PHPConsulAPI\ACL\ACLEntry $acl
* @param \DCarbone\PHPConsulAPI\WriteOptions|null $opts
* @return \DCarbone\PHPConsulAPI\ValuedWriteStringResponse
* @throws \GuzzleHttp\Exception\GuzzleException
* @return \DCarbone\PHPConsulAPI\ValuedWriteStringResponse
*/
public function Create(ACLEntry $acl, ?WriteOptions $opts = null): ValuedWriteStringResponse
{
Expand All @@ -55,8 +54,8 @@ public function Create(ACLEntry $acl, ?WriteOptions $opts = null): ValuedWriteSt
/**
* @param \DCarbone\PHPConsulAPI\ACL\ACLEntry $acl
* @param \DCarbone\PHPConsulAPI\WriteOptions|null $opts
* @return \DCarbone\PHPConsulAPI\WriteResponse
* @throws \GuzzleHttp\Exception\GuzzleException
* @return \DCarbone\PHPConsulAPI\WriteResponse
*/
public function Update(ACLEntry $acl, ?WriteOptions $opts = null): WriteResponse
{
Expand All @@ -66,34 +65,34 @@ public function Update(ACLEntry $acl, ?WriteOptions $opts = null): WriteResponse
/**
* @param string $id
* @param \DCarbone\PHPConsulAPI\WriteOptions|null $opts
* @return \DCarbone\PHPConsulAPI\WriteResponse
* @throws \GuzzleHttp\Exception\GuzzleException
* @return \DCarbone\PHPConsulAPI\WriteResponse
*/
public function Destroy(string $id, ?WriteOptions $opts = null): WriteResponse
{
return $this->_executePut(sprintf('v1/acl/destroy/%s', $id), null, $opts);
return $this->_executePut(\sprintf('v1/acl/destroy/%s', $id), null, $opts);
}

/**
* @param string $id
* @param \DCarbone\PHPConsulAPI\WriteOptions|null $opts
* @return \DCarbone\PHPConsulAPI\ValuedWriteStringResponse
* @throws \GuzzleHttp\Exception\GuzzleException
* @return \DCarbone\PHPConsulAPI\ValuedWriteStringResponse
*/
public function Clone(string $id, ?WriteOptions $opts = null): ValuedWriteStringResponse
{
return $this->_doPutValuedStr(sprintf('v1/acl/clone/%s', $id), null, $opts);
return $this->_doPutValuedStr(\sprintf('v1/acl/clone/%s', $id), null, $opts);
}

/**
* @param string $id
* @param \DCarbone\PHPConsulAPI\QueryOptions|null $opts
* @return \DCarbone\PHPConsulAPI\ACL\ACLEntriesResponse
* @throws \GuzzleHttp\Exception\GuzzleException
* @return \DCarbone\PHPConsulAPI\ACL\ACLEntriesResponse
*/
public function Info(string $id, ?QueryOptions $opts = null): ACLEntriesResponse
{
$r = new Request(HTTP\MethodGet, sprintf('v1/acl/info/%s', $id), $this->config, null);
$r = new Request(HTTP\MethodGet, \sprintf('v1/acl/info/%s', $id), $this->config, null);
$r->applyOptions($opts);

/** @var \Psr\Http\Message\ResponseInterface $response */
Expand All @@ -114,8 +113,8 @@ public function Info(string $id, ?QueryOptions $opts = null): ACLEntriesResponse

/**
* @param \DCarbone\PHPConsulAPI\QueryOptions|null $opts
* @return \DCarbone\PHPConsulAPI\ACL\ACLEntriesResponse
* @throws \GuzzleHttp\Exception\GuzzleException
* @return \DCarbone\PHPConsulAPI\ACL\ACLEntriesResponse
*/
public function List(?QueryOptions $opts = null): ACLEntriesResponse
{
Expand All @@ -140,8 +139,8 @@ public function List(?QueryOptions $opts = null): ACLEntriesResponse

/**
* @param \DCarbone\PHPConsulAPI\QueryOptions|null $opts
* @return \DCarbone\PHPConsulAPI\ACL\ACLReplicationStatusResponse
* @throws \GuzzleHttp\Exception\GuzzleException
* @return \DCarbone\PHPConsulAPI\ACL\ACLReplicationStatusResponse
*/
public function Replication(?QueryOptions $opts = null): ACLReplicationStatusResponse
{
Expand All @@ -163,4 +162,4 @@ public function Replication(?QueryOptions $opts = null): ACLReplicationStatusRes

return new ACLReplicationStatusResponse($data, $qm, null);
}
}
}
5 changes: 2 additions & 3 deletions src/ACL/ACLEntriesResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
*/

use DCarbone\PHPConsulAPI\AbstractValuedQueryResponse;
use DCarbone\PHPConsulAPI\Error;
use DCarbone\PHPConsulAPI\QueryMeta;

/**
* Class ACLEntriesResponse
* @package DCarbone\PHPConsulAPI\ACL
*/
class ACLEntriesResponse extends AbstractValuedQueryResponse
{
Expand Down Expand Up @@ -54,4 +53,4 @@ public function getValue(): ?array
{
return $this->ACLEntries;
}
}
}
17 changes: 8 additions & 9 deletions src/ACL/ACLEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
*/

use DCarbone\PHPConsulAPI\AbstractModel;

/**
* Class ACLEntry
* @package DCarbone\PHPConsulAPI\ACL
*/
class ACLEntry extends AbstractModel
{
Expand Down Expand Up @@ -51,7 +50,7 @@ public function getCreateIndex(): int
* @param int $createIndex
* @return ACLEntry
*/
public function setCreateIndex(int $createIndex): ACLEntry
public function setCreateIndex(int $createIndex): self
{
$this->CreateIndex = $createIndex;
return $this;
Expand All @@ -69,7 +68,7 @@ public function getModifyIndex(): int
* @param int $modifyIndex
* @return ACLEntry
*/
public function setModifyIndex(int $modifyIndex): ACLEntry
public function setModifyIndex(int $modifyIndex): self
{
$this->ModifyIndex = $modifyIndex;
return $this;
Expand All @@ -87,7 +86,7 @@ public function getID(): string
* @param string $id
* @return ACLEntry
*/
public function setID(string $id): ACLEntry
public function setID(string $id): self
{
$this->ID = $id;
return $this;
Expand All @@ -105,7 +104,7 @@ public function getName(): string
* @param string $name
* @return ACLEntry
*/
public function setName(string $name): ACLEntry
public function setName(string $name): self
{
$this->Name = $name;
return $this;
Expand All @@ -123,7 +122,7 @@ public function getType(): string
* @param string $type
* @return ACLEntry
*/
public function setType(string $type): ACLEntry
public function setType(string $type): self
{
$this->Type = $type;
return $this;
Expand All @@ -141,9 +140,9 @@ public function getRules(): string
* @param string $rules
* @return ACLEntry
*/
public function setRules(string $rules): ACLEntry
public function setRules(string $rules): self
{
$this->Rules = $rules;
return $this;
}
}
}
3 changes: 1 addition & 2 deletions src/ACL/ACLReplicationStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
*/

use DCarbone\PHPConsulAPI\AbstractModel;

/**
* Class ACLReplicationStatus
* @package DCarbone\PHPConsulAPI\ACL
*/
class ACLReplicationStatus extends AbstractModel
{
Expand Down
5 changes: 2 additions & 3 deletions src/ACL/ACLReplicationStatusResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
*/

use DCarbone\PHPConsulAPI\AbstractValuedQueryResponse;
use DCarbone\PHPConsulAPI\Error;
use DCarbone\PHPConsulAPI\QueryMeta;

/**
* Class ACLReplicationStatusResponse
* @package DCarbone\PHPConsulAPI\ACL
*/
class ACLReplicationStatusResponse extends AbstractValuedQueryResponse
{
Expand Down Expand Up @@ -52,4 +51,4 @@ public function getValue(): ?ACLReplicationStatus
{
return $this->ACLReplicationStatus;
}
}
}
Loading

0 comments on commit bf689b6

Please sign in to comment.