Passed
Pull Request — master (#123)
by
unknown
05:25
created
Classes/Controller/ToolboxController.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@  discard block
 block discarded – undo
24 24
  *
25 25
  * @access public
26 26
  */
27
-class ToolboxController extends AbstractController
28
-{
27
+class ToolboxController extends AbstractController {
29 28
 
30 29
     /**
31 30
      * @access private
@@ -208,8 +207,7 @@  discard block
 block discarded – undo
208 207
      *
209 208
      * @return void
210 209
      */
211
-    public function renderScoreTool()
212
-    {
210
+    public function renderScoreTool() {
213 211
         if (
214 212
             $this->isDocMissingOrEmpty()
215 213
             || empty($this->extConf['files']['fileGrpScore'])
Please login to merge, or discard this patch.
Classes/ViewHelpers/IsArrayViewHelper.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,10 +18,8 @@  discard block
 block discarded – undo
18 18
 /**
19 19
  * Checks if the given subject is an array.
20 20
  */
21
-class IsArrayViewHelper extends AbstractViewHelper
22
-{
23
-    public function initializeArguments()
24
-    {
21
+class IsArrayViewHelper extends AbstractViewHelper {
22
+    public function initializeArguments() {
25 23
         parent::initializeArguments();
26 24
         $this->registerArgument('subject', 'string', 'The subject');
27 25
     }
@@ -29,8 +27,7 @@  discard block
 block discarded – undo
29 27
     /**
30 28
      * @return bool
31 29
      */
32
-    public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
33
-    {
30
+    public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) {
34 31
         $subject = $arguments['subject'];
35 32
         if ($subject === null) {
36 33
             $subject = $renderChildrenClosure();
Please login to merge, or discard this patch.
Classes/ViewHelpers/IsInArrayViewHelper.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,10 +13,8 @@  discard block
 block discarded – undo
13 13
 
14 14
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
15 15
 
16
-class IsInArrayViewHelper extends AbstractViewHelper
17
-{
18
-    public function initializeArguments()
19
-    {
16
+class IsInArrayViewHelper extends AbstractViewHelper {
17
+    public function initializeArguments() {
20 18
         parent::initializeArguments();
21 19
         $this->registerArgument('needle', 'mixed', 'The searched value', true);
22 20
         $this->registerArgument('haystack', 'array', 'The array', true);
@@ -27,8 +25,7 @@  discard block
 block discarded – undo
27 25
      *
28 26
      * @return bool
29 27
      */
30
-    public function render()
31
-    {
28
+    public function render() {
32 29
         $needle = $this->arguments['needle'];
33 30
         $haystack = $this->arguments['haystack'];
34 31
 
Please login to merge, or discard this patch.
Classes/ViewHelpers/ImplodeViewHelper.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,10 +13,8 @@  discard block
 block discarded – undo
13 13
 
14 14
 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
15 15
 
16
-class ImplodeViewHelper extends AbstractViewHelper
17
-{
18
-    public function initializeArguments()
19
-    {
16
+class ImplodeViewHelper extends AbstractViewHelper {
17
+    public function initializeArguments() {
20 18
         parent::initializeArguments();
21 19
         $this->registerArgument('value', 'array', 'The array to be imploded', true);
22 20
         $this->registerArgument('delimiter', 'string', 'The delimiter ', true);
@@ -27,8 +25,7 @@  discard block
 block discarded – undo
27 25
      *
28 26
      * @return string
29 27
      */
30
-    public function render()
31
-    {
28
+    public function render() {
32 29
         $value = $this->arguments['value'];
33 30
         $delimiter = $this->arguments['delimiter'];
34 31
 
Please login to merge, or discard this patch.
Classes/Common/AnnotationRequest.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,8 +12,7 @@  discard block
 block discarded – undo
12 12
  * LICENSE.txt file that was distributed with this source code.
13 13
  */
14 14
 
15
-class AnnotationRequest
16
-{
15
+class AnnotationRequest {
17 16
     /**
18 17
      * @var string
19 18
      */
@@ -22,8 +21,7 @@  discard block
 block discarded – undo
22 21
     /**
23 22
      * @param string $apiUrl The url of the annotation server api.
24 23
      */
25
-    public function __construct($apiUrl)
26
-    {
24
+    public function __construct($apiUrl) {
27 25
         $this->apiUrl =  trim($apiUrl, "/ ");
28 26
     }
29 27
 
@@ -55,8 +53,7 @@  discard block
 block discarded – undo
55 53
      * @param string $id Document id (purl)
56 54
      * @return array
57 55
      */
58
-    public function getAll($id)
59
-    {
56
+    public function getAll($id) {
60 57
         $annotations = [];
61 58
 
62 59
         $annotationData = $this->requestAnnotions($this->apiUrl . '?target=' . urlencode($id . '/*'));
Please login to merge, or discard this patch.
Classes/Common/MetsDocument.php 1 patch
Braces   +8 added lines, -16 removed lines patch added patch discarded remove patch
@@ -72,8 +72,7 @@  discard block
 block discarded – undo
72 72
  * @property-read SimpleXMLElement $mets this holds the XML file's METS part as SimpleXMLElement object
73 73
  * @property-read string $parentHref URL of the parent document (determined via mptr element), or empty string if none is available
74 74
  */
75
-final class MetsDocument extends AbstractDocument
76
-{
75
+final class MetsDocument extends AbstractDocument {
77 76
     /**
78 77
      * @access protected
79 78
      * @var string[] Subsections / tags that may occur within `<mets:amdSec>`
@@ -286,8 +285,7 @@  discard block
 block discarded – undo
286 285
     /**
287 286
      * This gets the measure beginning of a page
288 287
      */
289
-    public function getPageBeginning($pageId, $fileId)
290
-    {
288
+    public function getPageBeginning($pageId, $fileId) {
291 289
         $mets = $this->mets
292 290
             ->xpath(
293 291
                 './mets:structMap[@TYPE="PHYSICAL"]' .
@@ -482,8 +480,7 @@  discard block
 block discarded – undo
482 480
      *
483 481
      * @return ?string thumbnail or null if not found
484 482
      */
485
-    private function getThumbnail(string $id = '')
486
-    {
483
+    private function getThumbnail(string $id = '') {
487 484
         // Load plugin configuration.
488 485
         $extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey, 'files');
489 486
         $fileGrpsThumb = GeneralUtility::trimExplode(',', $extConf['fileGrpThumbs']);
@@ -624,8 +621,7 @@  discard block
 block discarded – undo
624 621
      * @param DOMNode $parentNode
625 622
      * @return array|false
626 623
      */
627
-    private function getSubentries($allSubentries, string $parentIndex, DOMNode $parentNode)
628
-    {
624
+    private function getSubentries($allSubentries, string $parentIndex, DOMNode $parentNode) {
629 625
         $domXPath = new DOMXPath($parentNode->ownerDocument);
630 626
         $this->registerNamespaces($domXPath);
631 627
         $theseSubentries = [];
@@ -655,8 +651,7 @@  discard block
 block discarded – undo
655 651
      * @param $subentry
656 652
      * @return array
657 653
      */
658
-    private function getSubentryValue($values, $subentry)
659
-    {
654
+    private function getSubentryValue($values, $subentry) {
660 655
         $theseSubentries = [];
661 656
         if (
662 657
             ($values instanceof DOMNodeList
@@ -906,8 +901,7 @@  discard block
 block discarded – undo
906 901
      *
907 902
      * @return bool true if extraction successful, false otherwise
908 903
      */
909
-    private function extractMetadataIfTypeSupported(string $dmdId, string $mdSectionType, array &$metadata)
910
-    {
904
+    private function extractMetadataIfTypeSupported(string $dmdId, string $mdSectionType, array &$metadata) {
911 905
         // Is this metadata format supported?
912 906
         if (!empty($this->formats[$this->mdSec[$dmdId]['type']])) {
913 907
             if (!empty($this->formats[$this->mdSec[$dmdId]['type']]['class'])) {
@@ -939,8 +933,7 @@  discard block
 block discarded – undo
939 933
      *
940 934
      * @return array additional metadata data queried from database
941 935
      */
942
-    private function getAdditionalMetadataFromDatabase(int $cPid, string $dmdId)
943
-    {
936
+    private function getAdditionalMetadataFromDatabase(int $cPid, string $dmdId) {
944 937
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
945 938
             ->getQueryBuilderForTable('tx_dlf_metadata');
946 939
         // Get hidden records, too.
@@ -1131,8 +1124,7 @@  discard block
 block discarded – undo
1131 1124
     /**
1132 1125
      * @see AbstractDocument::getStructureDepth()
1133 1126
      */
1134
-    public function getStructureDepth(string $logId)
1135
-    {
1127
+    public function getStructureDepth(string $logId) {
1136 1128
         $ancestors = $this->mets->xpath('./mets:structMap[@TYPE="LOGICAL"]//mets:div[@ID="' . $logId . '"]/ancestor::*');
1137 1129
         if (!empty($ancestors)) {
1138 1130
             return count($ancestors);
Please login to merge, or discard this patch.
Classes/Common/DocumentAnnotation.php 1 patch
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@  discard block
 block discarded – undo
28 28
  *
29 29
  * @access public
30 30
  */
31
-class DocumentAnnotation
32
-{
31
+class DocumentAnnotation {
33 32
     /**
34 33
      * @var null|DocumentAnnotation
35 34
      */
@@ -55,8 +54,7 @@  discard block
 block discarded – undo
55 54
      * @param array $annotationData
56 55
      * @param Document $document
57 56
      */
58
-    private function __construct($annotationData, $document)
59
-    {
57
+    private function __construct($annotationData, $document) {
60 58
         $this->annotationData = $annotationData;
61 59
         $this->document = $document;
62 60
         $this->logger = GeneralUtility::makeInstance(LogManager::class)->getLogger(static::class);
@@ -67,8 +65,7 @@  discard block
 block discarded – undo
67 65
      *
68 66
      * @return Annotation[]|array
69 67
      */
70
-    public function getAnnotations()
71
-    {
68
+    public function getAnnotations() {
72 69
         if (empty($this->annotationData)) {
73 70
             return [];
74 71
         }
@@ -168,8 +165,7 @@  discard block
 block discarded – undo
168 165
      * @param string $logicalId
169 166
      * @return array
170 167
      */
171
-    protected function getPagesByLogicalId($logicalId)
172
-    {
168
+    protected function getPagesByLogicalId($logicalId) {
173 169
         $pages = [];
174 170
         if (
175 171
             array_key_exists('l2p', $this->document->getCurrentDocument()->smLinks) &&
@@ -193,8 +189,7 @@  discard block
 block discarded – undo
193 189
      * @param string $physicalId
194 190
      * @return array
195 191
      */
196
-    protected function getPagesByPhysicalId($physicalId)
197
-    {
192
+    protected function getPagesByPhysicalId($physicalId) {
198 193
         $pages = [];
199 194
         foreach ($this->document->getCurrentDocument()->physicalStructureInfo as $physicalInfo) {
200 195
             $order = $physicalInfo['order'];
@@ -217,8 +212,7 @@  discard block
 block discarded – undo
217 212
      * @param string $fileId
218 213
      * @return array
219 214
      */
220
-    protected function getPagesByFileId($fileId)
221
-    {
215
+    protected function getPagesByFileId($fileId) {
222 216
         $pages = [];
223 217
         foreach ($this->document->getCurrentDocument()->physicalStructureInfo as $physicalInfo) {
224 218
             if (
@@ -243,8 +237,7 @@  discard block
 block discarded – undo
243 237
      * @param string $range
244 238
      * @return array
245 239
      */
246
-    protected function getAudioPagesByFileId($fileId, $range = null)
247
-    {
240
+    protected function getAudioPagesByFileId($fileId, $range = null) {
248 241
         $tracks = [];
249 242
         foreach ($this->document->getCurrentDocument()->physicalStructureInfo as $physicalInfo) {
250 243
             if (array_key_exists('tracks', $physicalInfo) && is_array($physicalInfo['tracks'])) {
@@ -299,8 +292,7 @@  discard block
 block discarded – undo
299 292
      * @param string $range
300 293
      * @return array
301 294
      */
302
-    protected function getMeasurePagesByFileId($fileId, $range = null)
303
-    {
295
+    protected function getMeasurePagesByFileId($fileId, $range = null) {
304 296
         // Get all measures referencing the fileid
305 297
         $measures = [];
306 298
         // Get the related page numbers
@@ -355,8 +347,7 @@  discard block
 block discarded – undo
355 347
      *
356 348
      * @return array
357 349
      */
358
-    public function getVerovioRelevantAnnotations()
359
-    {
350
+    public function getVerovioRelevantAnnotations() {
360 351
         $annotations = [];
361 352
         /** @var Annotation $annotation */
362 353
         foreach ($this->getAnnotations() as $annotation) {
@@ -373,8 +364,7 @@  discard block
 block discarded – undo
373 364
      * @param Document $document
374 365
      * @return array
375 366
      */
376
-    protected static function loadData($document)
377
-    {
367
+    protected static function loadData($document) {
378 368
         $annotationData = [];
379 369
         $conf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('dlf');
380 370
         $apiBaseUrl = $conf['annotationServerUrl'];
@@ -393,8 +383,7 @@  discard block
 block discarded – undo
393 383
      * @return DocumentAnnotation|null
394 384
      *
395 385
      */
396
-    public static function getInstance($document)
397
-    {
386
+    public static function getInstance($document) {
398 387
         if (self::$instance == null) {
399 388
             $annotationData = self::loadData($document);
400 389
             self::$instance = new DocumentAnnotation($annotationData, $document);
Please login to merge, or discard this patch.
Classes/Controller/Embedded3dViewerController.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@
 block discarded – undo
21 21
  *
22 22
  * @access public
23 23
  */
24
-class Embedded3dViewerController extends AbstractController
25
-{
24
+class Embedded3dViewerController extends AbstractController {
26 25
 
27 26
     const MIDDLEWARE_DLF_EMBEDDED_3D_VIEWER_PREFIX = '/?middleware=dlf/embedded3dviewer';
28 27
 
Please login to merge, or discard this patch.
Classes/Command/OptimizeCommand.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@
 block discarded – undo
27 27
  *
28 28
  * @access public
29 29
  */
30
-class OptimizeCommand extends Command
31
-{
30
+class OptimizeCommand extends Command {
32 31
 
33 32
     /**
34 33
      * Configure the command by defining the name, options and arguments
Please login to merge, or discard this patch.