@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | namespace Algatux\InfluxDbBundle\unit\DependencyInjection; |
| 4 | 4 | |
| 5 | 5 | use Algatux\InfluxDbBundle\DependencyInjection\InfluxDbExtension; |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | public function test_load() |
| 12 | 12 | { |
| 13 | 13 | $extension = new InfluxDbExtension(); |
| 14 | - $config = $extension->load([],new ContainerBuilder()); |
|
| 14 | + $config = $extension->load([], new ContainerBuilder()); |
|
| 15 | 15 | |
| 16 | 16 | $this->assertNotEmpty($config); |
| 17 | 17 | } |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | namespace Algatux\InfluxDbBundle\unit\Events; |
| 4 | 4 | |
| 5 | 5 | use Algatux\InfluxDbBundle\Events\InfluxDbEvent; |
@@ -12,9 +12,9 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | public function test_event_interface() |
| 14 | 14 | { |
| 15 | - $event = new InfluxDbEvent(new PointsCollection([1,2,3]), Database::PRECISION_SECONDS, ClientInterface::HTTP_CLIENT); |
|
| 15 | + $event = new InfluxDbEvent(new PointsCollection([1, 2, 3]), Database::PRECISION_SECONDS, ClientInterface::HTTP_CLIENT); |
|
| 16 | 16 | |
| 17 | - $this->assertEquals(new PointsCollection([1,2,3]), $event->getPoints()); |
|
| 17 | + $this->assertEquals(new PointsCollection([1, 2, 3]), $event->getPoints()); |
|
| 18 | 18 | $this->assertEquals(ClientInterface::HTTP_CLIENT, $event->getWriteClient()); |
| 19 | 19 | $this->assertEquals(Database::PRECISION_SECONDS, $event->getPayload()); |
| 20 | 20 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | namespace Algatux\InfluxDbBundle\Services\Clients\Contracts; |
| 4 | 4 | |
| 5 | 5 | /** |
@@ -19,28 +19,28 @@ |
||
| 19 | 19 | |
| 20 | 20 | public function test_client_factory_test_exists() |
| 21 | 21 | { |
| 22 | - $factory = new InfluxDbClientFactory(self::TEST_HOST,self::TEST_DB,self::TEST_UDP,self::TEST_HTTP); |
|
| 22 | + $factory = new InfluxDbClientFactory(self::TEST_HOST, self::TEST_DB, self::TEST_UDP, self::TEST_HTTP); |
|
| 23 | 23 | $this->assertInstanceOf(InfluxDbClientFactory::class, $factory); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | public function test_build_udp_client_returns_a_valid_client() |
| 27 | 27 | { |
| 28 | - $factory = new InfluxDbClientFactory(self::TEST_HOST,self::TEST_DB,self::TEST_UDP,self::TEST_HTTP); |
|
| 28 | + $factory = new InfluxDbClientFactory(self::TEST_HOST, self::TEST_DB, self::TEST_UDP, self::TEST_HTTP); |
|
| 29 | 29 | $database = $factory->buildUdpClient(); |
| 30 | 30 | |
| 31 | 31 | $this->assertInstanceOf(Database::class, $database); |
| 32 | 32 | $this->assertEquals(self::TEST_DB, $database->getName()); |
| 33 | - $this->assertInstanceOf(UDP::class,$database->getClient()->getDriver()); |
|
| 33 | + $this->assertInstanceOf(UDP::class, $database->getClient()->getDriver()); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | public function test_build_http_client_returns_a_valid_client() |
| 37 | 37 | { |
| 38 | - $factory = new InfluxDbClientFactory(self::TEST_HOST,self::TEST_DB,self::TEST_UDP,self::TEST_HTTP); |
|
| 38 | + $factory = new InfluxDbClientFactory(self::TEST_HOST, self::TEST_DB, self::TEST_UDP, self::TEST_HTTP); |
|
| 39 | 39 | $database = $factory->buildHttpClient(); |
| 40 | 40 | |
| 41 | 41 | $this->assertInstanceOf(Database::class, $database); |
| 42 | 42 | $this->assertEquals(self::TEST_DB, $database->getName()); |
| 43 | - $this->assertInstanceOf(Guzzle::class,$database->getClient()->getDriver()); |
|
| 43 | + $this->assertInstanceOf(Guzzle::class, $database->getClient()->getDriver()); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | namespace Algatux\InfluxDbBundle\Services\Clients\Contracts; |
| 4 | 4 | |
| 5 | 5 | /** |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types=1); |
|
| 2 | +declare(strict_types = 1); |
|
| 3 | 3 | namespace Algatux\InfluxDbBundle\unit\Services\Clients; |
| 4 | 4 | |
| 5 | 5 | use Algatux\InfluxDbBundle\Model\PointsCollection; |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | public function test_write() |
| 38 | 38 | { |
| 39 | 39 | $idbDatabase = $this->prophesize(Database::class); |
| 40 | - $idbDatabase->writePoints(Argument::type('array'),Argument::type('string')) |
|
| 40 | + $idbDatabase->writePoints(Argument::type('array'), Argument::type('string')) |
|
| 41 | 41 | ->shouldBeCalledTimes(1) |
| 42 | 42 | ->willReturn(true); |
| 43 | 43 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | $factory->buildHttpClient()->shouldBeCalledTimes(1)->willReturn($idbDatabase->reveal()); |
| 46 | 46 | |
| 47 | 47 | $writer = new WriterClient($factory->reveal(), ClientInterface::HTTP_CLIENT); |
| 48 | - $writer->write(new PointsCollection(),'test'); |
|
| 48 | + $writer->write(new PointsCollection(), 'test'); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | } |