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.
Completed
Push — master ( 561409...eda8e7 )
by Sebastian
16s queued 12s
created

SearchInDocument::main()   A

Complexity

Conditions 4
Paths 4

Size

Total Lines 12
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 12
rs 9.9666
cc 4
nc 4
nop 2
1
<?php
2
namespace Kitodo\Dlf\Plugin\Eid;
3
4
/**
5
 * (c) Kitodo. Key to digital objects e.V. <[email protected]>
6
 *
7
 * This file is part of the Kitodo and TYPO3 projects.
8
 *
9
 * @license GNU General Public License version 3 or later.
10
 * For the full copyright and license information, please read the
11
 * LICENSE.txt file that was distributed with this source code.
12
 */
13
14
use Kitodo\Dlf\Common\Helper;
15
use Kitodo\Dlf\Common\Solr;
16
use TYPO3\CMS\Core\Utility\GeneralUtility;
17
18
/**
19
 * eID search in document for plugin 'Search' of the 'dlf' extension
20
 *
21
 * @author Alexander Bigga <[email protected]>
22
 * @package TYPO3
23
 * @subpackage dlf
24
 * @access public
25
 */
26
class SearchInDocument extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
27
    public $scriptRelPath = 'Classes/Plugin/Eid/SearchInDocument.php';
28
29
    /**
30
     * The main method of the eID script
31
     *
32
     * @access public
33
     *
34
     * @param string $content: The PlugIn content
35
     * @param array $conf: The PlugIn configuration
36
     *
37
     * @return string JSON response of search suggestions
38
     */
39
    public function main($content = '', $conf = []) {
0 ignored issues
show
Unused Code introduced by
The parameter $conf is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

39
    public function main($content = '', /** @scrutinizer ignore-unused */ $conf = []) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $content is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

39
    public function main(/** @scrutinizer ignore-unused */ $content = '', $conf = []) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
40
        if (GeneralUtility::_GP('encrypted') != ''
41
            && GeneralUtility::_GP('hashed') != '') {
42
            $core = Helper::decrypt(GeneralUtility::_GP('encrypted'), GeneralUtility::_GP('hashed'));
43
        }
44
        if (!empty($core)) {
45
            $url = trim(Solr::getSolrUrl($core), '/').'/select?wt=json&q=fulltext:('.Solr::escapeQuery(GeneralUtility::_GP('q')).')%20AND%20uid:'.GeneralUtility::_GP('uid')
46
              .'&hl=on&hl.fl=fulltext&fl=uid,id,page&hl.method=fastVector'
47
              .'&start='.GeneralUtility::_GP('start').'&rows=20';
48
            $output = GeneralUtility::getUrl($url);
49
        }
50
        echo $output;
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $output does not seem to be defined for all execution paths leading up to this point.
Loading history...
51
    }
52
}
53