Passed
Pull Request — master (#123)
by
unknown
05:05
created
Configuration/Extbase/Persistence/Classes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types = 1);
2
+declare(strict_types=1);
3 3
 
4 4
 return [
5 5
     \Kitodo\Dlf\Domain\Model\ActionLog::class => [
Please login to merge, or discard this patch.
Build/Documentation/dbdocs/RstSection.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -35,9 +35,9 @@  discard block
 block discarded – undo
35 35
     {
36 36
         if (!empty($text)) {
37 37
             if ($format['bold'] ?? false) {
38
-                $text = '**' . $text . '**';
38
+                $text = '**'.$text.'**';
39 39
             } elseif ($format['italic'] ?? false) {
40
-                $text = '*' . $text . '*';
40
+                $text = '*'.$text.'*';
41 41
             }
42 42
         }
43 43
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
     public static function paragraphs(array $paragraphs)
48 48
     {
49
-        $paragraphs = array_values(array_filter($paragraphs, function ($entry) {
49
+        $paragraphs = array_values(array_filter($paragraphs, function($entry) {
50 50
             return !empty($entry);
51 51
         }));
52 52
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     public function addText(string $text)
69 69
     {
70 70
         if (!empty($text)) {
71
-            $this->text .= $text . "\n\n";
71
+            $this->text .= $text."\n\n";
72 72
         }
73 73
     }
74 74
 
@@ -97,10 +97,10 @@  discard block
 block discarded – undo
97 97
                 $numLines = count($valueLines);
98 98
                 for ($i = 0; $i < $numLines; $i++) {
99 99
                     $prefix = $i === 0
100
-                        ? '     :' . $key . ':'
100
+                        ? '     :'.$key.':'
101 101
                         : '';
102 102
 
103
-                    $entry .= str_pad($prefix, 32) . trim($valueLines[$i]) . "\n";
103
+                    $entry .= str_pad($prefix, 32).trim($valueLines[$i])."\n";
104 104
                 }
105 105
             }
106 106
 
@@ -138,10 +138,10 @@  discard block
 block discarded – undo
138 138
         $headerSep = str_repeat($headerChar, mb_strlen($this->header));
139 139
 
140 140
         if ($level === 0) {
141
-            $result .= $headerSep . "\n";
141
+            $result .= $headerSep."\n";
142 142
         }
143 143
 
144
-        $result .= $this->header . "\n" . $headerSep . "\n\n";
144
+        $result .= $this->header."\n".$headerSep."\n\n";
145 145
 
146 146
         return $result;
147 147
     }
Please login to merge, or discard this patch.
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -20,8 +20,7 @@  discard block
 block discarded – undo
20 20
  * @subpackage dlf
21 21
  * @access public
22 22
  */
23
-class RstSection
24
-{
23
+class RstSection {
25 24
     /** @var string */
26 25
     protected $header = '';
27 26
 
@@ -31,8 +30,7 @@  discard block
 block discarded – undo
31 30
     /** @var RstSection[] */
32 31
     protected $subsections = [];
33 32
 
34
-    public static function format(string $text, array $format = [])
35
-    {
33
+    public static function format(string $text, array $format = []) {
36 34
         if (!empty($text)) {
37 35
             if ($format['bold'] ?? false) {
38 36
                 $text = '**' . $text . '**';
@@ -44,8 +42,7 @@  discard block
 block discarded – undo
44 42
         return $text;
45 43
     }
46 44
 
47
-    public static function paragraphs(array $paragraphs)
48
-    {
45
+    public static function paragraphs(array $paragraphs) {
49 46
         $paragraphs = array_values(array_filter($paragraphs, function ($entry) {
50 47
             return !empty($entry);
51 48
         }));
@@ -53,27 +50,23 @@  discard block
 block discarded – undo
53 50
         return implode("\n\n", $paragraphs);
54 51
     }
55 52
 
56
-    public function subsection()
57
-    {
53
+    public function subsection() {
58 54
         $section = new static();
59 55
         $this->subsections[] = $section;
60 56
         return $section;
61 57
     }
62 58
 
63
-    public function setHeader(string $text)
64
-    {
59
+    public function setHeader(string $text) {
65 60
         $this->header = $text;
66 61
     }
67 62
 
68
-    public function addText(string $text)
69
-    {
63
+    public function addText(string $text) {
70 64
         if (!empty($text)) {
71 65
             $this->text .= $text . "\n\n";
72 66
         }
73 67
     }
74 68
 
75
-    public function addTable(array $rows, array $headerRows)
76
-    {
69
+    public function addTable(array $rows, array $headerRows) {
77 70
         $numHeaderRows = count($headerRows);
78 71
 
79 72
         $tableRst = <<<RST
@@ -115,8 +108,7 @@  discard block
 block discarded – undo
115 108
         $this->addText($tableRst);
116 109
     }
117 110
 
118
-    public function render(int $level = 0)
119
-    {
111
+    public function render(int $level = 0) {
120 112
         $result = '';
121 113
 
122 114
         $result .= $this->renderHeader($level);
@@ -130,8 +122,7 @@  discard block
 block discarded – undo
130 122
         return $result;
131 123
     }
132 124
 
133
-    protected function renderHeader(int $level)
134
-    {
125
+    protected function renderHeader(int $level) {
135 126
         $result = '';
136 127
 
137 128
         $headerChar = ['=', '=', '-', '~', '"'][$level];
Please login to merge, or discard this patch.
Build/Documentation/dbdocs/generate.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,16 +11,16 @@
 block discarded – undo
11 11
  * LICENSE.txt file that was distributed with this source code.
12 12
  */
13 13
 
14
-$classLoader = require_once __DIR__ . '/../../../vendor/autoload.php';
14
+$classLoader = require_once __DIR__.'/../../../vendor/autoload.php';
15 15
 
16 16
 $outputPath = $argv[1] ?? null;
17 17
 if (empty($outputPath) || !is_writable(($outputPath))) {
18
-    echo 'Error: Output path not specified or not writable' . "\n";
18
+    echo 'Error: Output path not specified or not writable'."\n";
19 19
     exit(1);
20 20
 }
21 21
 
22
-putenv('TYPO3_PATH_ROOT=' . __DIR__ . '/public');
23
-putenv('TYPO3_PATH_APP=' . __DIR__);
22
+putenv('TYPO3_PATH_ROOT='.__DIR__.'/public');
23
+putenv('TYPO3_PATH_APP='.__DIR__);
24 24
 
25 25
 // For compatibility with TYPO v9
26 26
 define('PATH_thisScript', __FILE__);
Please login to merge, or discard this patch.
Classes/Hooks/Form/FieldInformation/SolrCoreStatus.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
                     $uptimeInSeconds = floor($response->getUptime() / 1000);
56 56
                     $dateTimeFrom = new \DateTime('@0');
57 57
                     $dateTimeTo = new \DateTime("@$uptimeInSeconds");
58
-                    $uptime = $dateTimeFrom->diff($dateTimeTo)->format('%a ' . Helper::getLanguageService()->getLL('flash.days') . ', %H:%I:%S');
58
+                    $uptime = $dateTimeFrom->diff($dateTimeTo)->format('%a '.Helper::getLanguageService()->getLL('flash.days').', %H:%I:%S');
59 59
                     $numDocuments = $response->getNumberOfDocuments();
60 60
                     $startTime = $response->getStartTime() ? strftime('%c', $response->getStartTime()->getTimestamp()) : 'N/A';
61 61
                     $lastModified = $response->getLastModified() ? strftime('%c', $response->getLastModified()->getTimestamp()) : 'N/A';
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@
 block discarded – undo
25 25
  *
26 26
  * @access public
27 27
  */
28
-class SolrCoreStatus extends AbstractNode
29
-{
28
+class SolrCoreStatus extends AbstractNode {
30 29
     /**
31 30
      * Shows Solr core status for given 'index_name'
32 31
      *
Please login to merge, or discard this patch.
Classes/Hooks/ThumbnailCustomElement.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
         // parameters are available in $this->data['parameterArray']['fieldConf']['config']['parameters']
23 23
         $result = $this->initializeResultArray();
24 24
         if (!empty($this->data['databaseRow']['thumbnail'])) {
25
-            $result['html'] = '<img alt="Thumbnail" title="" src="' . $this->data['databaseRow']['thumbnail'] . '" />';
25
+            $result['html'] = '<img alt="Thumbnail" title="" src="'.$this->data['databaseRow']['thumbnail'].'" />';
26 26
         } else {
27 27
             $result['html'] = '';
28 28
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@
 block discarded – undo
22 22
  *
23 23
  * @access public
24 24
  */
25
-class ThumbnailCustomElement extends AbstractFormElement
26
-{
25
+class ThumbnailCustomElement extends AbstractFormElement {
27 26
 
28 27
     /**
29 28
      * Renders thumbnail custom element.
Please login to merge, or discard this patch.
Classes/Domain/Repository/MetadataRepository.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
         // order by oai_name
49 49
         $query->setOrderings(
50
-            array('sorting' => QueryInterface::ORDER_ASCENDING)
50
+            array ('sorting' => QueryInterface::ORDER_ASCENDING)
51 51
         );
52 52
 
53 53
         return $query->execute();
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@
 block discarded – undo
24 24
  *
25 25
  * @access public
26 26
  */
27
-class MetadataRepository extends Repository
28
-{
27
+class MetadataRepository extends Repository {
29 28
     /**
30 29
      * Finds all collection for the given settings
31 30
      *
Please login to merge, or discard this patch.
Classes/Domain/Repository/CollectionRepository.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
 
99 99
         // order by oai_name
100 100
         $query->setOrderings(
101
-            array('oai_name' => QueryInterface::ORDER_ASCENDING)
101
+            array ('oai_name' => QueryInterface::ORDER_ASCENDING)
102 102
         );
103 103
 
104 104
         return $query->execute();
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@
 block discarded – undo
28 28
  *
29 29
  * @access public
30 30
  */
31
-class CollectionRepository extends Repository
32
-{
31
+class CollectionRepository extends Repository {
33 32
     /**
34 33
      * @access protected
35 34
      * @var array Set the default ordering. This is applied to findAll(), too.
Please login to merge, or discard this patch.
Classes/Updates/MigrateSettings.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function getDescription(): string
56 56
     {
57
-        return 'This wizard migrates existing front end plugins of the extension Kitodo.Presentation (dlf) to' .
58
-            ' make use of the Extbase naming scheme. Therefore it updates the field values' .
57
+        return 'This wizard migrates existing front end plugins of the extension Kitodo.Presentation (dlf) to'.
58
+            ' make use of the Extbase naming scheme. Therefore it updates the field values'.
59 59
             ' "pi_flexform" within the tt_content table';
60 60
     }
61 61
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         foreach ($fields as $field) {
171 171
             // change the index attribute if it doesn't start with 'settings.' yet
172 172
             if (strpos($field['index'], 'settings.') === false) {
173
-                $field['index'] = 'settings.' . $field['index'];
173
+                $field['index'] = 'settings.'.$field['index'];
174 174
             }
175 175
         }
176 176
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@
 block discarded – undo
26 26
  *
27 27
  * @internal
28 28
  */
29
-class MigrateSettings implements UpgradeWizardInterface
30
-{
29
+class MigrateSettings implements UpgradeWizardInterface {
31 30
 
32 31
     /**
33 32
      * Return the identifier for this wizard
Please login to merge, or discard this patch.
Tests/Functional/Api/PageViewProxyDisabledTest.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,12 +5,10 @@
 block discarded – undo
5 5
 use Kitodo\Dlf\Tests\Functional\FunctionalTestCase;
6 6
 use TYPO3\CMS\Core\Utility\GeneralUtility;
7 7
 
8
-class PageViewProxyDisabledTest extends FunctionalTestCase
9
-{
8
+class PageViewProxyDisabledTest extends FunctionalTestCase {
10 9
     protected $disableJsonWrappedResponse = true;
11 10
 
12
-    protected function queryProxy(array $query, string $method = 'GET')
13
-    {
11
+    protected function queryProxy(array $query, string $method = 'GET') {
14 12
         $query['eID'] = 'tx_dlf_pageview_proxy';
15 13
 
16 14
         return $this->httpClient->request($method, '', [
Please login to merge, or discard this patch.