Passed
Pull Request — master (#73)
by
unknown
02:25
created
Classes/ExpressionLanguage/DocumentTypeFunctionProvider.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -46,8 +46,7 @@  discard block
 block discarded – undo
46 46
     /**
47 47
      * @return ExpressionFunction[] An array of Function instances
48 48
      */
49
-    public function getFunctions()
50
-    {
49
+    public function getFunctions() {
51 50
         return [
52 51
             $this->getDocumentTypeFunction(),
53 52
         ];
@@ -62,12 +61,10 @@  discard block
 block discarded – undo
62 61
     {
63 62
         return new ExpressionFunction(
64 63
             'getDocumentType',
65
-            function ()
66
-            {
64
+            function () {
67 65
                 // Not implemented, we only use the evaluator
68 66
             },
69
-            function ($arguments, $cPid)
70
-            {
67
+            function ($arguments, $cPid) {
71 68
                 /** @var RequestWrapper $requestWrapper */
72 69
                 $requestWrapper = $arguments['request'];
73 70
                 $queryParams = $requestWrapper->getQueryParams();
@@ -107,8 +104,7 @@  discard block
 block discarded – undo
107 104
      *
108 105
      * @return \Kitodo\Dlf\Common\Document Instance of the current document
109 106
      */
110
-    protected function loadDocument(array $piVars)
111
-    {
107
+    protected function loadDocument(array $piVars) {
112 108
         // Check for required variable.
113 109
         if (!empty($piVars['id'])) {
114 110
             // Get instance of document.
Please login to merge, or discard this patch.
Classes/Plugin/Eid/SearchSuggest.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,16 +28,14 @@
 block discarded – undo
28 28
  * @subpackage dlf
29 29
  * @access public
30 30
  */
31
-class SearchSuggest
32
-{
31
+class SearchSuggest {
33 32
     /**
34 33
      * The main method of the eID script
35 34
      *
36 35
      *  @param ServerRequestInterface $request
37 36
      * @return ResponseInterface XML response of search suggestions
38 37
      */
39
-    public function main(ServerRequestInterface $request)
40
-    {
38
+    public function main(ServerRequestInterface $request) {
41 39
         $output = [];
42 40
         // Get input parameters and decrypt core name.
43 41
         $parameters = $request->getParsedBody();
Please login to merge, or discard this patch.
Classes/Plugin/OaiPmh.php 1 patch
Braces   +18 added lines, -36 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@  discard block
 block discarded – undo
27 27
  * @subpackage dlf
28 28
  * @access public
29 29
  */
30
-class OaiPmh extends \Kitodo\Dlf\Common\AbstractPlugin
31
-{
30
+class OaiPmh extends \Kitodo\Dlf\Common\AbstractPlugin {
32 31
     public $scriptRelPath = 'Classes/Plugin/OaiPmh.php';
33 32
 
34 33
     /**
@@ -78,8 +77,7 @@  discard block
 block discarded – undo
78 77
      *
79 78
      * @return void
80 79
      */
81
-    protected function deleteExpiredTokens()
82
-    {
80
+    protected function deleteExpiredTokens() {
83 81
         // Delete expired resumption tokens.
84 82
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_dlf_tokens');
85 83
 
@@ -106,8 +104,7 @@  discard block
 block discarded – undo
106 104
      *
107 105
      * @return \DOMElement XML node to add to the OAI response
108 106
      */
109
-    protected function error($type)
110
-    {
107
+    protected function error($type) {
111 108
         $this->error = true;
112 109
         $error = $this->oai->createElementNS('http://www.openarchives.org/OAI/2.0/', 'error', htmlspecialchars($this->pi_getLL($type, $type), ENT_NOQUOTES, 'UTF-8'));
113 110
         $error->setAttribute('code', $type);
@@ -121,8 +118,7 @@  discard block
 block discarded – undo
121 118
      *
122 119
      * @return void
123 120
      */
124
-    protected function getUrlParams()
125
-    {
121
+    protected function getUrlParams() {
126 122
         $allowedParams = [
127 123
             'verb',
128 124
             'identifier',
@@ -152,8 +148,7 @@  discard block
 block discarded – undo
152 148
      *
153 149
      * @return \DOMElement XML node to add to the OAI response
154 150
      */
155
-    protected function getDcData(array $metadata)
156
-    {
151
+    protected function getDcData(array $metadata) {
157 152
         $oai_dc = $this->oai->createElementNS($this->formats['oai_dc']['namespace'], 'oai_dc:dc');
158 153
         $oai_dc->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:dc', 'http://purl.org/dc/elements/1.1/');
159 154
         $oai_dc->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
@@ -231,8 +226,7 @@  discard block
 block discarded – undo
231 226
      *
232 227
      * @return \DOMElement XML node to add to the OAI response
233 228
      */
234
-    protected function getEpicurData(array $metadata)
235
-    {
229
+    protected function getEpicurData(array $metadata) {
236 230
         // Define all XML elements with or without qualified namespace.
237 231
         if (empty($this->conf['unqualified_epicur'])) {
238 232
             $epicur = $this->oai->createElementNS($this->formats['epicur']['namespace'], 'epicur:epicur');
@@ -295,8 +289,7 @@  discard block
 block discarded – undo
295 289
      *
296 290
      * @return \DOMElement XML node to add to the OAI response
297 291
      */
298
-    protected function getMetsData(array $metadata)
299
-    {
292
+    protected function getMetsData(array $metadata) {
300 293
         $mets = null;
301 294
         // Load METS file.
302 295
         $xml = new \DOMDocument();
@@ -328,8 +321,7 @@  discard block
 block discarded – undo
328 321
      *
329 322
      * @return void
330 323
      */
331
-    public function main($content, $conf)
332
-    {
324
+    public function main($content, $conf) {
333 325
         // Initialize plugin.
334 326
         $this->init($conf);
335 327
         // Turn cache off.
@@ -420,8 +412,7 @@  discard block
 block discarded – undo
420 412
      *
421 413
      * @return \DOMElement XML node to add to the OAI response
422 414
      */
423
-    protected function resume()
424
-    {
415
+    protected function resume() {
425 416
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
426 417
             ->getQueryBuilderForTable('tx_dlf_tokens');
427 418
 
@@ -454,8 +445,7 @@  discard block
 block discarded – undo
454 445
      *
455 446
      * @return \DOMElement XML node to add to the OAI response
456 447
      */
457
-    protected function verbGetRecord()
458
-    {
448
+    protected function verbGetRecord() {
459 449
         if (count($this->piVars) !== 3 || empty($this->piVars['metadataPrefix']) || empty($this->piVars['identifier'])) {
460 450
             return $this->error('badArgument');
461 451
         }
@@ -548,8 +538,7 @@  discard block
 block discarded – undo
548 538
      *
549 539
      * @return \DOMElement XML node to add to the OAI response
550 540
      */
551
-    protected function verbIdentify()
552
-    {
541
+    protected function verbIdentify() {
553 542
         // Check for invalid arguments.
554 543
         if (count($this->piVars) > 1) {
555 544
             return $this->error('badArgument');
@@ -632,8 +621,7 @@  discard block
 block discarded – undo
632 621
      *
633 622
      * @return \DOMElement XML node to add to the OAI response
634 623
      */
635
-    protected function verbListIdentifiers()
636
-    {
624
+    protected function verbListIdentifiers() {
637 625
         // If we have a resumption token we can continue our work
638 626
         if (!empty($this->piVars['resumptionToken'])) {
639 627
             // "resumptionToken" is an exclusive argument.
@@ -672,8 +660,7 @@  discard block
 block discarded – undo
672 660
      *
673 661
      * @return \DOMElement XML node to add to the OAI response
674 662
      */
675
-    protected function verbListMetadataFormats()
676
-    {
663
+    protected function verbListMetadataFormats() {
677 664
         $resArray = [];
678 665
         // Check for invalid arguments.
679 666
         if (count($this->piVars) > 1) {
@@ -731,8 +718,7 @@  discard block
 block discarded – undo
731 718
      *
732 719
      * @return \DOMElement XML node to add to the OAI response
733 720
      */
734
-    protected function verbListRecords()
735
-    {
721
+    protected function verbListRecords() {
736 722
         // Check for invalid arguments.
737 723
         if (!empty($this->piVars['resumptionToken'])) {
738 724
             // "resumptionToken" is an exclusive argument.
@@ -772,8 +758,7 @@  discard block
 block discarded – undo
772 758
      *
773 759
      * @return \DOMElement XML node to add to the OAI response
774 760
      */
775
-    protected function verbListSets()
776
-    {
761
+    protected function verbListSets() {
777 762
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
778 763
             ->getQueryBuilderForTable('tx_dlf_collections');
779 764
 
@@ -829,8 +814,7 @@  discard block
 block discarded – undo
829 814
      * @return array Array of matching records
830 815
      * @throws \Exception
831 816
      */
832
-    protected function fetchDocumentUIDs()
833
-    {
817
+    protected function fetchDocumentUIDs() {
834 818
         $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
835 819
             ->getQueryBuilderForTable('tx_dlf_collections');
836 820
 
@@ -955,8 +939,7 @@  discard block
 block discarded – undo
955 939
      *
956 940
      * @return \DOMElement XML of enriched records
957 941
      */
958
-    protected function generateOutputForDocumentList(DocumentList $documentListSet)
959
-    {
942
+    protected function generateOutputForDocumentList(DocumentList $documentListSet) {
960 943
         $documentsToProcess = $documentListSet->removeRange(0, (int) $this->conf['limit']);
961 944
         $verb = $this->piVars['verb'];
962 945
 
@@ -1059,8 +1042,7 @@  discard block
 block discarded – undo
1059 1042
      *
1060 1043
      * @return \DOMElement XML for resumption token
1061 1044
      */
1062
-    protected function generateResumptionTokenForDocumentListSet(DocumentList $documentListSet)
1063
-    {
1045
+    protected function generateResumptionTokenForDocumentListSet(DocumentList $documentListSet) {
1064 1046
         if ($documentListSet->count() !== 0) {
1065 1047
             $token = uniqid('', false);
1066 1048
 
Please login to merge, or discard this patch.