Passed
Push — master ( bfdcd2...e2d2d8 )
by
unknown
03:23
created
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.
Classes/Controller/TableOfContentsController.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@
 block discarded – undo
140 140
                 }
141 141
             }
142 142
             // Append "IFSUB" to "ITEM_STATE" if this entry has sub-entries.
143
-            $entryArray['ITEM_STATE'] = ($entryArray['ITEM_STATE'] == 'NO' ? 'IFSUB' : $entryArray['ITEM_STATE'] . 'IFSUB');
143
+            $entryArray['ITEM_STATE'] = ($entryArray['ITEM_STATE'] == 'NO' ? 'IFSUB' : $entryArray['ITEM_STATE'].'IFSUB');
144 144
         }
145 145
         return $entryArray;
146 146
     }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      *
61 61
      * @return array HMENU array for menu entry
62 62
      */
63
-    protected function getMenuEntry(array $entry, $recursive = false)
63
+    protected function getMenuEntry(array $entry, $recursive = FALSE)
64 64
     {
65 65
         $entryArray = [];
66 66
         // Set "title", "volume", "type" and "pagination" from $entry array.
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         }
117 117
         // Build sub-menu if available and called recursively.
118 118
         if (
119
-            $recursive === true
119
+            $recursive === TRUE
120 120
             && !empty($entry['children'])
121 121
         ) {
122 122
             // Build sub-menu only if one of the following conditions apply:
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
                     if (in_array($child['id'], $this->activeEntries)) {
137 137
                         $entryArray['ITEM_STATE'] = 'ACT';
138 138
                     }
139
-                    $entryArray['_SUB_MENU'][] = $this->getMenuEntry($child, true);
139
+                    $entryArray['_SUB_MENU'][] = $this->getMenuEntry($child, TRUE);
140 140
                 }
141 141
             }
142 142
             // Append "IFSUB" to "ITEM_STATE" if this entry has sub-entries.
@@ -171,8 +171,8 @@  discard block
 block discarded – undo
171 171
         // Load current document.
172 172
         $this->loadDocument($this->requestData);
173 173
         if (
174
-            $this->document === null
175
-            || $this->document->getDoc() === null
174
+            $this->document === NULL
175
+            || $this->document->getDoc() === NULL
176 176
         ) {
177 177
             // Quit without doing anything if required variables are not set.
178 178
             return [];
@@ -219,12 +219,12 @@  discard block
 block discarded – undo
219 219
             }
220 220
             // Go through table of contents and create all menu entries.
221 221
             foreach ($this->document->getDoc()->tableOfContents as $entry) {
222
-                $menuArray[] = $this->getMenuEntry($entry, true);
222
+                $menuArray[] = $this->getMenuEntry($entry, TRUE);
223 223
             }
224 224
         } else {
225 225
             // Go through table of contents and create top-level menu entries.
226 226
             foreach ($this->document->getDoc()->tableOfContents as $entry) {
227
-                $menuArray[] = $this->getMenuEntry($entry, false);
227
+                $menuArray[] = $this->getMenuEntry($entry, FALSE);
228 228
             }
229 229
             // Build table of contents from database.
230 230
             $result = $this->documentRepository->getTableOfContentsFromDb($this->document->getUid(), $this->document->getPid(), $this->settings);
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
                         'pagination' => '',
244 244
                         'targetUid' => $resArray['uid']
245 245
                     ];
246
-                    $menuArray[0]['_SUB_MENU'][] = $this->getMenuEntry($entry, false);
246
+                    $menuArray[0]['_SUB_MENU'][] = $this->getMenuEntry($entry, FALSE);
247 247
                 }
248 248
             }
249 249
         }
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -23,8 +23,7 @@  discard block
 block discarded – undo
23 23
  * @subpackage dlf
24 24
  * @access public
25 25
  */
