Passed
Pull Request — master (#108)
by Ralf
05:26
created
Classes/ViewHelpers/Link/PreviewViewHelper.php 2 patches
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@  discard block
 block discarded – undo
19 19
 use TYPO3\CMS\Backend\Utility\BackendUtility;
20 20
 use TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendViewHelper;
21 21
 
22
-class PreviewViewHelper extends AbstractBackendViewHelper
23
-{
22
+class PreviewViewHelper extends AbstractBackendViewHelper {
24 23
 
25 24
     /**
26 25
      * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
@@ -31,8 +30,7 @@  discard block
 block discarded – undo
31 30
      * @param \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager
32 31
      * @return void
33 32
      */
34
-    public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager)
35
-    {
33
+    public function injectConfigurationManager(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager) {
36 34
         $this->configurationManager = $configurationManager;
37 35
     }
38 36
 
@@ -54,8 +52,7 @@  discard block
 block discarded – undo
54 52
      * @param  string $class
55 53
      * @return string html output
56 54
      */
57
-    protected function getViewIcon(array $row, $pageUid, $apiPid, $insideText, $class)
58
-    {
55
+    protected function getViewIcon(array $row, $pageUid, $apiPid, $insideText, $class) {
59 56
 
60 57
         $previewMets = BackendUtility::getViewDomain($pageUid)
61 58
             . '/index.php?id=' . $apiPid
@@ -85,8 +82,7 @@  discard block
 block discarded – undo
85 82
      * @param  string $class
86 83
      * @return string the rendered record list
87 84
      */
88
-    public function render(array $arguments, $pageUid, $apiPid, $class)
89
-    {
85
+    public function render(array $arguments, $pageUid, $apiPid, $class) {
90 86
 
91 87
         if ($arguments['document']) {
92 88
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
         }
68 68
 
69 69
         $additionalGetVars = '&tx_dlf[id]=' . urlencode($previewMets) . '&no_cache=1';
70
-        $title = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('manager.tooltip.preview', 'dpf', $arguments = null);
70
+        $title = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('manager.tooltip.preview', 'dpf', $arguments = NULL);
71 71
         $icon = '<a href="#" data-toggle="tooltip" class="' . $class . '" onclick="' . htmlspecialchars(\TYPO3\CMS\Backend\Utility\BackendUtility::viewOnClick($pageUid, $this->backPath, '', '', '', $additionalGetVars)) . '" title="' . $title . '">' .
72 72
                           $insideText . '</a>';
73 73
 
Please login to merge, or discard this patch.
Classes/Controller/GetFileController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
         switch ($piVars['action']) {
81 81
             case 'mets':
82
-                $path = rtrim('http://' . $fedoraHost,"/").'/fedora/objects/'.$piVars['qid'].'/methods/qucosa:SDef/getMETSDissemination?supplement=yes';
82
+                $path = rtrim('http://' . $fedoraHost, "/") . '/fedora/objects/' . $piVars['qid'] . '/methods/qucosa:SDef/getMETSDissemination?supplement=yes';
83 83
                 break;
84 84
 
85 85
             case 'preview':
@@ -142,13 +142,13 @@  discard block
 block discarded – undo
142 142
 
143 143
                 $qid = $piVars['qid'];
144 144
                 $source = explode(':', $qid);
145
-                if($source[0] == 'qucosa') {
145
+                if ($source[0] == 'qucosa') {
146 146
 
147
-                    $path = rtrim('http://' . $fedoraHost,"/").'/fedora/objects/'.$piVars['qid'].'/methods/qucosa:SDef/getMETSDissemination?supplement=yes';
147
+                    $path = rtrim('http://' . $fedoraHost, "/") . '/fedora/objects/' . $piVars['qid'] . '/methods/qucosa:SDef/getMETSDissemination?supplement=yes';
148 148
                     $metsXml = str_replace('&', '&amp;', file_get_contents($path));
149 149
                     $dataCiteXml = \EWW\Dpf\Helper\DataCiteXml::convertFromMetsXml($metsXml);
150 150
 
151
-                } elseif($document = $this->documentRepository->findByUid($piVars['qid'])) {
151
+                } elseif ($document = $this->documentRepository->findByUid($piVars['qid'])) {
152 152
 
153 153
                     $metsXml = str_replace('&', '&amp;', $this->buildMetsXml($document));
154 154
                     $dataCiteXml = \EWW\Dpf\Helper\DataCiteXml::convertFromMetsXml($metsXml);
@@ -171,8 +171,8 @@  discard block
 block discarded – undo
171 171
 
172 172
             case 'zip':
173 173
                 // FIXME Service locations on Fedora host are hard coded
174
-                $metsUrl = rtrim('http://' . $fedoraHost,"/") . '/mets?pid=' . $piVars['qid'];
175
-                $path = rtrim('http://' . $fedoraHost,"/") . '/zip?metsurl=' . rawurlencode($metsUrl);
174
+                $metsUrl = rtrim('http://' . $fedoraHost, "/") . '/mets?pid=' . $piVars['qid'];
175
+                $path = rtrim('http://' . $fedoraHost, "/") . '/zip?metsurl=' . rawurlencode($metsUrl);
176 176
                 break;
177 177
 
178 178
             default:
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         }
192 192
 
193 193
         if (TRUE === $restrictToActiveDocuments) {
194
-            $objectProfileURI = rtrim('http://' . $fedoraHost,"/").'/fedora/objects/'.$piVars['qid'].'?format=XML';
194
+            $objectProfileURI = rtrim('http://' . $fedoraHost, "/") . '/fedora/objects/' . $piVars['qid'] . '?format=XML';
195 195
             $objectProfileXML = file_get_contents($objectProfileURI);
196 196
             if (FALSE !== $objectProfileXML) {
197 197
                 $objectProfileDOM = new \DOMDocument('1.0', 'UTF-8');
Please login to merge, or discard this patch.