Skip to content

Commit

Permalink
add styleci (#6)
Browse files Browse the repository at this point in the history
* add styleci

* style ci badges

* bump styleci

* Apply fixes from StyleCI

* Apply fixes from StyleCI
  • Loading branch information
Tim Broder authored Dec 14, 2018
1 parent aabbd4c commit b2eec7b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .styleci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
preset: laravel

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![Latest Version on Packagist][ico-version]][link-packagist]
[![Software License][ico-license]](LICENSE.md)
[![Build Status][ico-travis]][link-travis]
[![StyleCI][ico-styleci]][link-styleci]
[![Total Downloads][ico-downloads]][link-packagist]

## What this is
Expand Down Expand Up @@ -121,8 +122,10 @@ The MIT License (MIT). Please see [License File](LICENSE.md) for more informatio
[ico-version]: https://img.shields.io/packagist/v/kidfund/thin-transit-client.svg?style=flat-square
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
[ico-travis]: https://img.shields.io/travis/kidfund/thin-transit-client/master.svg?style=flat-square
[ico-styleci]: https://github.styleci.io/repos/157907842/shield?branch=master
[ico-downloads]: https://img.shields.io/packagist/dt/kidfund/thin-transit-client.svg?style=flat-square

[link-packagist]: https://packagist.org/packages/kidfund/thin-transit-client
[link-travis]: https://travis-ci.org/kidfund/thin-transit-client
[link-author]: https://github.com/timbroder
[link-styleci]: https://github.styleci.io/repos/157907842
6 changes: 3 additions & 3 deletions src/TransitClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use Illuminate\Support\Facades\Log;
use GuzzleHttp\Exception\ClientException;
use GuzzleHttp\Exception\ServerException;
use Illuminate\Support\Facades\Log;

/**
* Class TransitClient.
Expand Down Expand Up @@ -77,11 +77,11 @@ public function encrypt(string $key, string $plaintext, string $context = null)
throw new VaultException('Empty response from Vault server');
}

if (!array_key_exists('data', $response)) {
if (! array_key_exists('data', $response)) {
throw new VaultException('Vault Encrypt: data not returned');
}

if (!array_key_exists('ciphertext', $response['data'])) {
if (! array_key_exists('ciphertext', $response['data'])) {
throw new VaultException('Vault Encrypt: ciphertext not returned');
}

Expand Down
4 changes: 2 additions & 2 deletions tests/ThinTransportClientIntegrationTest.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

use Psr\Log\NullLogger;
use PHPUnit\Framework\TestCase;
use Illuminate\Container\Container as Container;
use Illuminate\Support\Facades\Facade as Facade;
use Kidfund\ThinTransportVaultClient\TransitClient;
use PHPUnit\Framework\TestCase;
use Psr\Log\NullLogger;

/**
* @author: timbroder
Expand Down
6 changes: 3 additions & 3 deletions tests/ThinTransportClientUnitTest.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

use GuzzleHttp\Client;
use GuzzleHttp\Handler\MockHandler;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Response;
use PHPUnit\Framework\TestCase;
use GuzzleHttp\Handler\MockHandler;
use Kidfund\MonkeyPatcher\MonkeyPatcher;
use Kidfund\ThinTransportVaultClient\TransitClient;
use PHPUnit\Framework\TestCase;

/**
* @author: timbroder
Expand Down Expand Up @@ -68,7 +68,7 @@ public function getRealClient($guzzleClient = null)
$serverUrl = self::VAULT_ADDR;
$token = self::VAULT_TOKEN;

if (!$guzzleClient) {
if (! $guzzleClient) {
$guzzleClient = $this->getGuzzleClient();
}

Expand Down

0 comments on commit b2eec7b

Please sign in to comment.