Browse Source

Code formatting

main
Cédric Belin 4 months ago
parent
commit
e66315ac38
11 changed files with 25 additions and 25 deletions
  1. +4
    -4
      doc/advanced/events.md
  2. +3
    -3
      src/Author.php
  3. +4
    -4
      src/Blog.php
  4. +2
    -2
      src/Client.php
  5. +2
    -2
      src/ClientException.php
  6. +3
    -3
      src/Comment.php
  7. +1
    -1
      test/AuthorTest.php
  8. +2
    -2
      test/BlogTest.php
  9. +2
    -2
      test/ClientTest.php
  10. +1
    -1
      test/CommentTest.php
  11. +1
    -1
      test/index.php

+ 4
- 4
doc/advanced/events.md View File

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

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

$client->on(Client::eventRequest, fn(RequestEvent $event) =>
echo "Client request: ", $event->request->url
@@ -22,8 +22,8 @@ Emitted every time a response is received from the remote service:

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

$client->on(Client::eventResponse, fn(RequestEvent $event) =>
echo "Server response: ", $event->response->statusCode


+ 3
- 3
src/Author.php View File

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

use GuzzleHttp\Psr7\{Uri};
use Psr\Http\Message\{UriInterface};
use yii\base\{Model};
use GuzzleHttp\Psr7\Uri;
use Psr\Http\Message\UriInterface;
use yii\base\Model;

/** Represents the author of a comment. */
class Author extends Model implements \JsonSerializable {


+ 4
- 4
src/Blog.php View File

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

use GuzzleHttp\Psr7\{Uri};
use Psr\Http\Message\{UriInterface};
use yii\base\{Model};
use yii\helpers\{StringHelper};
use GuzzleHttp\Psr7\Uri;
use Psr\Http\Message\UriInterface;
use yii\base\Model;
use yii\helpers\StringHelper;

/** Represents the front page or home URL transmitted when making requests. */
class Blog extends Model implements \JsonSerializable {


+ 2
- 2
src/Client.php View File

@@ -2,9 +2,9 @@
namespace yii\akismet;

use GuzzleHttp\Psr7\{Uri, UriResolver};
use Psr\Http\Message\{UriInterface};
use Psr\Http\Message\UriInterface;
use yii\base\{Component, InvalidConfigException};
use yii\helpers\{ArrayHelper};
use yii\helpers\ArrayHelper;
use yii\httpclient\{Client as HttpClient, CurlTransport, Exception as HttpException};

/** Submits comments to the [Akismet](https://akismet.com) service. */


+ 2
- 2
src/ClientException.php View File

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

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/Comment.php View File

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

use GuzzleHttp\Psr7\{Uri};
use Psr\Http\Message\{UriInterface};
use yii\base\{Model};
use GuzzleHttp\Psr7\Uri;
use Psr\Http\Message\UriInterface;
use yii\base\Model;

/** Represents a comment submitted by an author. */
class Comment extends Model implements \JsonSerializable {


+ 1
- 1
test/AuthorTest.php View File

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

use PHPUnit\Framework\{TestCase};
use PHPUnit\Framework\TestCase;
use function PHPUnit\Framework\{assertThat, countOf, equalTo, isEmpty};

/** @testdox yii\akismet\Author */


+ 2
- 2
test/BlogTest.php View File

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

use Nyholm\Psr7\{Uri};
use PHPUnit\Framework\{TestCase};
use Nyholm\Psr7\Uri;
use PHPUnit\Framework\TestCase;
use function PHPUnit\Framework\{assertThat, countOf, equalTo, isEmpty, isNull};

/** @testdox yii\akismet\Blog */


+ 2
- 2
test/ClientTest.php View File

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

use Nyholm\Psr7\{Uri};
use Nyholm\Psr7\Uri;
use PHPUnit\Framework\{Assert, TestCase};
use yii\base\{InvalidConfigException};
use yii\base\InvalidConfigException;
use function PHPUnit\Framework\{assertThat, equalTo, isFalse, isTrue, logicalOr};

/** @testdox yii\akismet\Client */


+ 1
- 1
test/CommentTest.php View File

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

use PHPUnit\Framework\{TestCase};
use PHPUnit\Framework\TestCase;
use function PHPUnit\Framework\{assertThat, countOf, equalTo, isEmpty, isNull};

/** @testdox yii\akismet\Comment */


+ 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