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 ( ac3719...d0e528 )
by Sebastian
04:12 queued 11s
created
ext_localconf.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -14,19 +14,19 @@
 block discarded – undo
14 14
 }
15 15
 // Define constants.
16 16
 if (!defined('DEVLOG_SEVERITY_OK')) {
17
-    define ('DEVLOG_SEVERITY_OK', -1);
17
+    define('DEVLOG_SEVERITY_OK', -1);
18 18
 }
19 19
 if (!defined('DEVLOG_SEVERITY_INFO')) {
20
-    define ('DEVLOG_SEVERITY_INFO', 0);
20
+    define('DEVLOG_SEVERITY_INFO', 0);
21 21
 }
22 22
 if (!defined('DEVLOG_SEVERITY_NOTICE')) {
23
-    define ('DEVLOG_SEVERITY_NOTICE', 1);
23
+    define('DEVLOG_SEVERITY_NOTICE', 1);
24 24
 }
25 25
 if (!defined('DEVLOG_SEVERITY_WARNING')) {
26
-    define ('DEVLOG_SEVERITY_WARNING', 2);
26
+    define('DEVLOG_SEVERITY_WARNING', 2);
27 27
 }
28 28
 if (!defined('DEVLOG_SEVERITY_ERROR')) {
29
-    define ('DEVLOG_SEVERITY_ERROR', 3);
29
+    define('DEVLOG_SEVERITY_ERROR', 3);
30 30
 }
31 31
 // Register plugins.
32 32
 \Kitodo\Dlf\Hooks\ExtensionManagementUtility::addPItoST43($_EXTKEY, \Kitodo\Dlf\Plugin\AudioPlayer::class, '_audioplayer', 'list_type', TRUE);
Please login to merge, or discard this patch.
Classes/Command/ReindexCommand.php 4 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,13 +27,11 @@  discard block
 block discarded – undo
27 27
 /**
28 28
  * Reindex a collection into database and solr.
29 29
  */
