Browse Source

Code formatting

main
Cédric Belin 1 month ago
parent
commit
c083850ae3
7 changed files with 17 additions and 17 deletions
  1. +4
    -4
      doc/usage.md
  2. +3
    -3
      src/Client.php
  3. +2
    -2
      src/ClientException.php
  4. +3
    -3
      src/LogTarget.php
  5. +2
    -2
      test/ClientTest.php
  6. +2
    -2
      test/LogTargetTest.php
  7. +1
    -1
      test/index.php

+ 4
- 4
doc/usage.md View File

@@ -40,8 +40,8 @@ Emitted every time a request is made to the remote service:

``` php
<?php
use yii\freemobile\{Client};
use yii\httpclient\{RequestEvent};
use yii\freemobile\Client;
use yii\httpclient\RequestEvent;

function main(): void {
$client = new Client(["username" => "your account identifier", "password" => "your API key"]);
@@ -56,8 +56,8 @@ Emitted every time a response is received from the remote service:

``` php
<?php
use yii\freemobile\{Client};
use yii\httpclient\{RequestEvent};
use yii\freemobile\Client;
use yii\httpclient\RequestEvent;

function main(): void {
$client = new Client(["username" => "your account identifier", "password" => "your API key"]);


+ 3
- 3
src/Client.php View File

@@ -1,11 +1,11 @@
<?php declare(strict_types=1);
namespace yii\freemobile;

use Nyholm\Psr7\{Uri};
use Psr\Http\Message\{UriInterface};
use Nyholm\Psr7\Uri;
use Psr\Http\Message\UriInterface;
use yii\base\{Component, InvalidConfigException};
use yii\httpclient\{Client as HttpClient, CurlTransport, StreamTransport};
use yii\web\{HttpException};
use yii\web\HttpException;

/**
* Sends messages by SMS to a Free Mobile account.


+ 2
- 2
src/ClientException.php View File

@@ -1,8 +1,8 @@
<?php declare(strict_types=1);
namespace yii\freemobile;

use Psr\Http\Message\{UriInterface};
use yii\base\{Exception};
use Psr\Http\Message\UriInterface;
use yii\base\Exception;

/** An exception caused by an error in a `Client` request. */
class ClientException extends Exception {


+ 3
- 3
src/LogTarget.php View File

@@ -1,9 +1,9 @@
<?php declare(strict_types=1);
namespace yii\freemobile;

use yii\di\{Instance};
use yii\helpers\{VarDumper};
use yii\log\{Target};
use yii\di\Instance;
use yii\helpers\VarDumper;
use yii\log\Target;

/** Sends the log messages by SMS to a Free Mobile account. */
class LogTarget extends Target {


+ 2
- 2
test/ClientTest.php View File

@@ -2,8 +2,8 @@
namespace yii\freemobile;

use PHPUnit\Framework\{Assert, TestCase};
use yii\base\{InvalidConfigException};
use yii\httpclient\{RequestEvent};
use yii\base\InvalidConfigException;
use yii\httpclient\RequestEvent;
use function PHPUnit\Framework\{assertThat, isInstanceOf, stringStartsWith};

/** @testdox yii\freemobile\Client */


+ 2
- 2
test/LogTargetTest.php View File

@@ -2,8 +2,8 @@
namespace yii\freemobile;

use PHPUnit\Framework\{Assert, TestCase};
use yii\base\{InvalidConfigException};
use yii\log\{Logger};
use yii\base\InvalidConfigException;
use yii\log\Logger;
use function PHPUnit\Framework\{assertThat, equalTo, identicalTo, isInstanceOf, logicalAnd};

/** @testdox yii\freemobile\LogTarget */


+ 1
- 1
test/index.php View File

@@ -1,5 +1,5 @@
<?php declare(strict_types=1);
use yii\console\{Application};
use yii\console\Application;

// Set the environment.
define("YII_DEBUG", true);


Loading…
Cancel
Save