Browse Source

Code formatting

main
Cédric Belin 5 months ago
parent
commit
1427e80c1f
9 changed files with 13 additions and 15 deletions
  1. +0
    -2
      .editorconfig
  2. +2
    -2
      doc/advanced/events.md
  3. +3
    -3
      doc/advanced/testing.md
  4. +1
    -1
      doc/features/comment_check.md
  5. +1
    -1
      doc/features/key_verification.md
  6. +1
    -1
      doc/features/submit_ham.md
  7. +1
    -1
      doc/features/submit_spam.md
  8. +1
    -1
      doc/index.md
  9. +3
    -3
      doc/installation.md

+ 0
- 2
.editorconfig View File

@@ -5,8 +5,6 @@ root = true
charset = utf-8
indent_style = tab
insert_final_newline = true
max_line_length = 200
quote_type = double
tab_width = 2
trim_trailing_whitespace = true



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

@@ -7,7 +7,7 @@ The `yii\akismet\Client` class, used to query the Akismet service, triggers some
## The `Client::eventRequest` event
Emitted every time a request is made to the remote service:

```php
``` php
<?php
use yii\akismet\{Client};
use yii\httpclient\{RequestEvent};
@@ -20,7 +20,7 @@ $client->on(Client::eventRequest, fn(RequestEvent $event) =>
## The `Client::eventResponse` event
Emitted every time a response is received from the remote service:

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


+ 3
- 3
doc/advanced/testing.md View File

@@ -6,7 +6,7 @@ Make a [comment check](../features/comment_check.md) API call with the `Author->

The Akismet API will always return a `CheckResult::isSpam` response to a valid request with one of those values. If you receive anything else, something is wrong in your client, data, or communications.

```php
``` php
<?php
use yii\akismet\{Author, Client, Comment};

@@ -27,7 +27,7 @@ Make a [comment check](../features/comment_check.md) API call with the `Author->

The Akismet API will always return a `CheckResult::isHam` response. Any other response indicates a data or communication problem.

```php
``` php
<?php
use yii\akismet\{Author, Client, Comment};

@@ -48,7 +48,7 @@ Enable the `Client->isTest` option in your tests.

That will tell Akismet not to change its behaviour based on those API calls: they will have no training effect. That means your tests will be somewhat repeatable, in the sense that one test won't influence subsequent calls.

```php
``` php
<?php
use yii\akismet\{Author, Client, Comment};



+ 1
- 1
doc/features/comment_check.md View File

@@ -32,7 +32,7 @@ The exception `getMessage()` usually includes some debug information, provided b

## Example

```php
``` php
<?php
use yii\akismet\{Author, Client, ClientException, Comment};



+ 1
- 1
doc/features/key_verification.md View File

@@ -25,7 +25,7 @@ The exception `getMessage()` usually includes some debug information, provided b

## Example

```php
``` php
<?php
use yii\akismet\{Client, ClientException};



+ 1
- 1
doc/features/submit_ham.md View File

@@ -27,7 +27,7 @@ The exception `getMessage()` usually includes some debug information, provided b

## Example

```php
``` php
<?php
use yii\akismet\{Author, Client, ClientException, Comment};



+ 1
- 1
doc/features/submit_spam.md View File

@@ -29,7 +29,7 @@ The exception `getMessage()` usually includes some debug information, provided b

## Example

```php
``` php
<?php
use yii\akismet\{Author, Client, ClientException, Comment};



+ 1
- 1
doc/index.md View File

@@ -20,7 +20,7 @@ This will give you access to the API and will allow Akismet to monitor its resul
### Get the library
Install the latest version of **Akismet for Yii** with [Composer](https://getcomposer.org):

```shell
``` shell
composer require cedx/yii2-akismet
```



+ 3
- 3
doc/installation.md View File

@@ -6,7 +6,7 @@ and [Composer](https://getcomposer.org), the PHP package manager, up and running

You can verify if you're already good to go with the following commands:

```shell
``` shell
php --version
# PHP 7.4.5 (cli) (built: Apr 14 2020 16:17:19) ( NTS Visual C++ 2017 x64 )

@@ -23,14 +23,14 @@ composer --version
### 1. Install it
From a command prompt, run:

```shell
``` shell
composer require cedx/yii2-akismet
```

### 2. Import it
Now in your [PHP](https://www.php.net) code, you can use:

```php
``` php
<?php
use yii\akismet\{
Author,


Loading…
Cancel
Save