Passed
Push — master ( 757b9a...3f7054 )
by
unknown
05:20 queued 02:36
created
Classes/ExpressionLanguage/DocumentTypeFunctionProvider.php 3 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -58,10 +58,10 @@  discard block
 block discarded – undo
58 58
     {
59 59
         return new ExpressionFunction(
60 60
             'getDocumentType',
61
-            function () {
61
+            function() {
62 62
                 // Not implemented, we only use the evaluator
63 63
             },
64
-            function ($arguments, $cPid) {
64
+            function($arguments, $cPid) {
65 65
                 /** @var RequestWrapper $requestWrapper */
66 66
                 $requestWrapper = $arguments['request'];
67 67
                 $queryParams = $requestWrapper->getQueryParams();
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             if ($doc->ready) {
108 108
                 return $doc;
109 109
             } else {
110
-                Helper::devLog('Failed to load document with UID ' . $piVars['id'], DEVLOG_SEVERITY_WARNING);
110
+                Helper::devLog('Failed to load document with UID '.$piVars['id'], DEVLOG_SEVERITY_WARNING);
111 111
             }
112 112
         } elseif (!empty($piVars['recordId'])) {
113 113
             $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
                 // Try to load document.
129 129
                 return $this->loadDocument(['id' => $resArray['uid']]);
130 130
             } else {
131
-                Helper::devLog('Failed to load document with record ID "' . $piVars['recordId'] . '"', DEVLOG_SEVERITY_WARNING);
131
+                Helper::devLog('Failed to load document with record ID "'.$piVars['recordId'].'"', DEVLOG_SEVERITY_WARNING);
132 132
             }
133 133
         }
134 134
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@  discard block
 block discarded – undo
28 28
  * @subpackage dlf
29 29
  * @access public
30 30
  */
31
-class DocumentTypeFunctionProvider implements ExpressionFunctionProviderInterface
32
-{
31
+class DocumentTypeFunctionProvider implements ExpressionFunctionProviderInterface {
33 32
     /**
34 33
      * This holds the extension's parameter prefix
35 34
      * @see \Kitodo\Dlf\Common\AbstractPlugin
@@ -42,8 +41,7 @@  discard block
 block discarded – undo
42 41
     /**
43 42
      * @return ExpressionFunction[] An array of Function instances
44 43
      */
45
-    public function getFunctions()
46
-    {
44
+    public function getFunctions() {
47 45
         return [
48 46
             $this->getDocumentTypeFunction(),
49 47
         ];
@@ -98,8 +96,7 @@  discard block
 block discarded – undo
98 96
      *
99 97
      * @return \Kitodo\Dlf\Common\Document Instance of the current document
100 98
      */
101
-    protected function loadDocument(array $piVars)
102
-    {
99
+    protected function loadDocument(array $piVars) {
103 100
         // Check for required variable.
104 101
         if (!empty($piVars['id'])) {
105 102
             // Get instance of document.
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
                 // Load document with current plugin parameters.
72 72
                 $doc = $this->loadDocument($queryParams[$this->prefixId]);
73
-                if ($doc === null) {
73
+                if ($doc === NULL) {
74 74
                     return $type;
75 75
                 }
76 76
                 $metadata = $doc->getTitledata($cPid);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                     // Calendar plugin does not support IIIF (yet). Abort for all newspaper related types.
79 79
                     if (
80 80
                         $doc instanceof IiifManifest
81
-                        && array_search($metadata['type'][0], ['newspaper', 'ephemera', 'year', 'issue']) !== false
81
+                        && array_search($metadata['type'][0], ['newspaper', 'ephemera', 'year', 'issue']) !== FALSE
82 82
                     ) {
83 83
                         return $type;
84 84
                     }
Please login to merge, or discard this patch.
Classes/ExpressionLanguage/DocumentTypeProvider.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,10 +23,8 @@
 block discarded – undo
23 23
  * @subpackage dlf
24 24
  * @access public
25 25
  */
26
-class DocumentTypeProvider extends AbstractProvider
27
-{
28
-    public function __construct()
29
-    {
26
+class DocumentTypeProvider extends AbstractProvider {
27
+    public function __construct() {
30 28
         $this->expressionLanguageProviders = [
31 29
             DocumentTypeFunctionProvider::class
32 30
         ];
Please login to merge, or discard this patch.