Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 59a9cc...f4ef62 )
by
unknown
09:02
created

SuggestBuildAdditionalFieldProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
dl 0
loc 27
rs 10
c 1
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A getAdditionalFields() 0 17 2
1
<?php
2
3
/**
4
 * (c) Kitodo. Key to digital objects e.V. <[email protected]>
5
 *
6
 * This file is part of the Kitodo and TYPO3 projects.
7
 *
8
 * @license GNU General Public License version 3 or later.
9
 * For the full copyright and license information, please read the
10
 * LICENSE.txt file that was distributed with this source code.
11
 */
12
namespace Kitodo\Dlf\Task;
13
14
use TYPO3\CMS\Core\Database\Connection;
15
use TYPO3\CMS\Core\Database\ConnectionPool;
16
use TYPO3\CMS\Core\Utility\GeneralUtility;
17
use TYPO3\CMS\Scheduler\Controller\SchedulerModuleController;
18
use TYPO3\CMS\Scheduler\Task\Enumeration\Action;
19
20
/**
21
 * Additional fields for building the suggestion dictionary task.
22
 *
23
 * @package TYPO3
24
 * @subpackage dlf
25
 *
26
 * @access public
27
 */
28
class SuggestBuildAdditionalFieldProvider extends BaseAdditionalFieldProvider
29
{
30
    /**
31
     * Gets additional fields to render in the form to add/edit a task
32
     *
33
     * @param array $taskInfo Values of the fields from the add/edit task form
34
     * @param BaseTask $task The task object being edited. Null when adding a task!
35
     * @param \TYPO3\CMS\Scheduler\Controller\SchedulerModuleController $schedulerModule Reference to the scheduler backend module
36
     * @return array A two dimensional array, array('Identifier' => array('fieldId' => array('code' => '', 'label' => '', 'cshKey' => '', 'cshLabel' => ''))
37
     */
38
    public function getAdditionalFields(array &$taskInfo, $task, SchedulerModuleController $schedulerModule)
39
    {
40
        $currentSchedulerModuleAction = $schedulerModule->getCurrentAction();
41
42
        /** @var BaseTask $task */
43
        if ($currentSchedulerModuleAction->equals(Action::EDIT)) {
44
            $taskInfo['solr'] = $task->getSolr();
45
        } else {
46
            $taskInfo['solr'] = - 1;
47
        }
48
49
        $additionalFields = [];
50
51
        // DropDown for Solr core
52
        $additionalFields['solr'] = $this->getSolrField($taskInfo['solr']);
53
54
        return $additionalFields;
55
    }
56
}
57