26
-class TableOfContentsController extends AbstractController
27
-{
26
+class TableOfContentsController extends AbstractController {
28 27
     /**
29 28
      * This holds the active entries according to the currently selected page
30 29
      *
@@ -43,8 +42,7 @@  discard block
 block discarded – undo
43 42
      *
44 43
      * @return array HMENU array for menu entry
45 44
      */
46
-    protected function getMenuEntry(array $entry, $recursive = false)
47
-    {
45
+    protected function getMenuEntry(array $entry, $recursive = false) {
48 46
         $entryArray = [];
49 47
         // Set "title", "volume", "type" and "pagination" from $entry array.
50 48
         $entryArray['title'] = !empty($entry['label']) ? $entry['label'] : $entry['orderlabel'];
@@ -131,8 +129,7 @@  discard block
 block discarded – undo
131 129
      *
132 130
      * @return void
133 131
      */
134
-    public function mainAction()
135
-    {
132
+    public function mainAction() {
136 133
         $this->view->assign('toc', $this->makeMenuArray());
137 134
     }
138 135
 
@@ -142,8 +139,7 @@  discard block
 block discarded – undo
142 139
      * @access public
143 140
      * @return array HMENU array
144 141
      */
145
-    public function makeMenuArray()
146
-    {
142
+    public function makeMenuArray() {
147 143
         // Load current document.
148 144
         $this->loadDocument($this->requestData);
149 145
         if (
Please login to merge, or discard this patch.
Classes/Hooks/DataHandler.php 3 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -139,10 +139,10 @@  discard block
 block discarded – undo
139 139
                     ) {
140 140
                         // Get current configuration.
141 141
                         $result = $queryBuilder
142
-                            ->select($table . '.is_listed AS is_listed')
142
+                            ->select($table.'.is_listed AS is_listed')
143 143
                             ->from($table)
144 144
                             ->where(
145
-                                $queryBuilder->expr()->eq($table . '.uid', intval($id)),
145
+                                $queryBuilder->expr()->eq($table.'.uid', intval($id)),
146 146
                                 Helper::whereExpression($table)
147 147
                             )
148 148
                             ->setMaxResults(1)
@@ -164,10 +164,10 @@  discard block
 block discarded – undo
164 164
                     ) {
165 165
                         // Get current configuration.
166 166
                         $result = $queryBuilder
167
-                            ->select($table . '.index_autocomplete AS index_autocomplete')
167
+                            ->select($table.'.index_autocomplete AS index_autocomplete')
168 168
                             ->from($table)
169 169
                             ->where(
170
-                                $queryBuilder->expr()->eq($table . '.uid', intval($id)),
170
+                                $queryBuilder->expr()->eq($table.'.uid', intval($id)),
171 171
                                 Helper::whereExpression($table)
172 172
                             )
173 173
                             ->setMaxResults(1)
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
                                 if ($solr->ready) {
243 243
                                     // Delete Solr document.
244 244
                                     $updateQuery = $solr->service->createUpdate();
245
-                                    $updateQuery->addDeleteQuery('uid:' . $id);
245
+                                    $updateQuery->addDeleteQuery('uid:'.$id);
246 246
                                     $updateQuery->addCommit();
247 247
                                     $solr->service->update($updateQuery);
248 248
                                 }
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
                                     $document->setDoc($doc);
255 255
                                     Indexer::add($document);
256 256
                                 } else {
257
-                                    $this->logger->error('Failed to re-index document with UID ' . $id);
257
+                                    $this->logger->error('Failed to re-index document with UID '.$id);
258 258
                                 }
259 259
                             }
260 260
                         }
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
                         if ($solr->ready) {
322 322
                             // Delete Solr document.
323 323
                             $updateQuery = $solr->service->createUpdate();
324
-                            $updateQuery->addDeleteQuery('uid:' . $id);
324
+                            $updateQuery->addDeleteQuery('uid:'.$id);
325 325
                             $updateQuery->addCommit();
326 326
                             $solr->service->update($updateQuery);
327 327
                             if ($command == 'delete') {
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
                             $document->setDoc($doc);
337 337
                             Indexer::add($document);
338 338
                         } else {
339
-                            $this->logger->error('Failed to re-index document with UID ' . $id);
339
+                            $this->logger->error('Failed to re-index document with UID '.$id);
340 340
                         }
341 341
                         break;
342 342
                 }
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
                             // Nothing to do here.
388 388
                         }
389 389
                     }
390
-                    $this->logger->warning('Core ' . $resArray['core'] . ' could not be deleted from Apache Solr');
390
+                    $this->logger->warning('Core '.$resArray['core'].' could not be deleted from Apache Solr');
391 391
                 }
392 392
             }
393 393
         }
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -34,8 +34,7 @@  discard block
 block discarded – undo
34 34
  * @subpackage dlf
35 35
  * @access public
36 36
  */
