Passed
Pull Request — master (#123)
by
unknown
06:40 queued 02:39
created
Classes/Domain/Model/Library.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@
 block discarded – undo
30 30
  *
31 31
  * @access public
32 32
  */
33
-class Library extends AbstractEntity
34
-{
33
+class Library extends AbstractEntity {
35 34
     /**
36 35
      * @access protected
37 36
      * @var string
Please login to merge, or discard this patch.
Classes/Domain/Model/PageSelectForm.php 1 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 PageSelectForm extends AbstractEntity
26
-{
25
+class PageSelectForm extends AbstractEntity {
27 26
     /**
28 27
      * @access protected
29 28
      * @var integer
Please login to merge, or discard this patch.
Classes/Domain/Model/ActionLog.php 1 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 ActionLog extends AbstractEntity
26
-{
25
+class ActionLog extends AbstractEntity {
27 26
     /**
28 27
      * @access protected
29 28
      * @var int
Please login to merge, or discard this patch.
Classes/Domain/Model/SolrCore.php 1 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 SolrCore extends AbstractEntity
28
-{
27
+class SolrCore extends AbstractEntity {
29 28
     /**
30 29
      * @access protected
31 30
      * @var int
Please login to merge, or discard this patch.
Classes/Middleware/SearchSuggest.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
         $output = [];
56 56
         $solrCore = (string) $parameters['solrcore'];
57 57
         $uHash = (string) $parameters['uHash'];
58
-        if (hash_equals(GeneralUtility::hmac((string) (new Typo3Version()) . Environment::getExtensionsPath(), 'SearchSuggest'), $uHash) === false) {
58
+        if (hash_equals(GeneralUtility::hmac((string) (new Typo3Version()).Environment::getExtensionsPath(), 'SearchSuggest'), $uHash) === false) {
59 59
             throw new \InvalidArgumentException('No valid parameter passed!', 1580585079);
60 60
         }
61 61
         // Perform Solr query.
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,8 +30,7 @@
 block discarded – undo
30 30
  *
31 31
  * @access public
32 32
  */
33
-class SearchSuggest implements MiddlewareInterface
34
-{
33
+class SearchSuggest implements MiddlewareInterface {
35 34
     /**
36 35
      * The process method of the middleware.
37 36
      *
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
         $output = [];
56 56
         $solrCore = (string) $parameters['solrcore'];
57 57
         $uHash = (string) $parameters['uHash'];
58
-        if (hash_equals(GeneralUtility::hmac((string) (new Typo3Version()) . Environment::getExtensionsPath(), 'SearchSuggest'), $uHash) === false) {
58
+        if (hash_equals(GeneralUtility::hmac((string) (new Typo3Version()) . Environment::getExtensionsPath(), 'SearchSuggest'), $uHash) === FALSE) {
59 59
             throw new \InvalidArgumentException('No valid parameter passed!', 1580585079);
60 60
         }
61 61
         // Perform Solr query.
Please login to merge, or discard this patch.
Classes/Middleware/SearchInDocument.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
         // field for which highlighting is going to be performed,
153 153
         // is required if you want to have OCR highlighting
154 154
         $solrRequest->addParam('hl.ocr.fl', $this->fields['fulltext']);
155
-         // return the coordinates of highlighted search as absolute coordinates
155
+            // return the coordinates of highlighted search as absolute coordinates
156 156
         $solrRequest->addParam('hl.ocr.absoluteHighlights', 'on');
157 157
         // max amount of snippets for a single page
158 158
         $solrRequest->addParam('hl.snippets', '40');
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
         $encrypted = (string) $parameters['encrypted'];
73 73
         if (empty($encrypted)) {
74
-            throw new \InvalidArgumentException('No valid parameter passed: ' . $parameters['middleware'] . '  ' . $parameters['encrypted'] . '!', 1580585079);
74
+            throw new \InvalidArgumentException('No valid parameter passed: '.$parameters['middleware'].'  '.$parameters['encrypted'].'!', 1580585079);
75 75
         }
76 76
 
77 77
         $output = [
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
      */
175 175
     private function getQuery(array $parameters): string
176 176
     {
177
-        return $this->fields['fulltext'] . ':(' . Solr::escapeQuery((string) $parameters['q']) . ') AND ' . $this->fields['uid'] . ':' . $this->getUid($parameters['uid']);
177
+        return $this->fields['fulltext'].':('.Solr::escapeQuery((string) $parameters['q']).') AND '.$this->fields['uid'].':'.$this->getUid($parameters['uid']);
178 178
     }
179 179
 
180 180
     /**
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,8 +31,7 @@  discard block
 block discarded – undo
31 31
  *
32 32
  * @access public
33 33
  */
34
-class SearchInDocument implements MiddlewareInterface
35
-{
34
+class SearchInDocument implements MiddlewareInterface {
36 35
     /**
37 36
      * This holds the solr instance
38 37
      *
@@ -136,8 +135,7 @@  discard block
 block discarded – undo
136 135
      *
137 136
      * @return \Solarium\Core\Query\Result\ResultInterface result
138 137
      */
139
-    private function executeSolrQuery($parameters)
140
-    {
138
+    private function executeSolrQuery($parameters) {
141 139
         $query = $this->solr->service->createSelect();
142 140
         $query->setFields([$this->fields['id'], $this->fields['uid'], $this->fields['page']]);
143 141
         $query->setQuery($this->getQuery($parameters));
@@ -187,8 +185,7 @@  discard block
 block discarded – undo
187 185
      *
188 186
      * @return int|string uid of the document
189 187
      */
190
-    private function getUid(string $uid)
191
-    {
188
+    private function getUid(string $uid) {
192 189
         return is_numeric($uid) ? intval($uid) : $uid;
193 190
     }
194 191
 }
Please login to merge, or discard this patch.
Configuration/TCA/tx_dlf_metadata.php 1 patch
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
             'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_metadata.wrap',
144 144
             'config' => [
145 145
                 'behaviour' => [
146
-                    'allowLanguageSynchronization' => true
146
+                    'allowLanguageSynchronization' => TRUE
147 147
                 ],
148 148
                 'type' => 'text',
149 149
                 'cols' => 48,
@@ -151,8 +151,8 @@  discard block
 block discarded – undo
151 151
                 'wrap' => 'off',
152 152
                 'eval' => 'trim',
153 153
                 'default' => "key.wrap = <dt>|</dt>\nvalue.required = 1\nvalue.wrap = <dd>|</dd>",
154
-                'fixedFont' => true,
155
-                'enableTabulator' => true
154
+                'fixedFont' => TRUE,
155
+                'enableTabulator' => TRUE
156 156
             ],
157 157
         ],
158 158
         'index_tokenized' => [
Please login to merge, or discard this patch.
Configuration/TCA/tx_dlf_collections.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -157,14 +157,14 @@
 block discarded – undo
157 157
             'label' => 'LLL:EXT:dlf/Resources/Private/Language/locallang_labels.xlf:tx_dlf_collections.description',
158 158
             'config' => [
159 159
                 'behaviour' => [
160
-                    'allowLanguageSynchronization' => true
160
+                    'allowLanguageSynchronization' => TRUE
161 161
                 ],
162 162
                 'type' => 'text',
163 163
                 'cols' => 30,
164 164
                 'rows' => 10,
165 165
                 'wrap' => 'virtual',
166 166
                 'default' => '',
167
-                'enableRichtext' => true,
167
+                'enableRichtext' => TRUE,
168 168
             ],
169 169
         ],
170 170
         'thumbnail' => [
Please login to merge, or discard this patch.
Tests/Unit/Format/ModsTest.php 3 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      */
61 61
     public function extractAuthorsIfNoAutRoleTermAssigned(): void
62 62
     {
63
-        $xml = simplexml_load_file(__DIR__ . '/../../Fixtures/Format/modsAuthorNoAutRoleTerm.xml');
63
+        $xml = simplexml_load_file(__DIR__.'/../../Fixtures/Format/modsAuthorNoAutRoleTerm.xml');
64 64
         $mods = new Mods();
65 65
 
66 66
         $mods->extractMetadata($xml, $this->metadata, false);
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public function extractAuthorsWithAutRoleTermAssigned(): void
82 82
     {
83
-        $xml = simplexml_load_file(__DIR__ . '/../../Fixtures/Format/modsAuthorWithAutRoleTerm.xml');
83
+        $xml = simplexml_load_file(__DIR__.'/../../Fixtures/Format/modsAuthorWithAutRoleTerm.xml');
84 84
         $mods = new Mods();
85 85
 
86 86
         $mods->extractMetadata($xml, $this->metadata, false);
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public function extractPlaces(): void
104 104
     {
105
-        $xml = simplexml_load_file(__DIR__ . '/../../Fixtures/Format/modsOriginInfo.xml');
105
+        $xml = simplexml_load_file(__DIR__.'/../../Fixtures/Format/modsOriginInfo.xml');
106 106
         $mods = new Mods();
107 107
 
108 108
         $mods->extractMetadata($xml, $this->metadata, false);
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      */
132 132
     public function extractYears(): void
133 133
     {
134
-        $xml = simplexml_load_file(__DIR__ . '/../../Fixtures/Format/modsOriginInfo.xml');
134
+        $xml = simplexml_load_file(__DIR__.'/../../Fixtures/Format/modsOriginInfo.xml');
135 135
         $mods = new Mods();
136 136
 
137 137
         $mods->extractMetadata($xml, $this->metadata, false);
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
      */
161 161
     public function extractPlacesWithElectronicEdInside(): void
162 162
     {
163
-        $xml = simplexml_load_file(__DIR__ . '/../../Fixtures/Format/modsOriginInfoWithEditionElectronicEd.xml');
163
+        $xml = simplexml_load_file(__DIR__.'/../../Fixtures/Format/modsOriginInfoWithEditionElectronicEd.xml');
164 164
         $mods = new Mods();
165 165
 
166 166
         $mods->extractMetadata($xml, $this->metadata, false);
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
      */
190 190
     public function extractYearsWithElectronicEdInside(): void
191 191
     {
192
-        $xml = simplexml_load_file(__DIR__ . '/../../Fixtures/Format/modsOriginInfoWithEditionElectronicEd.xml');
192
+        $xml = simplexml_load_file(__DIR__.'/../../Fixtures/Format/modsOriginInfoWithEditionElectronicEd.xml');
193 193
         $mods = new Mods();
194 194
 
195 195
         $mods->extractMetadata($xml, $this->metadata, false);
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,7 @@
 block discarded – undo
15 15
 use Kitodo\Dlf\Format\Mods;
16 16
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
17 17
 
18
-class ModsTest extends UnitTestCase
19
-{
18
+class ModsTest extends UnitTestCase {
20 19
     protected $metadata = [];
21 20
 
22 21
     public function setUp(): void
Please login to merge, or discard this patch.
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $xml = simplexml_load_file(__DIR__ . '/../../Fixtures/Format/modsAuthorNoAutRoleTerm.xml');
64 64
         $mods = new Mods();
65 65
 
66
-        $mods->extractMetadata($xml, $this->metadata, false);
66
+        $mods->extractMetadata($xml, $this->metadata, FALSE);
67 67
 
68 68
         self::assertEquals(
69 69
             [
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         $xml = simplexml_load_file(__DIR__ . '/../../Fixtures/Format/modsAuthorWithAutRoleTerm.xml');
84 84
         $mods = new Mods();
85 85
 
86
-        $mods->extractMetadata($xml, $this->metadata, false);
86
+        $mods->extractMetadata($xml, $this->metadata, FALSE);
87 87
         self::assertEquals(
88 88
             [
89 89
                 'May, Jack, I',
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         $xml = simplexml_load_file(__DIR__ . '/../../Fixtures/Format/modsOriginInfo.xml');
106 106
         $mods = new Mods();
107 107
 
108
-        $mods->extractMetadata($xml, $this->metadata, false);
108
+        $mods->extractMetadata($xml, $this->metadata, FALSE);
109 109
 
110 110
         self::assertEquals(
111 111
             [
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         $xml = simplexml_load_file(__DIR__ . '/../../Fixtures/Format/modsOriginInfo.xml');
135 135
         $mods = new Mods();
136 136
 
137
-        $mods->extractMetadata($xml, $this->metadata, false);
137
+        $mods->extractMetadata($xml, $this->metadata, FALSE);
138 138
 
139 139
         self::assertEquals(
140 140
             [
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         $xml = simplexml_load_file(__DIR__ . '/../../Fixtures/Format/modsOriginInfoWithEditionElectronicEd.xml');
164 164
         $mods = new Mods();
165 165
 
166
-        $mods->extractMetadata($xml, $this->metadata, false);
166
+        $mods->extractMetadata($xml, $this->metadata, FALSE);
167 167
 
168 168
         self::assertEquals(
169 169
             [
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         $xml = simplexml_load_file(__DIR__ . '/../../Fixtures/Format/modsOriginInfoWithEditionElectronicEd.xml');
193 193
         $mods = new Mods();
194 194
 
195
-        $mods->extractMetadata($xml, $this->metadata, false);
195
+        $mods->extractMetadata($xml, $this->metadata, FALSE);
196 196
 
197 197
         self::assertEquals(
198 198
             [
Please login to merge, or discard this patch.