30
-class ReindexCommand extends Command
31
-{
30
+class ReindexCommand extends Command {
32 31
     /**
33 32
      * Configure the command by defining the name, options and arguments
34 33
      */
35
-    public function configure()
36
-    {
34
+    public function configure() {
37 35
         $this
38 36
             ->setDescription('Reindex a collection into database and solr.')
39 37
             ->setHelp('')
@@ -75,8 +73,7 @@  discard block
 block discarded – undo
75 73
      * @param InputInterface $input
76 74
      * @param OutputInterface $output
77 75
      */
78
-    protected function execute(InputInterface $input, OutputInterface $output)
79
-    {
76
+    protected function execute(InputInterface $input, OutputInterface $output) {
80 77
         // Make sure the _cli_ user is loaded
81 78
         Bootstrap::getInstance()->initializeBackendAuthentication();
82 79
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
             ->setHelp('')
40 40
             ->addOption(
41 41
                 'dry-run',
42
-                null,
42
+                NULL,
43 43
                 InputOption::VALUE_NONE,
44 44
                 'If this option is set, the files will not actually be processed but the location URI is shown.'
45 45
             )
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         // Make sure the _cli_ user is loaded
81 81
         Bootstrap::getInstance()->initializeBackendAuthentication();
82 82
 
83
-        $dryRun = $input->getOption('dry-run') != false ? true : false;
83
+        $dryRun = $input->getOption('dry-run') != FALSE ? TRUE : FALSE;
84 84
 
85 85
         $io = new SymfonyStyle($input, $output);
86 86
         $io->title($this->getDescription());
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
             $documents = $this->getAllDocuments($startingPoint);
126 126
         } else {
127 127
             // coll may be a single integer, a list of integer
128
-            if (empty(array_filter(GeneralUtility::intExplode(',', $input->getOption('coll'), true)))) {
128
+            if (empty(array_filter(GeneralUtility::intExplode(',', $input->getOption('coll'), TRUE)))) {
129 129
                 $io->error('ERROR: "' . $input->getOption('coll') . '" is not a valid list of collection UIDs for --coll|-c.');
130 130
                 exit(1);
131 131
             }
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
                   $queryBuilder->expr()->in(
231 231
                       'tx_dlf_collections_join.uid',
232 232
                       $queryBuilder->createNamedParameter(
233
-                          GeneralUtility::intExplode(',', $collIds, true),
233
+                          GeneralUtility::intExplode(',', $collIds, TRUE),
234 234
                           Connection::PARAM_INT_ARRAY
235 235
                       )
236 236
                   ),
Please login to merge, or discard this patch.
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -226,23 +226,23 @@  discard block
 block discarded – undo
226 226
                 )
227 227
             )
228 228
             -> where(
229
-              $queryBuilder->expr()->andX(
230
-                  $queryBuilder->expr()->in(
231
-                      'tx_dlf_collections_join.uid',
232
-                      $queryBuilder->createNamedParameter(
233
-                          GeneralUtility::intExplode(',', $collIds, true),
234
-                          Connection::PARAM_INT_ARRAY
235
-                      )
236
-                  ),
237
-                  $queryBuilder->expr()->eq(
238
-                      'tx_dlf_collections_join.pid',
239
-                      $queryBuilder->createNamedParameter($pageId, Connection::PARAM_INT)
240
-                  ),
241
-                  $queryBuilder->expr()->eq(
242
-                      'tx_dlf_relations_joins.ident',
243
-                      $queryBuilder->createNamedParameter('docs_colls')
244
-                  )
245
-              )
229
+                $queryBuilder->expr()->andX(
230
+                    $queryBuilder->expr()->in(
231
+                        'tx_dlf_collections_join.uid',
232
+                        $queryBuilder->createNamedParameter(
233
+                            GeneralUtility::intExplode(',', $collIds, true),
234
+                            Connection::PARAM_INT_ARRAY
235
+                        )
236
+                    ),
237
+                    $queryBuilder->expr()->eq(
238
+                        'tx_dlf_collections_join.pid',
239
+                        $queryBuilder->createNamedParameter($pageId, Connection::PARAM_INT)
240
+                    ),
241
+                    $queryBuilder->expr()->eq(
242
+                        'tx_dlf_relations_joins.ident',
243
+                        $queryBuilder->createNamedParameter('docs_colls')
244
+                    )
245
+                )
246 246
             )
247 247
             ->groupBy('tx_dlf_documents.uid')
248 248
             ->orderBy('tx_dlf_documents.uid', 'ASC')
@@ -274,10 +274,10 @@  discard block
 block discarded – undo
274 274
             ->select('uid')
275 275
             ->from('tx_dlf_documents')
276 276
             -> where(
277
-              $queryBuilder->expr()->eq(
278
-                  'tx_dlf_documents.pid',
279
-                  $queryBuilder->createNamedParameter($pageId, Connection::PARAM_INT)
280
-              )
277
+                $queryBuilder->expr()->eq(
278
+                    'tx_dlf_documents.pid',
279
+                    $queryBuilder->createNamedParameter($pageId, Connection::PARAM_INT)
280
+                )
281 281
             )
282 282
             ->orderBy('tx_dlf_documents.uid', 'ASC')
283 283
             ->execute();
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -87,17 +87,17 @@  discard block
 block discarded – undo
87 87
 
88 88
         $startingPoint = 0;
89 89
         if (MathUtility::canBeInterpretedAsInteger($input->getOption('pid'))) {
90
-            $startingPoint = MathUtility::forceIntegerInRange((int)$input->getOption('pid'), 0);
90
+            $startingPoint = MathUtility::forceIntegerInRange((int) $input->getOption('pid'), 0);
91 91
         }
92 92
         if ($startingPoint == 0) {
93
-            $io->error('ERROR: No valid PID (' . $startingPoint . ') given.');
93
+            $io->error('ERROR: No valid PID ('.$startingPoint.') given.');
94 94
             exit(1);
95 95
         }
96 96
 
97 97
         if ($input->getOption('solr')) {
98 98
             $allSolrCores = $this->getSolrCores($startingPoint);
99 99
             if (MathUtility::canBeInterpretedAsInteger($input->getOption('solr'))) {
100
-                $solrCoreUid = MathUtility::forceIntegerInRange((int)$input->getOption('solr'), 0);
100
+                $solrCoreUid = MathUtility::forceIntegerInRange((int) $input->getOption('solr'), 0);
101 101
             } else {
102 102
                 $solrCoreName = $input->getOption('solr');
103 103
                 $solrCoreUid = $allSolrCores[$solrCoreName];
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
             // Abort if solrCoreUid is empty or not in the array of allowed solr cores.
106 106
             if (empty($solrCoreUid) || !in_array($solrCoreUid, $allSolrCores)) {
107 107
                 foreach ($allSolrCores as $index_name => $uid) {
108
-                    $output_solrCores .= ' ' . $uid . ' : ' . $index_name ."\n";
108
+                    $output_solrCores .= ' '.$uid.' : '.$index_name."\n";
109 109
                 }
110 110
                 if (empty($output_solrCores)) {
111
-                    $io->error('ERROR: No valid solr core ("'. $input->getOption('solr') . '") given. ' . "No valid cores found on PID " . $startingPoint .".\n" . $output_solrCores);
111
+                    $io->error('ERROR: No valid solr core ("'.$input->getOption('solr').'") given. '."No valid cores found on PID ".$startingPoint.".\n".$output_solrCores);
112 112
                     exit(1);
113 113
                 } else {
114
-                    $io->error('ERROR: No valid solr core ("'. $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . $output_solrCores);
114
+                    $io->error('ERROR: No valid solr core ("'.$input->getOption('solr').'") given. '."Valid cores are (<uid>:<index_name>):\n".$output_solrCores);
115 115
                     exit(1);
116 116
                 }
117 117
             }
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         } else {
127 127
             // coll may be a single integer, a list of integer
128 128
             if (empty(array_filter(GeneralUtility::intExplode(',', $input->getOption('coll'), true)))) {
129
-                $io->error('ERROR: "' . $input->getOption('coll') . '" is not a valid list of collection UIDs for --coll|-c.');
129
+                $io->error('ERROR: "'.$input->getOption('coll').'" is not a valid list of collection UIDs for --coll|-c.');
130 130
                 exit(1);
131 131
             }
132 132
             $documents = $this->getDocumentsToProceed($input->getOption('coll'), $startingPoint);
@@ -136,10 +136,10 @@  discard block
 block discarded – undo
136 136
             $doc = Document::getInstance($document, $startingPoint, TRUE);
137 137
             if ($doc->ready) {
138 138
                 if ($dryRun) {
139
-                    $io->writeln('DRY RUN: Would index ' . $id . '/' . count($documents) . ' ' . $doc->uid . ' ' . $doc->location . ' on UID ' . $startingPoint . ' and solr core ' . $solrCoreUid .'.');
139
+                    $io->writeln('DRY RUN: Would index '.$id.'/'.count($documents).' '.$doc->uid.' '.$doc->location.' on UID '.$startingPoint.' and solr core '.$solrCoreUid.'.');
140 140
                 } else {
141 141
                     if ($io->isVerbose()) {
142
-                        $io->writeln(date('Y-m-d H:i:s') . ' ' . $id . '/' . count($documents) . ' ' . $doc->uid . ' ' . $doc->location . ' on UID ' . $startingPoint . ' and solr core ' . $solrCoreUid .'.');
142
+                        $io->writeln(date('Y-m-d H:i:s').' '.$id.'/'.count($documents).' '.$doc->uid.' '.$doc->location.' on UID '.$startingPoint.' and solr core '.$solrCoreUid.'.');
143 143
                     }
144 144
                     // ...and save it to the database...
145 145
                     if (!$doc->save($startingPoint, $solrCoreUid)) {
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
             ->getQueryBuilderForTable('tx_dlf_solrcores');
170 170
 
171 171
         $solrCores = [];
172
-        $pageId = (int)$pageId;
172
+        $pageId = (int) $pageId;
173 173
         $result = $queryBuilder
174 174
             ->select('uid', 'index_name')
175 175
             ->from('tx_dlf_solrcores')
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
             ->getQueryBuilderForTable('tx_dlf_documents');
204 204
 
205 205
         $documents = [];
206
-        $pageId = (int)$pageId;
206
+        $pageId = (int) $pageId;
207 207
         $result = $queryBuilder
208 208
             ->select('tx_dlf_documents.uid')
209 209
             ->from('tx_dlf_documents')
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
             ->getQueryBuilderForTable('tx_dlf_documents');
270 270
 
271 271
         $documents = [];
272
-        $pageId = (int)$pageId;
272
+        $pageId = (int) $pageId;
273 273
         $result = $queryBuilder
274 274
             ->select('uid')
275 275
             ->from('tx_dlf_documents')
Please login to merge, or discard this patch.
Classes/Command/IndexCommand.php 3 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,13 +26,11 @@  discard block
 block discarded – undo
26 26
 /**
27 27
  * Index single document into database and solr.
28 28
  */
29
-class IndexCommand extends Command
30
-{
29
+class IndexCommand extends Command {
31 30
     /**
32 31
      * Configure the command by defining the name, options and arguments
33 32
      */
34
-    public function configure()
35
-    {
33
+    public function configure() {
36 34
         $this
37 35
             ->setDescription('Index single document into database and solr.')
38 36
             ->setHelp('')
@@ -68,8 +66,7 @@  discard block
 block discarded – undo
68 66
      * @param InputInterface $input
69 67
      * @param OutputInterface $output
70 68
      */
71
-    protected function execute(InputInterface $input, OutputInterface $output)
72
-    {
69
+    protected function execute(InputInterface $input, OutputInterface $output) {
73 70
         // Make sure the _cli_ user is loaded
74 71
         Bootstrap::getInstance()->initializeBackendAuthentication();
75 72
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             ->setHelp('')
39 39
             ->addOption(
40 40
                 'dry-run',
41
-                null,
41
+                NULL,
42 42
                 InputOption::VALUE_NONE,
43 43
                 'If this option is set, the files will not actually be processed but the location URI is shown.'
44 44
             )
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         // Make sure the _cli_ user is loaded
74 74
         Bootstrap::getInstance()->initializeBackendAuthentication();
75 75
 
76
-        $dryRun = $input->getOption('dry-run') != false ? true : false;
76
+        $dryRun = $input->getOption('dry-run') != FALSE ? TRUE : FALSE;
77 77
 
78 78
         $io = new SymfonyStyle($input, $output);
79 79
         $io->title($this->getDescription());
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -80,17 +80,17 @@  discard block
 block discarded – undo
80 80
 
81 81
         $startingPoint = 0;
82 82
         if (MathUtility::canBeInterpretedAsInteger($input->getOption('pid'))) {
83
-            $startingPoint = MathUtility::forceIntegerInRange((int)$input->getOption('pid'), 0);
83
+            $startingPoint = MathUtility::forceIntegerInRange((int) $input->getOption('pid'), 0);
84 84
         }
85 85
         if ($startingPoint == 0) {
86
-            $io->error('ERROR: No valid PID (' . $startingPoint . ') given.');
86
+            $io->error('ERROR: No valid PID ('.$startingPoint.') given.');
87 87
             exit(1);
88 88
         }
89 89
 
90 90
         if ($input->getOption('solr')) {
91 91
             $allSolrCores = $this->getSolrCores($startingPoint);
92 92
             if (MathUtility::canBeInterpretedAsInteger($input->getOption('solr'))) {
93
-                $solrCoreUid = MathUtility::forceIntegerInRange((int)$input->getOption('solr'), 0);
93
+                $solrCoreUid = MathUtility::forceIntegerInRange((int) $input->getOption('solr'), 0);
94 94
             } else {
95 95
                 $solrCoreName = $input->getOption('solr');
96 96
                 $solrCoreUid = $allSolrCores[$solrCoreName];
@@ -98,13 +98,13 @@  discard block
 block discarded – undo
98 98
             // Abort if solrCoreUid is empty or not in the array of allowed solr cores.
99 99
             if (empty($solrCoreUid) || !in_array($solrCoreUid, $allSolrCores)) {
100 100
                 foreach ($allSolrCores as $index_name => $uid) {
101
-                    $output_solrCores .= ' ' . $uid . ' : ' . $index_name ."\n";
101
+                    $output_solrCores .= ' '.$uid.' : '.$index_name."\n";
102 102
                 }
103 103
                 if (empty($output_solrCores)) {
104
-                    $io->error('ERROR: No valid solr core ("'. $input->getOption('solr') . '") given. ' . "No valid cores found on PID " . $startingPoint .".\n" . $output_solrCores);
104
+                    $io->error('ERROR: No valid solr core ("'.$input->getOption('solr').'") given. '."No valid cores found on PID ".$startingPoint.".\n".$output_solrCores);
105 105
                     exit(1);
106 106
                 } else {
107
-                    $io->error('ERROR: No valid solr core ("'. $input->getOption('solr') . '") given. ' . "Valid cores are (<uid>:<index_name>):\n" . $output_solrCores);
107
+                    $io->error('ERROR: No valid solr core ("'.$input->getOption('solr').'") given. '."Valid cores are (<uid>:<index_name>):\n".$output_solrCores);
108 108
                     exit(1);
109 109
                 }
110 110
             }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
         if (!MathUtility::canBeInterpretedAsInteger($input->getOption('doc'))
117 117
             && !GeneralUtility::isValidUrl($input->getOption('doc'))) {
118
-            $io->error('ERROR: "' . $input->getOption('doc') . '" is not a valid document UID or URL for --doc|-d.');
118
+            $io->error('ERROR: "'.$input->getOption('doc').'" is not a valid document UID or URL for --doc|-d.');
119 119
             exit(1);
120 120
         }
121 121
 
@@ -123,10 +123,10 @@  discard block
 block discarded – undo
123 123
         $doc = Document::getInstance($input->getOption('doc'), $startingPoint, TRUE);
124 124
         if ($doc->ready) {
125 125
             if ($dryRun) {
126
-                $io->section('DRY RUN: Would index ' . $doc->uid . ' '. $doc->location . ' on UID ' . $startingPoint . ' and solr core ' . $solrCoreUid .'.');
126
+                $io->section('DRY RUN: Would index '.$doc->uid.' '.$doc->location.' on UID '.$startingPoint.' and solr core '.$solrCoreUid.'.');
127 127
             } else {
128 128
                 if ($io->isVerbose()) {
129
-                    $io->section('Will index ' . $doc->uid . ' ' . $doc->location . ' on UID ' . $startingPoint . ' and solr core ' . $solrCoreUid .'.');
129
+                    $io->section('Will index '.$doc->uid.' '.$doc->location.' on UID '.$startingPoint.' and solr core '.$solrCoreUid.'.');
130 130
                 }
131 131
                 // ...and save it to the database...
132 132
                 if (!$doc->save($startingPoint, $solrCoreUid)) {
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
             ->getQueryBuilderForTable('tx_dlf_solrcores');
158 158
 
159 159
         $solrCores = [];
160
-        $pageId = (int)$pageId;
160
+        $pageId = (int) $pageId;
161 161
         $result = $queryBuilder
162 162
             ->select('uid', 'index_name')
163 163
             ->from('tx_dlf_solrcores')
Please login to merge, or discard this patch.