Client   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 5
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A send() 0 8 1
1
<?php
2
3
/*
4
 * This file is part of the strays/baidu-ai.
5
 *
6
 * (c) strays <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Strays\BaiDuAi\Language\Topic;
13
14
use Strays\BaiDuAi\Kernel\BaseClient;
15
16
class Client extends BaseClient
17
{
18
    /**
19
     * 文章分类.
20
     *
21
     * @param string $title
22
     * @param string $content
23
     *
24
     * @return string
25
     */
26
    public function send(string $title, string $content)
27
    {
28
        $body = [
29
            'title' => $title,
30
            'content' => $content,
31
        ];
32
33
        return $this->httpPostJson('/rpc/2.0/nlp/v1/topic', $body);
34
    }
35
}
36