SearchIndexing   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 19
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A queueIndexingJob() 0 6 1
1
<?php
2
namespace FlexyProject\GitHub\Receiver\Enterprise;
3
4
use Symfony\Component\HttpFoundation\Request;
5
6
/**
7
 * The Search Indexing API allows you to queue up a variety of search indexing tasks.
8
 *
9
 * @link    https://developer.github.com/v3/enterprise/search_indexing/
10
 * @package GitHub\Receiver\Enterprise
11
 */
12
class SearchIndexing extends AbstractEnterprise
13
{
14
15
    /**
16
     * Queue an indexing job
17
     *
18
     * @link https://developer.github.com/v3/enterprise/search_indexing/#queue-an-indexing-job
19
     *
20
     * @param string $target
21
     *
22
     * @return array
23
     */
24
    public function queueIndexingJob(string $target): array
25
    {
26
        return $this->getApi()->request(sprintf('/staff/indexing_jobs'), Request::METHOD_POST, [
27
                'target' => $target
28
            ]);
29
    }
30
}