37
-class DataHandler implements LoggerAwareInterface
38
-{
37
+class DataHandler implements LoggerAwareInterface {
39 38
     use LoggerAwareTrait;
40 39
 
41 40
     /**
@@ -43,8 +42,7 @@  discard block
 block discarded – undo
43 42
      */
44 43
     protected $documentRepository;
45 44
 
46
-    protected function getDocumentRepository()
47
-    {
45
+    protected function getDocumentRepository() {
48 46
         if ($this->documentRepository === null) {
49 47
             $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
50 48
             $this->documentRepository = $objectManager->get(DocumentRepository::class);
@@ -65,8 +63,7 @@  discard block
 block discarded – undo
65 63
      *
66 64
      * @return void
67 65
      */
68
-    public function processDatamap_postProcessFieldArray($status, $table, $id, &$fieldArray)
69
-    {
66
+    public function processDatamap_postProcessFieldArray($status, $table, $id, &$fieldArray) {
70 67
         if ($status == 'new') {
71 68
             switch ($table) {
72 69
                     // Field post-processing for table "tx_dlf_documents".
@@ -195,8 +192,7 @@  discard block
 block discarded – undo
195 192
      *
196 193
      * @return void
197 194
      */
198
-    public function processDatamap_afterDatabaseOperations($status, $table, $id, &$fieldArray)
199
-    {
195
+    public function processDatamap_afterDatabaseOperations($status, $table, $id, &$fieldArray) {
200 196
         if ($status == 'update') {
201 197
             switch ($table) {
202 198
                     // After database operations for table "tx_dlf_documents".
@@ -275,8 +271,7 @@  discard block
 block discarded – undo
275 271
      *
276 272
      * @return void
277 273
      */
278
-    public function processCmdmap_postProcess($command, $table, $id)
279
-    {
274
+    public function processCmdmap_postProcess($command, $table, $id) {
280 275
         if (
281 276
             in_array($command, ['move', 'delete', 'undelete'])
282 277
             && $table == 'tx_dlf_documents'
Please login to merge, or discard this patch.
Upper-Lower-Casing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
     protected function getDocumentRepository()
47 47
     {
48
-        if ($this->documentRepository === null) {
48
+        if ($this->documentRepository === NULL) {
49 49
             $objectManager = GeneralUtility::makeInstance(ObjectManager::class);
50 50
             $this->documentRepository = $objectManager->get(DocumentRepository::class);
51 51
         }
@@ -249,8 +249,8 @@  discard block
 block discarded – undo
249 249
                             } else {
250 250
                                 // Reindex document.
251 251
                                 $document = $this->getDocumentRepository()->findByUid($id);
252
-                                $doc = Doc::getInstance($document->getLocation(), ['storagePid' => $document->getPid()], true);
253
-                                if ($document !== null && $doc !== null) {
252
+                                $doc = Doc::getInstance($document->getLocation(), ['storagePid' => $document->getPid()], TRUE);
253
+                                if ($document !== NULL && $doc !== NULL) {
254 254
                                     $document->setDoc($doc);
255 255
                                     Indexer::add($document);
256 256
                                 } else {
@@ -331,8 +331,8 @@  discard block
 block discarded – undo
331 331
                     case 'undelete':
332 332
                         // Reindex document.
333 333
                         $document = $this->getDocumentRepository()->findByUid($id);
334
-                        $doc = Doc::getInstance($document->getLocation(), ['storagePid' => $document->getPid()], true);
335
-                        if ($document !== null && $doc !== null) {
334
+                        $doc = Doc::getInstance($document->getLocation(), ['storagePid' => $document->getPid()], TRUE);
335
+                        if ($document !== NULL && $doc !== NULL) {
336 336
                             $document->setDoc($doc);
337 337
                             Indexer::add($document);
338 338
                         } else {
@@ -374,9 +374,9 @@  discard block
 block discarded – undo
374 374
                         $query = $solr->service->createCoreAdmin();
375 375
                         $action = $query->createUnload();
376 376
                         $action->setCore($resArray['core']);
377
-                        $action->setDeleteDataDir(true);
378
-                        $action->setDeleteIndex(true);
379
-                        $action->setDeleteInstanceDir(true);
377
+                        $action->setDeleteDataDir(TRUE);
378
+                        $action->setDeleteIndex(TRUE);
379
+                        $action->setDeleteInstanceDir(TRUE);
380 380
                         $query->setAction($action);
381 381
                         try {
382 382
                             $response = $solr->service->coreAdmin($query);
Please login to merge, or discard this patch.