Passed
Push — master ( a1929c...27d925 )
by Dispositif
02:28
created

GoogleBooksWorker   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 10
c 2
b 0
f 0
dl 0
loc 23
ccs 0
cts 5
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A processWithDomainWorker() 0 5 1
1
<?php
2
3
/*
4
 * This file is part of dispositif/wikibot application (@github)
5
 * 2019-2023 © Philippe M./Irønie  <[email protected]>
6
 * For the full copyright and MIT license information, view the license file.
7
 */
8
declare(strict_types=1);
9
10
namespace App\Application;
11
12
use App\Domain\GoogleTransformer;
13
use Throwable;
14
15
/**
16
 * externe goo
17
 * Class GoogleBooksWorker
18
 *
19
 * @package App\Application\Examples
20
 */
21
class GoogleBooksWorker extends AbstractBotTaskWorker
22
{
23
    public const SLEEP_AFTER_EDITION        = 60;
24
    public const TASK_BOT_FLAG              = true;
25
    public const ARTICLE_ANALYZED_FILENAME  = __DIR__.'/resources/gooBot_edited.txt';
26
    public const SKIP_LASTEDIT_BY_BOT       = false;
27
    public const SKIP_NOT_IN_MAIN_WIKISPACE = true;
28
    public const SKIP_ADQ                   = false;
29
30
    protected $modeAuto = true;
31
32
    /**
33
     * @param string      $title
34
     * @param string|null $text
35
     *
36
     * @return string|null
37
     * @throws Throwable
38
     */
39
    protected function processWithDomainWorker(string $title, string $text): ?string
40
    {
41
        $ref = new GoogleTransformer();
42
43
        return $ref->process($text);
44
    }
45
}
46
47
48
49
50
51
52
53
54