Passed
Pull Request — master (#105)
by Alexander
05:13
created
Classes/Controller/StatisticsController.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@
 block discarded – undo
34 34
         $countVolumes = $this->documentRepository->countAllVolumes($this->settings);
35 35
 
36 36
         // Set replacements.
37
-        $args['###TITLES###'] = $countTitles . ' ' . htmlspecialchars(
37
+        $args['###TITLES###'] = $countTitles.' '.htmlspecialchars(
38 38
             LocalizationUtility::translate(
39 39
                 ($countTitles > 1 ? 'titles' : 'title'), 'dlf'
40 40
             )
41 41
         );
42 42
 
43
-        $args['###VOLUMES###'] = $countVolumes . ' ' . htmlspecialchars(
43
+        $args['###VOLUMES###'] = $countVolumes.' '.htmlspecialchars(
44 44
             LocalizationUtility::translate(
45 45
                 ($countTitles > 1 ? 'volumes' : 'volume'), 'dlf'
46 46
             )
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,15 +21,13 @@
 block discarded – undo
21 21
  * @subpackage dlf
22 22
  * @access public
23 23
  */
24
-class StatisticsController extends AbstractController
25
-{
24
+class StatisticsController extends AbstractController {
26 25
     /**
27 26
      * The main method of the plugin
28 27
      *
29 28
      * @return void
30 29
      */
31
-    public function mainAction()
32
-    {
30
+    public function mainAction() {
33 31
         $countTitles = $this->documentRepository->countAllTitles($this->settings);
34 32
         $countVolumes = $this->documentRepository->countAllVolumes($this->settings);
35 33
 
Please login to merge, or discard this patch.
Classes/Controller/SearchController.php 3 patches
Upper-Lower-Casing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         $this->searchParams = $this->getParametersSafely('searchParameter');
78 78
 
79 79
         // output is done by main action
80
-        $this->forward('main', null, null, ['searchParameter' => $this->searchParams]);
80
+        $this->forward('main', NULL, NULL, ['searchParameter' => $this->searchParams]);
81 81
     }
82 82
 
83 83
     /**
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function mainAction()
91 91
     {
92
-        $listViewSearch = false;
92
+        $listViewSearch = FALSE;
93 93
         // Quit without doing anything if required variables are not set.
94 94
         if (empty($this->settings['solrcore'])) {
95 95
             $this->logger->warning('Incomplete plugin configuration');
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 
104 104
         if (isset($listRequestData['searchParameter']) && is_array($listRequestData['searchParameter'])) {
105 105
             $this->searchParams = array_merge($this->searchParams ? : [], $listRequestData['searchParameter']);
106
-            $listViewSearch = true;
106
+            $listViewSearch = TRUE;
107 107
         }
108 108
 
109 109
         // Pagination of Results: Pass the currentPage to the fluid template to calculate current index of search result.
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
         // If a targetPid is given, the results will be shown by ListView on the target page.
116 116
         if (!empty($this->settings['targetPid']) && !empty($this->searchParams) && !$listViewSearch) {
117
-            $this->redirect('main', 'ListView', null,
117
+            $this->redirect('main', 'ListView', NULL,
118 118
                 [
119 119
                     'searchParameter' => $this->searchParams,
120 120
                     'widgetPage' => $widgetPage
@@ -125,15 +125,15 @@  discard block
 block discarded – undo
125 125
         // If no search has been executed, no variables habe to be prepared. An empty form will be shown.
126 126
         if (is_array($this->searchParams) && !empty($this->searchParams)) {
127 127
             // get all sortable metadata records
128
-            $sortableMetadata = $this->metadataRepository->findByIsSortable(true);
128
+            $sortableMetadata = $this->metadataRepository->findByIsSortable(TRUE);
129 129
 
130 130
             // get all metadata records to be shown in results
131
-            $listedMetadata = $this->metadataRepository->findByIsListed(true);
131
+            $listedMetadata = $this->metadataRepository->findByIsListed(TRUE);
132 132
 
133 133
             $solrResults = [];
134 134
             // Do not execute the Solr search if used together with ListView plugin.
135 135
             if (!$listViewSearch) {
136
-                $solrResults = $this->documentRepository->findSolrByCollection(null, $this->settings, $this->searchParams, $listedMetadata);
136
+                $solrResults = $this->documentRepository->findSolrByCollection(NULL, $this->settings, $this->searchParams, $listedMetadata);
137 137
             }
138 138
 
139 139
             $documents = $solrResults['documents'] ? : [];
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 
182 182
         // Get facets from plugin configuration.
183 183
         $facets = [];
184
-        foreach (GeneralUtility::trimExplode(',', $this->settings['facets'], true) as $facet) {
184
+        foreach (GeneralUtility::trimExplode(',', $this->settings['facets'], TRUE) as $facet) {
185 185
             $facets[$facet . '_faceting'] = Helper::translate($facet, 'tx_dlf_metadata', $this->settings['storagePid']);
186 186
         }
187 187
 
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
         // Check if facet is already selected.
380 380
         $queryColumn = array_column($search['params']['filterquery'], 'query');
381 381
         $index = array_search($field . ':("' . Solr::escapeQuery($value) . '")', $queryColumn);
382
-        if ($index !== false) {
382
+        if ($index !== FALSE) {
383 383
             // Facet is selected, thus remove it from filter.
384 384
             unset($queryColumn[$index]);
385 385
             $queryColumn = array_values($queryColumn);
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
             $state = 'ACTIFSUB';
388 388
             // Reset facets
389 389
             if ($this->settings['resetFacets']) {
390
-                $entryArray['resetFacet'] = true;
390
+                $entryArray['resetFacet'] = TRUE;
391 391
                 $entryArray['queryColumn'] = $queryColumn;
392 392
             }
393 393
         } else {
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
         }
419 419
 
420 420
         // Get field selector options.
421
-        $searchFields = GeneralUtility::trimExplode(',', $this->settings['extendedFields'], true);
421
+        $searchFields = GeneralUtility::trimExplode(',', $this->settings['extendedFields'], TRUE);
422 422
 
423 423
         $slotCountArray = [];
424 424
         for ($i = 0; $i < $this->settings['extendedSlotCount']; $i++) {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 
162 162
         // Add uHash parameter to suggest parameter to make a basic protection of this form.
163 163
         if ($this->settings['suggest']) {
164
-            $this->view->assign('uHash', GeneralUtility::hmac((string) (new Typo3Version()) . Environment::getExtensionsPath(), 'SearchSuggest'));
164
+            $this->view->assign('uHash', GeneralUtility::hmac((string) (new Typo3Version()).Environment::getExtensionsPath(), 'SearchSuggest'));
165 165
         }
166 166
 
167 167
         $this->view->assign('viewData', $this->viewData);
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
         // Get facets from plugin configuration.
185 185
         $facets = [];
186 186
         foreach (GeneralUtility::trimExplode(',', $this->settings['facets'], true) as $facet) {
187
-            $facets[$facet . '_faceting'] = Helper::translate($facet, 'tx_dlf_metadata', $this->settings['storagePid']);
187
+            $facets[$facet.'_faceting'] = Helper::translate($facet, 'tx_dlf_metadata', $this->settings['storagePid']);
188 188
         }
189 189
 
190 190
         $this->view->assign('facetsMenu', $this->makeFacetsMenuArray($facets));
@@ -226,13 +226,13 @@  discard block
 block discarded – undo
226 226
         $searchParams = $this->searchParams;
227 227
         if (
228 228
             (!empty($searchParams['fulltext']))
229
-            || preg_match('/' . $fields['fulltext'] . ':\((.*)\)/', trim($searchParams['query']), $matches)
229
+            || preg_match('/'.$fields['fulltext'].':\((.*)\)/', trim($searchParams['query']), $matches)
230 230
         ) {
231 231
             // If the query already is a fulltext query e.g using the facets
232 232
             $searchParams['query'] = empty($matches[1]) ? $searchParams['query'] : $matches[1];
233 233
             // Search in fulltext field if applicable. Query must not be empty!
234 234
             if (!empty($this->searchParams['query'])) {
235
-                $search['query'] = $fields['fulltext'] . ':(' . Solr::escapeQuery(trim($searchParams['query'])) . ')';
235
+                $search['query'] = $fields['fulltext'].':('.Solr::escapeQuery(trim($searchParams['query'])).')';
236 236
             }
237 237
         } else {
238 238
             // Retain given search field if valid.
@@ -256,9 +256,9 @@  discard block
 block discarded – undo
256 256
                         in_array($searchParams['extOperator'][$i], $allowedOperators)
257 257
                     ) {
258 258
                         if (!empty($search['query'])) {
259
-                            $search['query'] .= ' ' . $searchParams['extOperator'][$i] . ' ';
259
+                            $search['query'] .= ' '.$searchParams['extOperator'][$i].' ';
260 260
                         }
261
-                        $search['query'] .= Indexer::getIndexFieldName($searchParams['extField'][$i], $this->settings['storagePid']) . ':(' . Solr::escapeQuery($searchParams['extQuery'][$i]) . ')';
261
+                        $search['query'] .= Indexer::getIndexFieldName($searchParams['extField'][$i], $this->settings['storagePid']).':('.Solr::escapeQuery($searchParams['extQuery'][$i]).')';
262 262
                     }
263 263
                 }
264 264
             }
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
         $entryArray['doNotLinkIt'] = 0;
384 384
         // Check if facet is already selected.
385 385
         $queryColumn = array_column($search['params']['filterquery'], 'query');
386
-        $index = array_search($field . ':("' . Solr::escapeQuery($value) . '")', $queryColumn);
386
+        $index = array_search($field.':("'.Solr::escapeQuery($value).'")', $queryColumn);
387 387
         if ($index !== false) {
388 388
             // Facet is selected, thus remove it from filter.
389 389
             unset($queryColumn[$index]);
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
             }
398 398
         } else {
399 399
             // Facet is not selected, thus add it to filter.
400
-            $queryColumn[] = $field . ':("' . Solr::escapeQuery($value) . '")';
400
+            $queryColumn[] = $field.':("'.Solr::escapeQuery($value).'")';
401 401
             $entryArray['ITEM_STATE'] = 'NO';
402 402
         }
403 403
         $entryArray['queryColumn'] = $queryColumn;
Please login to merge, or discard this 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.
Classes/Controller/CollectionController.php 3 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -96,14 +96,14 @@
 block discarded – undo
96 96
         foreach ($collections as $collection) {
97 97
             $solr_query = '';
98 98
             if ($collection->getIndexSearch() != '') {
99
-                $solr_query .= '(' . $collection->getIndexSearch() . ')';
99
+                $solr_query .= '('.$collection->getIndexSearch().')';
100 100
             } else {
101
-                $solr_query .= 'collection:("' . Solr::escapeQuery($collection->getIndexName()) . '")';
101
+                $solr_query .= 'collection:("'.Solr::escapeQuery($collection->getIndexName()).'")';
102 102
             }
103
-            $params['query'] = $solr_query . ' AND partof:0 AND toplevel:true';
103
+            $params['query'] = $solr_query.' AND partof:0 AND toplevel:true';
104 104
             $partOfNothing = $solr->search_raw($params);
105 105
 
106
-            $params['query'] = $solr_query . ' AND NOT partof:0 AND toplevel:true';
106
+            $params['query'] = $solr_query.' AND NOT partof:0 AND toplevel:true';
107 107
             $partOfSomething = $solr->search_raw($params);
108 108
             // Titles are all documents that are "root" elements i.e. partof == 0
109 109
             $collectionInfo['titles'] = [];
Please login to merge, or discard this patch.
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
  * @subpackage dlf
30 30
  * @access public
31 31
  */
32
-class CollectionController extends AbstractController
33
-{
32
+class CollectionController extends AbstractController {
34 33
     /**
35 34
      * @var CollectionRepository
36 35
      */
@@ -39,8 +38,7 @@  discard block
 block discarded – undo
39 38
     /**
40 39
      * @param CollectionRepository $collectionRepository
41 40
      */
42
-    public function injectCollectionRepository(CollectionRepository $collectionRepository)
43
-    {
41
+    public function injectCollectionRepository(CollectionRepository $collectionRepository) {
44 42
         $this->collectionRepository = $collectionRepository;
45 43
     }
46 44
 
@@ -52,8 +50,7 @@  discard block
 block discarded – undo
52 50
     /**
53 51
      * @param MetadataRepository $metadataRepository
54 52
      */
55
-    public function injectMetadataRepository(MetadataRepository $metadataRepository)
56
-    {
53
+    public function injectMetadataRepository(MetadataRepository $metadataRepository) {
57 54
         $this->metadataRepository = $metadataRepository;
58 55
     }
59 56
 
@@ -62,8 +59,7 @@  discard block
 block discarded – undo
62 59
      *
63 60
      * @return void
64 61
      */
65
-    public function listAction()
66
-    {
62
+    public function listAction() {
67 63
         $solr = Solr::getInstance($this->settings['solrcore']);
68 64
 
69 65
         if (!$solr->ready) {
@@ -146,8 +142,7 @@  discard block
 block discarded – undo
146 142
      *
147 143
      * @return void
148 144
      */
149
-    public function showAction(\Kitodo\Dlf\Domain\Model\Collection $collection)
150
-    {
145
+    public function showAction(\Kitodo\Dlf\Domain\Model\Collection $collection) {
151 146
         $searchParams = $this->getParametersSafely('searchParameter');
152 147
 
153 148
         // Instaniate the Solr. Without Solr present, we can't do anything.
@@ -199,8 +194,7 @@  discard block
 block discarded – undo
199 194
      *
200 195
      * @return void
201 196
      */
202
-    public function showSortedAction()
203
-    {
197
+    public function showSortedAction() {
204 198
         // if search was triggered, get search parameters from POST variables
205 199
         $searchParams = $this->getParametersSafely('searchParameter');
206 200
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         }
88 88
 
89 89
         if (count($collections) == 1 && empty($this->settings['dont_show_single']) && is_array($collections)) {
90
-            $this->forward('show', null, null, ['collection' => array_pop($collections)]);
90
+            $this->forward('show', NULL, NULL, ['collection' => array_pop($collections)]);
91 91
         }
92 92
 
93 93
         $processedCollections = [];
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
         $searchParams['collection'] = $collection;
167 167
         // If a targetPid is given, the results will be shown by ListView on the target page.
168 168
         if (!empty($this->settings['targetPid'])) {
169
-            $this->redirect('main', 'ListView', null,
169
+            $this->redirect('main', 'ListView', NULL,
170 170
                 [
171 171
                     'searchParameter' => $searchParams,
172 172
                     'widgetPage' => $widgetPage
@@ -175,10 +175,10 @@  discard block
 block discarded – undo
175 175
         }
176 176
 
177 177
         // get all metadata records to be shown in results
178
-        $listedMetadata = $this->metadataRepository->findByIsListed(true);
178
+        $listedMetadata = $this->metadataRepository->findByIsListed(TRUE);
179 179
 
180 180
         // get all sortable metadata records
181
-        $sortableMetadata = $this->metadataRepository->findByIsSortable(true);
181
+        $sortableMetadata = $this->metadataRepository->findByIsSortable(TRUE);
182 182
 
183 183
         // get all documents of given collection
184 184
         $documents = $this->documentRepository->findSolrByCollection($collection, $this->settings, $searchParams, $listedMetadata);
@@ -204,13 +204,13 @@  discard block
 block discarded – undo
204 204
         // if search was triggered, get search parameters from POST variables
205 205
         $searchParams = $this->getParametersSafely('searchParameter');
206 206
 
207
-        $collection = null;
207
+        $collection = NULL;
208 208
         if ($searchParams['collection']['__identity'] && MathUtility::canBeInterpretedAsInteger($searchParams['collection']['__identity'])) {
209 209
             $collection = $this->collectionRepository->findByUid($searchParams['collection']['__identity']);
210 210
         }
211 211
 
212 212
         // output is done by show action
213
-        $this->forward('show', null, null, ['searchParameter' => $searchParams, 'collection' => $collection]);
213
+        $this->forward('show', NULL, NULL, ['searchParameter' => $searchParams, 'collection' => $collection]);
214 214
 
215 215
     }
216 216
 }
Please login to merge, or discard this patch.
Classes/Controller/AudioPlayerController.php 3 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,12 +52,12 @@
 block discarded – undo
52 52
             $(document).ready(function() {
53 53
                 AudioPlayer = new dlfAudioPlayer({
54 54
                     audio: {
55
-                        mimeType: "' . $this->audio['mimetype'] . '",
56
-                        title: "' . $this->audio['label'] . '",
57
-                        url:  "' . $this->audio['url'] . '"
55
+                        mimeType: "' . $this->audio['mimetype'].'",
56
+                        title: "' . $this->audio['label'].'",
57
+                        url:  "' . $this->audio['url'].'"
58 58
                     },
59 59
                     parentElId: "tx-dlf-audio",
60
-                    swfPath: "' . PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath('dlf')) . 'Resources/Public/Javascript/jPlayer/jquery.jplayer.swf"
60
+                    swfPath: "' . PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath('dlf')).'Resources/Public/Javascript/jPlayer/jquery.jplayer.swf"
61 61
                 });
62 62
             });
63 63
         ';
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@  discard block
 block discarded – undo
25 25
  * @subpackage dlf
26 26
  * @access public
27 27
  */
28
-class AudioplayerController extends AbstractController
29
-{
28
+class AudioplayerController extends AbstractController {
30 29
     /**
31 30
      * Holds the current audio file's URL, MIME type and optional label
32 31
      *
@@ -42,8 +41,7 @@  discard block
 block discarded – undo
42 41
      *
43 42
      * @return void
44 43
      */
45
-    protected function addPlayerJS()
46
-    {
44
+    protected function addPlayerJS() {
47 45
         // Inline CSS.
48 46
         $inlineCSS = '#tx-dlf-audio { width: 100px; height: 100px; }';
49 47
 
@@ -72,8 +70,7 @@  discard block
 block discarded – undo
72 70
      *
73 71
      * @return void
74 72
      */
75
-    public function mainAction()
76
-    {
73
+    public function mainAction() {
77 74
         // Load current document.
78 75
         $this->loadDocument($this->requestData);
79 76
         if (
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,8 +77,8 @@
 block discarded – undo
77 77
         // Load current document.
78 78
         $this->loadDocument($this->requestData);
79 79
         if (
80
-            $this->document === null
81
-            || $this->document->getDoc() === null
80
+            $this->document === NULL
81
+            || $this->document->getDoc() === NULL
82 82
             || $this->document->getDoc()->numPages < 1
83 83
         ) {
84 84
             // Quit without doing anything if required variables are not set.
Please login to merge, or discard this patch.
Classes/Controller/MetadataController.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
             array_unshift($metadata, $data);
156 156
         }
157 157
         if (empty($metadata)) {
158
-            $this->logger->warning('No metadata found for document with UID ' . $this->document->getUid());
158
+            $this->logger->warning('No metadata found for document with UID '.$this->document->getUid());
159 159
             return '';
160 160
         }
161 161
         ksort($metadata);
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
                         if (empty($metadataValue) && $this->settings['getTitle'] && $this->document->getDoc()->parentId) {
256 256
                             $superiorTitle = Doc::getTitle($this->document->getPartof(), true);
257 257
                             if (!empty($superiorTitle)) {
258
-                                $metadataArray[$i][$metadataName] = ['[' . $superiorTitle . ']'];
258
+                                $metadataArray[$i][$metadataName] = ['['.$superiorTitle.']'];
259 259
                             }
260 260
                         }
261 261
                         if (!empty($metadataValue)) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
         // Load current document.
81 81
         $this->loadDocument($this->requestData);
82 82
         if (
83
-            $this->document === null
84
-            || $this->document->getDoc() === null
83
+            $this->document === NULL
84
+            || $this->document->getDoc() === NULL
85 85
         ) {
86 86
             // Quit without doing anything if required variables are not set.
87 87
             return '';
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
      *
181 181
      * @return string The metadata array ready for output
182 182
      */
183
-    protected function printMetadata(array $metadataArray, $useOriginalIiifManifestMetadata = false)
183
+    protected function printMetadata(array $metadataArray, $useOriginalIiifManifestMetadata = FALSE)
184 184
     {
185 185
         if ($useOriginalIiifManifestMetadata) {
186 186
             $iiifData = [];
@@ -198,14 +198,14 @@  discard block
 block discarded – undo
198 198
                             $iiifData[$key] = [
199 199
                                 'label' => $key,
200 200
                                 'value' => $group,
201
-                                'buildUrl' => true,
201
+                                'buildUrl' => TRUE,
202 202
                             ];
203 203
                         } else {
204 204
                             // Data output
205 205
                             $iiifData[$key] = [
206 206
                                 'label' => $key,
207 207
                                 'value' => $group,
208
-                                'buildUrl' => false,
208
+                                'buildUrl' => FALSE,
209 209
                             ];
210 210
                         }
211 211
                     } else {
@@ -222,18 +222,18 @@  discard block
 block discarded – undo
222 222
                                 $iiifData[$key]['data'][] = [
223 223
                                     'label' => $nolabel ? '' : $label,
224 224
                                     'value' => $value,
225
-                                    'buildUrl' => true,
225
+                                    'buildUrl' => TRUE,
226 226
                                 ];
227 227
                             } else {
228 228
                                 $iiifData[$key]['data'][] = [
229 229
                                     'label' => $label,
230 230
                                     'value' => $value,
231
-                                    'buildUrl' => false,
231
+                                    'buildUrl' => FALSE,
232 232
                                 ];
233 233
                             }
234 234
                         }
235 235
                     }
236
-                    $this->view->assign('useIiif', true);
236
+                    $this->view->assign('useIiif', TRUE);
237 237
                     $this->view->assign('iiifData', $iiifData);
238 238
                 }
239 239
             }
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
                     if ($metadataName == 'title') {
254 254
                         // Get title of parent document if needed.
255 255
                         if (empty($metadataValue) && $this->settings['getTitle'] && $this->document->getDoc()->parentId) {
256
-                            $superiorTitle = Doc::getTitle($this->document->getPartof(), true);
256
+                            $superiorTitle = Doc::getTitle($this->document->getPartof(), TRUE);
257 257
                             if (!empty($superiorTitle)) {
258 258
                                 $metadataArray[$i][$metadataName] = ['[' . $superiorTitle . ']'];
259 259
                             }
Please login to merge, or discard this patch.
Braces   +9 added lines, -18 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
  * @subpackage dlf
30 30
  * @access public
31 31
  */
32
-class MetadataController extends AbstractController
33
-{
32
+class MetadataController extends AbstractController {
34 33
     /**
35 34
      * @var CollectionRepository
36 35
      */
@@ -39,8 +38,7 @@  discard block
 block discarded – undo
39 38
     /**
40 39
      * @param CollectionRepository $collectionRepository
41 40
      */
42
-    public function injectCollectionRepository(CollectionRepository $collectionRepository)
43
-    {
41
+    public function injectCollectionRepository(CollectionRepository $collectionRepository) {
44 42
         $this->collectionRepository = $collectionRepository;
45 43
     }
46 44
 
@@ -52,8 +50,7 @@  discard block
 block discarded – undo
52 50
     /**
53 51
      * @param MetadataRepository $metadataRepository
54 52
      */
55
-    public function injectMetadataRepository(MetadataRepository $metadataRepository)
56
-    {
53
+    public function injectMetadataRepository(MetadataRepository $metadataRepository) {
57 54
         $this->metadataRepository = $metadataRepository;
58 55
     }
59 56
 
@@ -65,16 +62,14 @@  discard block
 block discarded – undo
65 62
     /**
66 63
      * @param StructureRepository $structureRepository
67 64
      */
68
-    public function injectStructureRepository(StructureRepository $structureRepository)
69
-    {
65
+    public function injectStructureRepository(StructureRepository $structureRepository) {
70 66
         $this->structureRepository = $structureRepository;
71 67
     }
72 68
 
73 69
     /**
74 70
      * @return string|void
75 71
      */
76
-    public function mainAction()
77
-    {
72
+    public function mainAction() {
78 73
         $this->cObj = $this->configurationManager->getContentObject();
79 74
 
80 75
         // Load current document.
@@ -130,8 +125,7 @@  discard block
 block discarded – undo
130 125
      *
131 126
      * @return string The metadata array ready for output
132 127
      */
133
-    protected function printMetadata(array $metadataArray, $useOriginalIiifManifestMetadata = false)
134
-    {
128
+    protected function printMetadata(array $metadataArray, $useOriginalIiifManifestMetadata = false) {
135 129
         if ($useOriginalIiifManifestMetadata) {
136 130
             $iiifData = [];
137 131
             foreach ($metadataArray as $metadata) {
@@ -250,8 +244,7 @@  discard block
 block discarded – undo
250 244
                     }
251 245
 
252 246
                     if (is_array($metadataArray[$i][$metadataName])) {
253
-                        $metadataArray[$i][$metadataName] = array_values(array_filter($metadataArray[$i][$metadataName], function($value)
254
-                        {
247
+                        $metadataArray[$i][$metadataName] = array_values(array_filter($metadataArray[$i][$metadataName], function($value) {
255 248
                             return !empty($value);
256 249
                         }));
257 250
                     }
@@ -273,8 +266,7 @@  discard block
 block discarded – undo
273 266
      *
274 267
      * @return array metadata
275 268
      */
276
-    private function getMetadata()
277
-    {
269
+    private function getMetadata() {
278 270
         $metadata = [];
279 271
         if ($this->settings['rootline'] < 2) {
280 272
             // Get current structure's @ID.
@@ -312,8 +304,7 @@  discard block
 block discarded – undo
312 304
      *
313 305
      * @return array metadata
314 306
      */
315
-    private function getMetadataForIds($id, $metadata)
316
-    {
307
+    private function getMetadataForIds($id, $metadata) {
317 308
         $useOriginalIiifManifestMetadata = $this->settings['originalIiifMetadata'] == 1 && $this->document->getDoc() instanceof IiifManifest;
318 309
         foreach ($id as $sid) {
319 310
             if ($useOriginalIiifManifestMetadata) {
Please login to merge, or discard this patch.
Classes/Controller/ListViewController.php 2 patches
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
  * @subpackage dlf
30 30
  * @access public
31 31
  */
32
-class ListViewController extends AbstractController
33
-{
32
+class ListViewController extends AbstractController {
34 33
     /**
35 34
      * @var CollectionRepository
36 35
      */
@@ -39,8 +38,7 @@  discard block
 block discarded – undo
39 38
     /**
40 39
      * @param CollectionRepository $collectionRepository
41 40
      */
42
-    public function injectCollectionRepository(CollectionRepository $collectionRepository)
43
-    {
41
+    public function injectCollectionRepository(CollectionRepository $collectionRepository) {
44 42
         $this->collectionRepository = $collectionRepository;
45 43
     }
46 44
 
@@ -52,8 +50,7 @@  discard block
 block discarded – undo
52 50
     /**
53 51
      * @param MetadataRepository $metadataRepository
54 52
      */
55
-    public function injectMetadataRepository(MetadataRepository $metadataRepository)
56
-    {
53
+    public function injectMetadataRepository(MetadataRepository $metadataRepository) {
57 54
         $this->metadataRepository = $metadataRepository;
58 55
     }
59 56
 
@@ -68,8 +65,7 @@  discard block
 block discarded – undo
68 65
      *
69 66
      * @return void
70 67
      */
71
-    public function mainAction()
72
-    {
68
+    public function mainAction() {
73 69
         $this->searchParams = $this->getParametersSafely('searchParameter');
74 70
 
75 71
         $collection = null;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     {
73 73
         $this->searchParams = $this->getParametersSafely('searchParameter');
74 74
 
75
-        $collection = null;
75
+        $collection = NULL;
76 76
         if ($this->searchParams['collection'] && MathUtility::canBeInterpretedAsInteger($this->searchParams['collection'])) {
77 77
             $collection = $this->collectionRepository->findByUid($this->searchParams['collection']);
78 78
         }
@@ -83,14 +83,14 @@  discard block
 block discarded – undo
83 83
         }
84 84
 
85 85
         // get all sortable metadata records
86
-        $sortableMetadata = $this->metadataRepository->findByIsSortable(true);
86
+        $sortableMetadata = $this->metadataRepository->findByIsSortable(TRUE);
87 87
 
88 88
         // get all metadata records to be shown in results
89
-        $listedMetadata = $this->metadataRepository->findByIsListed(true);
89
+        $listedMetadata = $this->metadataRepository->findByIsListed(TRUE);
90 90
 
91 91
         $solrResults = [];
92 92
         if (is_array($this->searchParams) && !empty($this->searchParams)) {
93
-            $solrResults = $this->documentRepository->findSolrByCollection($collection ? : null, $this->settings, $this->searchParams, $listedMetadata);
93
+            $solrResults = $this->documentRepository->findSolrByCollection($collection ? : NULL, $this->settings, $this->searchParams, $listedMetadata);
94 94
         }
95 95
 
96 96
         $this->view->assign('viewData', $this->viewData);
Please login to merge, or discard this patch.
Classes/Controller/PageGridController.php 2 patches
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,15 +22,13 @@  discard block
 block discarded – undo
22 22
  * @subpackage dlf
23 23
  * @access public
24 24
  */
25
-class PageGridController extends AbstractController
26
-{
25
+class PageGridController extends AbstractController {
27 26
     /**
28 27
      * The main method of the plugin
29 28
      *
30 29
      * @return void
31 30
      */
32
-    public function mainAction()
33
-    {
31
+    public function mainAction() {
34 32
         $this->loadDocument($this->requestData);
35 33
         if (
36 34
             $this->document === null
@@ -65,8 +63,7 @@  discard block
 block discarded – undo
65 63
      *
66 64
      * @return array The rendered entry ready for fluid
67 65
      */
68
-    protected function getEntry($number, $fileGrpThumbs)
69
-    {
66
+    protected function getEntry($number, $fileGrpThumbs) {
70 67
         // Set pagination.
71 68
         $entry['pagination'] = htmlspecialchars($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$number]]['orderlabel']);
72 69
         $entry['page'] = $number;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     {
34 34
         $this->loadDocument($this->requestData);
35 35
         if (
36
-            $this->document === null
36
+            $this->document === NULL
37 37
             || $this->document->getDoc()->numPages < 1
38 38
             || empty($this->extConf['fileGrpThumbs'])
39 39
         ) {
Please login to merge, or discard this patch.
Classes/Controller/ToolboxController.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
                 $image['mimetypeLabel'] = $mimetypeLabel;
254 254
                 break;
255 255
             } else {
256
-                $this->logger->warning('File not found in fileGrp "' . $fileGrp . '"');
256
+                $this->logger->warning('File not found in fileGrp "'.$fileGrp.'"');
257 257
             }
258 258
         }
259 259
         return $image;
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
             empty($page1Link)
345 345
             && empty($page2Link)
346 346
         ) {
347
-            $this->logger->warning('File not found in fileGrps "' . $this->extConf['fileGrpDownload'] . '"');
347
+            $this->logger->warning('File not found in fileGrps "'.$this->extConf['fileGrpDownload'].'"');
348 348
         }
349 349
 
350 350
         if (!empty($page1Link)) {
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
         if (!empty($workLink)) {
384 384
             $workLink = $workLink;
385 385
         } else {
386
-            $this->logger->warning('File not found in fileGrps "' . $this->extConf['fileGrpDownload'] . '"');
386
+            $this->logger->warning('File not found in fileGrps "'.$this->extConf['fileGrpDownload'].'"');
387 387
         }
388 388
         return $workLink;
389 389
     }
Please login to merge, or discard this patch.
Braces   +14 added lines, -28 removed lines patch added patch discarded remove patch
@@ -23,15 +23,13 @@  discard block
 block discarded – undo
23 23
  * @subpackage dlf
24 24
  * @access public
25 25
  */
26
-class ToolboxController extends AbstractController
27
-{
26
+class ToolboxController extends AbstractController {
28 27
     /**
29 28
      * The main method of the plugin
30 29
      *
31 30
      * @return void
32 31
      */
33
-    public function mainAction()
34
-    {
32
+    public function mainAction() {
35 33
         // Load current document.
36 34
         $this->loadDocument($this->requestData);
37 35
 
@@ -52,8 +50,7 @@  discard block
 block discarded – undo
52 50
      *
53 51
      * @return void
54 52
      */
55
-    public function annotationtool()
56
-    {
53
+    public function annotationtool() {
57 54
         if (
58 55
             $this->document === null
59 56
             || $this->document->getDoc()->numPages < 1
@@ -94,8 +91,7 @@  discard block
 block discarded – undo
94 91
      *
95 92
      * @return void
96 93
      */
97
-    public function fulltextdownloadtool()
98
-    {
94
+    public function fulltextdownloadtool() {
99 95
         if (
100 96
             $this->document === null
101 97
             || $this->document->getDoc()->numPages < 1
@@ -140,8 +136,7 @@  discard block
 block discarded – undo
140 136
      *
141 137
      * @return void
142 138
      */
143
-    public function fulltexttool()
144
-    {
139
+    public function fulltexttool() {
145 140
         if (
146 141
             $this->document === null
147 142
             || $this->document->getDoc()->numPages < 1
@@ -186,8 +181,7 @@  discard block
 block discarded – undo
186 181
      *
187 182
      * @return void
188 183
      */
189
-    public function imagedownloadtool()
190
-    {
184
+    public function imagedownloadtool() {
191 185
         if (
192 186
             $this->document === null
193 187
             || $this->document->getDoc()->numPages < 1
@@ -230,8 +224,7 @@  discard block
 block discarded – undo
230 224
      *
231 225
      * @return array Array of image links and image format information
232 226
      */
233
-    protected function getImage($page)
234
-    {
227
+    protected function getImage($page) {
235 228
         $image = [];
236 229
         // Get @USE value of METS fileGrp.
237 230
         $fileGrps = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $this->settings['fileGrpsImageDownload']);
@@ -264,8 +257,7 @@  discard block
 block discarded – undo
264 257
      *
265 258
      * @return void
266 259
      */
267
-    public function imagemanipulationtool()
268
-    {
260
+    public function imagemanipulationtool() {
269 261
         // Set parent element for initialization.
270 262
         $parentContainer = !empty($this->settings['parentContainer']) ? $this->settings['parentContainer'] : '.tx-dlf-imagemanipulationtool';
271 263
 
@@ -278,8 +270,7 @@  discard block
 block discarded – undo
278 270
      *
279 271
      * @return void
280 272
      */
281
-    public function pdfdownloadtool()
282
-    {
273
+    public function pdfdownloadtool() {
283 274
         if (
284 275
             $this->document === null
285 276
             || $this->document->getDoc() === null
@@ -318,8 +309,7 @@  discard block
 block discarded – undo
318 309
      *
319 310
      * @return array Link to downloadable page
320 311
      */
321
-    protected function getPageLink()
322
-    {
312
+    protected function getPageLink() {
323 313
         $page1Link = '';
324 314
         $page2Link = '';
325 315
         $pageLinkArray = [];
@@ -363,8 +353,7 @@  discard block
 block discarded – undo
363 353
      *
364 354
      * @return string Link to downloadable work
365 355
      */
366
-    protected function getWorkLink()
367
-    {
356
+    protected function getWorkLink() {
368 357
         $workLink = '';
369 358
         $fileGrpsDownload = GeneralUtility::trimExplode(',', $this->extConf['fileGrpDownload']);
370 359
         // Get work link.
@@ -393,8 +382,7 @@  discard block
 block discarded – undo
393 382
      *
394 383
      * @return void
395 384
      */
396
-    public function searchindocumenttool()
397
-    {
385
+    public function searchindocumenttool() {
398 386
         if (
399 387
             $this->document === null
400 388
             || $this->document->getDoc()->numPages < 1
@@ -457,8 +445,7 @@  discard block
 block discarded – undo
457 445
      *
458 446
      * @return string with current document id
459 447
      */
460
-    protected function getCurrentDocumentId()
461
-    {
448
+    protected function getCurrentDocumentId() {
462 449
         $id = $this->document->getUid();
463 450
 
464 451
         if ($id !== null && $id > 0) {
@@ -493,8 +480,7 @@  discard block
 block discarded – undo
493 480
      *
494 481
      * @return string with encrypted core name
495 482
      */
496
-    protected function getEncryptedCoreName()
497
-    {
483
+    protected function getEncryptedCoreName() {
498 484
         // Get core name.
499 485
         $name = Helper::getIndexNameFromUid($this->settings['solrcore'], 'tx_dlf_solrcores');
500 486
         // Encrypt core name.
Please login to merge, or discard this patch.
Upper-Lower-Casing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         foreach ($tools as $tool) {
44 44
             $tool = trim(str_replace('tx_dlf_', '', $tool));
45 45
             $this->$tool();
46
-            $this->view->assign($tool, true);
46
+            $this->view->assign($tool, TRUE);
47 47
         }
48 48
     }
49 49
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     public function annotationtool()
56 56
     {
57 57
         if (
58
-            $this->document === null
58
+            $this->document === NULL
59 59
             || $this->document->getDoc()->numPages < 1
60 60
         ) {
61 61
             // Quit without doing anything if required variables are not set.
@@ -80,12 +80,12 @@  discard block
 block discarded – undo
80 80
 
81 81
         $annotationContainers = $this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$this->requestData['page']]]['annotationContainers'];
82 82
         if (
83
-            $annotationContainers != null
83
+            $annotationContainers != NULL
84 84
             && sizeof($annotationContainers) > 0
85 85
         ) {
86
-            $this->view->assign('annotationTool', true);
86
+            $this->view->assign('annotationTool', TRUE);
87 87
         } else {
88
-            $this->view->assign('annotationTool', false);
88
+            $this->view->assign('annotationTool', FALSE);
89 89
         }
90 90
     }
91 91
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     public function fulltextdownloadtool()
98 98
     {
99 99
         if (
100
-            $this->document === null
100
+            $this->document === NULL
101 101
             || $this->document->getDoc()->numPages < 1
102 102
             || empty($this->extConf['fileGrpFulltext'])
103 103
         ) {
@@ -129,9 +129,9 @@  discard block
 block discarded – undo
129 129
             }
130 130
         }
131 131
         if (!empty($fullTextFile)) {
132
-            $this->view->assign('fulltextDownload', true);
132
+            $this->view->assign('fulltextDownload', TRUE);
133 133
         } else {
134
-            $this->view->assign('fulltextDownload', false);
134
+            $this->view->assign('fulltextDownload', FALSE);
135 135
         }
136 136
     }
137 137
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     public function fulltexttool()
144 144
     {
145 145
         if (
146
-            $this->document === null
146
+            $this->document === NULL
147 147
             || $this->document->getDoc()->numPages < 1
148 148
             || empty($this->extConf['fileGrpFulltext'])
149 149
         ) {
@@ -174,10 +174,10 @@  discard block
 block discarded – undo
174 174
             }
175 175
         }
176 176
         if (!empty($fullTextFile)) {
177
-            $this->view->assign('fulltext', true);
177
+            $this->view->assign('fulltext', TRUE);
178 178
             $this->view->assign('activateFullTextInitially', MathUtility::forceIntegerInRange($this->settings['activateFullTextInitially'], 0, 1, 0));
179 179
         } else {
180
-            $this->view->assign('fulltext', false);
180
+            $this->view->assign('fulltext', FALSE);
181 181
         }
182 182
     }
183 183
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     public function imagedownloadtool()
190 190
     {
191 191
         if (
192
-            $this->document === null
192
+            $this->document === NULL
193 193
             || $this->document->getDoc()->numPages < 1
194 194
             || empty($this->settings['fileGrpsImageDownload'])
195 195
         ) {
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
         // Set parent element for initialization.
270 270
         $parentContainer = !empty($this->settings['parentContainer']) ? $this->settings['parentContainer'] : '.tx-dlf-imagemanipulationtool';
271 271
 
272
-        $this->view->assign('imageManipulation', true);
272
+        $this->view->assign('imageManipulation', TRUE);
273 273
         $this->view->assign('parentContainer', $parentContainer);
274 274
     }
275 275
 
@@ -281,8 +281,8 @@  discard block
 block discarded – undo
281 281
     public function pdfdownloadtool()
282 282
     {
283 283
         if (
284
-            $this->document === null
285
-            || $this->document->getDoc() === null
284
+            $this->document === NULL
285
+            || $this->document->getDoc() === NULL
286 286
             || $this->document->getDoc()->numPages < 1
287 287
             || empty($this->extConf['fileGrpDownload'])
288 288
         ) {
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
     public function searchindocumenttool()
397 397
     {
398 398
         if (
399
-            $this->document === null
399
+            $this->document === NULL
400 400
             || $this->document->getDoc()->numPages < 1
401 401
             || empty($this->extConf['fileGrpFulltext'])
402 402
             || empty($this->settings['solrcore'])
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
     {
462 462
         $id = $this->document->getUid();
463 463
 
464
-        if ($id !== null && $id > 0) {
464
+        if ($id !== NULL && $id > 0) {
465 465
             // we found the document uid
466 466
             return (string) $id;
467 467
         } else {
Please login to merge, or discard this patch.
Classes/Controller/NavigationController.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
 
75 75
         $pageOptions = [];
76 76
         for ($i = 1; $i <= $this->document->getDoc()->numPages; $i++) {
77
-            $pageOptions[$i] = '[' . $i . ']' . ($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$i]]['orderlabel'] ? ' - ' . htmlspecialchars($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$i]]['orderlabel']) : '');
77
+            $pageOptions[$i] = '['.$i.']'.($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$i]]['orderlabel'] ? ' - '.htmlspecialchars($this->document->getDoc()->physicalStructureInfo[$this->document->getDoc()->physicalStructure[$i]]['orderlabel']) : '');
78 78
         }
79 79
         $this->view->assign('pageOptions', $pageOptions);
80 80
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,15 +23,13 @@
 block discarded – undo
23 23
  * @subpackage dlf
24 24
  * @access public
25 25
  */
26
-class NavigationController extends AbstractController
27
-{
26
+class NavigationController extends AbstractController {
28 27
     /**
29 28
      * The main method of the plugin
30 29
      *
31 30
      * @return void
32 31
      */
33
-    public function mainAction()
34
-    {
32
+    public function mainAction() {
35 33
         // Load current document.
36 34
         $this->loadDocument($this->requestData);
37 35
         if (
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,8 +35,8 @@  discard block
 block discarded – undo
35 35
         // Load current document.
36 36
         $this->loadDocument($this->requestData);
37 37
         if (
38
-            $this->document === null
39
-            || $this->document->getDoc() === null
38
+            $this->document === NULL
39
+            || $this->document->getDoc() === NULL
40 40
         ) {
41 41
             // Quit without doing anything if required variables are not set.
42 42
             return;
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         // prepare feature array for fluid
82 82
         $features = [];
83 83
         foreach (explode(',', $this->settings['features']) as $feature) {
84
-            $features[$feature] = true;
84
+            $features[$feature] = TRUE;
85 85
         }
86 86
         $this->view->assign('features', $features);
87 87
     }
Please login to merge, or discard this patch.