Passed
Pull Request — master (#123)
by Sebastian
03:26
created
Classes/Updates/MigrateSettings.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@
 block discarded – undo
23 23
  * Class MigrateSettings
24 24
  * @internal
25 25
  */
26
-class MigrateSettings implements UpgradeWizardInterface
27
-{
26
+class MigrateSettings implements UpgradeWizardInterface {
28 27
 
29 28
     /**
30 29
      * Return the identifier for this wizard
Please login to merge, or discard this patch.
Classes/Updates/FileLocationUpdater.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -153,8 +153,7 @@  discard block
 block discarded – undo
153 153
      * @return array|int
154 154
      * @throws \RuntimeException
155 155
      */
156
-    protected function getRecordsFromTable($countOnly = false)
157
-    {
156
+    protected function getRecordsFromTable($countOnly = false) {
158 157
         $connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
159 158
         $allResults = [];
160 159
         $numResults = 0;
@@ -234,8 +233,7 @@  discard block
 block discarded – undo
234 233
      * @param array $row
235 234
      * @throws \Exception
236 235
      */
237
-    protected function migrateField($table, $row)
238
-    {
236
+    protected function migrateField($table, $row) {
239 237
         $fieldItem = trim($row[$this->fieldsToMigrate[$table]]);
240 238
 
241 239
         if (empty($fieldItem) || is_numeric($fieldItem)) {
Please login to merge, or discard this patch.
Classes/ViewHelpers/JsFooterViewHelper.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,13 +19,11 @@
 block discarded – undo
19 19
 /**
20 20
  * Add inline JavaScript code to footer *
21 21
  */
22
-class JsFooterViewHelper extends AbstractViewHelper
23
-{
22
+class JsFooterViewHelper extends AbstractViewHelper {
24 23
     /**
25 24
      * Initialize arguments.
26 25
      */
27
-    public function initializeArguments()
28
-    {
26
+    public function initializeArguments() {
29 27
         parent::initializeArguments();
30 28
         $this->registerArgument('inlineCode', 'string', 'Inline JavaScript', true);
31 29
     }
Please login to merge, or discard this patch.
Classes/Controller/PageViewController.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@  discard block
 block discarded – undo
26 26
  * @subpackage dlf
27 27
  * @access public
28 28
  */
29
-class PageViewController extends AbstractController
30
-{
29
+class PageViewController extends AbstractController {
31 30
     /**
32 31
      * Holds the controls to add to the map
33 32
      *
@@ -65,8 +64,7 @@  discard block
 block discarded – undo
65 64
      *
66 65
      * @return void
67 66
      */
68
-    public function mainAction()
69
-    {
67
+    public function mainAction() {
70 68
         // Load current document.
71 69
         $this->loadDocument($this->requestData);
72 70
         if (
@@ -121,8 +119,7 @@  discard block
 block discarded – undo
121 119
      *
122 120
      * @return array URL and MIME type of fulltext file
123 121
      */
124
-    protected function getFulltext($page)
125
-    {
122
+    protected function getFulltext($page) {
126 123
         $fulltext = [];
127 124
         // Get fulltext link.
128 125
         $fileGrpsFulltext = GeneralUtility::trimExplode(',', $this->extConf['fileGrpFulltext']);
@@ -162,8 +159,7 @@  discard block
 block discarded – undo
162 159
      *
163 160
      * @return void
164 161
      */
165
-    protected function addViewerJS()
166
-    {
162
+    protected function addViewerJS() {
167 163
         // Viewer configuration.
168 164
         $viewerConfiguration = '$(document).ready(function() {
169 165
                 if (dlfUtils.exists(dlfViewer)) {
@@ -189,8 +185,7 @@  discard block
 block discarded – undo
189 185
      * @return array An array containing the IRIs of the AnnotationLists / AnnotationPages as well as
190 186
      *               some information about the canvas.
191 187
      */
192
-    protected function getAnnotationContainers($page)
193
-    {
188
+    protected function getAnnotationContainers($page) {
194 189
         if ($this->document->getDoc() instanceof IiifManifest) {
195 190
             $canvasId = $this->document->getDoc()->physicalStructure[$page];
196 191
             $iiif = $this->document->getDoc()->getIiif();
@@ -246,8 +241,7 @@  discard block
 block discarded – undo
246 241
      *
247 242
      * @return array URL and MIME type of image file
248 243
      */
249
-    protected function getImage($page)
250
-    {
244
+    protected function getImage($page) {
251 245
         $image = [];
252 246
         // Get @USE value of METS fileGrp.
253 247
         $fileGrpsImages = GeneralUtility::trimExplode(',', $this->extConf['fileGrpImages']);
Please login to merge, or discard this patch.
Classes/Controller/SearchController.php 1 patch
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@  discard block
 block discarded – undo
32 32
  * @subpackage dlf
33 33
  * @access public
34 34
  */
35
-class SearchController extends AbstractController
36
-{
35
+class SearchController extends AbstractController {
37 36
     /**
38 37
      * @var CollectionRepository
39 38
      */
@@ -42,8 +41,7 @@  discard block
 block discarded – undo
42 41
     /**
43 42
      * @param CollectionRepository $collectionRepository
44 43
      */
45
-    public function injectCollectionRepository(CollectionRepository $collectionRepository)
46
-    {
44
+    public function injectCollectionRepository(CollectionRepository $collectionRepository) {
47 45
         $this->collectionRepository = $collectionRepository;
48 46
     }
49 47
 
@@ -55,8 +53,7 @@  discard block
 block discarded – undo
55 53
     /**
56 54
      * @param MetadataRepository $metadataRepository
57 55
      */
58
-    public function injectMetadataRepository(MetadataRepository $metadataRepository)
59
-    {
56
+    public function injectMetadataRepository(MetadataRepository $metadataRepository) {
60 57
         $this->metadataRepository = $metadataRepository;
61 58
     }
62 59
 
@@ -71,8 +68,7 @@  discard block
 block discarded – undo
71 68
      *
72 69
      * @return void
73 70
      */
74
-    public function searchAction()
75
-    {
71
+    public function searchAction() {
76 72
         // if search was triggered, get search parameters from POST variables
77 73
         $this->searchParams = $this->getParametersSafely('searchParameter');
78 74
 
@@ -87,8 +83,7 @@  discard block
 block discarded – undo
87 83
      *
88 84
      * @return void
89 85
      */
90
-    public function mainAction()
91
-    {
86
+    public function mainAction() {
92 87
         $listViewSearch = false;
93 88
         // Quit without doing anything if required variables are not set.
94 89
         if (empty($this->settings['solrcore'])) {
@@ -174,8 +169,7 @@  discard block
 block discarded – undo
174 169
      *
175 170
      * @return string HTML output of facets menu
176 171
      */
177
-    protected function addFacetsMenu()
178
-    {
172
+    protected function addFacetsMenu() {
179 173
         // Quit without doing anything if no facets are configured.
180 174
         if (empty($this->settings['facets']) && empty($this->settings['facetCollections'])) {
181 175
             return '';
@@ -200,8 +194,7 @@  discard block
 block discarded – undo
200 194
      *
201 195
      * @return array HMENU array
202 196
      */
203
-    public function makeFacetsMenuArray($facets)
204
-    {
197
+    public function makeFacetsMenuArray($facets) {
205 198
         $menuArray = [];
206 199
         // Set default value for facet search.
207 200
         $search = [
@@ -360,8 +353,7 @@  discard block
 block discarded – undo
360 353
      *
361 354
      * @return array The array for the facet's menu entry
362 355
      */
363
-    protected function getFacetsMenuEntry($field, $value, $count, $search, &$state)
364
-    {
356
+    protected function getFacetsMenuEntry($field, $value, $count, $search, &$state) {
365 357
         $entryArray = [];
366 358
         // Translate value.
367 359
         if ($field == 'owner_faceting') {
@@ -412,8 +404,7 @@  discard block
 block discarded – undo
412 404
      *
413 405
      * @return string The extended search form or an empty string
414 406
      */
415
-    protected function addExtendedSearch()
416
-    {
407
+    protected function addExtendedSearch() {
417 408
         // Quit without doing anything if no fields for extended search are selected.
418 409
         if (
419 410
             empty($this->settings['extendedSlotCount'])
Please login to merge, or discard this patch.
Tests/Unit/Common/HelperTest.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,10 +5,8 @@
 block discarded – undo
5 5
 use Kitodo\Dlf\Common\Helper;
6 6
 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
7 7
 
8
-class HelperTest extends UnitTestCase
9
-{
10
-    public function assertInvalidXml($xml)
11
-    {
8
+class HelperTest extends UnitTestCase {
9
+    public function assertInvalidXml($xml) {
12 10
         $result = Helper::getXmlFileAsString($xml);
13 11
         $this->assertEquals(false, $result);
14 12
     }
Please login to merge, or discard this patch.
Tests/Functional/Api/PageViewProxyTest.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -6,19 +6,16 @@
 block discarded – undo
6 6
 use Kitodo\Dlf\Tests\Functional\FunctionalTestCase;
7 7
 use TYPO3\CMS\Core\Utility\GeneralUtility;
8 8
 
9
-class PageViewProxyTest extends FunctionalTestCase
10
-{
9
+class PageViewProxyTest extends FunctionalTestCase {
11 10
     protected $disableJsonWrappedResponse = true;
12 11
 
13
-    protected function getDlfConfiguration()
14
-    {
12
+    protected function getDlfConfiguration() {
15 13
         return array_merge(parent::getDlfConfiguration(), [
16 14
             'enableInternalProxy' => true,
17 15
         ]);
18 16
     }
19 17
 
20
-    protected function queryProxy(array $query, string $method = 'GET')
21
-    {
18
+    protected function queryProxy(array $query, string $method = 'GET') {
22 19
         $query['eID'] = 'tx_dlf_pageview_proxy';
23 20
 
24 21
         return $this->httpClient->request($method, '', [
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.
Tests/Functional/Repository/DocumentRepositoryTest.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
8 8
 use Kitodo\Dlf\Tests\Functional\FunctionalTestCase;
9 9
 use TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage;
10 10
 
11
-class DocumentRepositoryTest extends FunctionalTestCase
12
-{
11
+class DocumentRepositoryTest extends FunctionalTestCase {
13 12
     /**
14 13
      * @var DocumentRepository
15 14
      */
Please login to merge, or discard this patch.