Passed
Pull Request — master (#211)
by
unknown
15:53
created
Classes/Domain/Model/ProcessNumber.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,6 +106,6 @@
 block discarded – undo
106 106
     }
107 107
 
108 108
     public function getProcessNumberString() {
109
-        return strtoupper($this->getOwnerId()).'-'. $this->getYear().'-'.$this->getCounter();
109
+        return strtoupper($this->getOwnerId()) . '-' . $this->getYear() . '-' . $this->getCounter();
110 110
     }
111 111
 }
112 112
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -47,8 +47,7 @@  discard block
 block discarded – undo
47 47
      *
48 48
      * @return string $ownerId
49 49
      */
50
-    public function getOwnerId()
51
-    {
50
+    public function getOwnerId() {
52 51
         return $this->ownerId;
53 52
     }
54 53
 
@@ -58,8 +57,7 @@  discard block
 block discarded – undo
58 57
      * @param string $ownerId
59 58
      * @return void
60 59
      */
61
-    public function setOwnerId($ownerId)
62
-    {
60
+    public function setOwnerId($ownerId) {
63 61
         $this->ownerId = $ownerId;
64 62
     }
65 63
 
@@ -68,8 +66,7 @@  discard block
 block discarded – undo
68 66
      *
69 67
      * @return int $year
70 68
      */
71
-    public function getYear()
72
-    {
69
+    public function getYear() {
73 70
         return $this->year;
74 71
     }
75 72
 
@@ -79,8 +76,7 @@  discard block
 block discarded – undo
79 76
      * @param int $year
80 77
      * @return void
81 78
      */
82
-    public function setYear($year)
83
-    {
79
+    public function setYear($year) {
84 80
         $this->year = $year;
85 81
     }
86 82
 
@@ -89,8 +85,7 @@  discard block
 block discarded – undo
89 85
      *
90 86
      * @return int $counter
91 87
      */
92
-    public function getCounter()
93
-    {
88
+    public function getCounter() {
94 89
         return $this->counter;
95 90
     }
96 91
 
@@ -100,8 +95,7 @@  discard block
 block discarded – undo
100 95
      * @param int $counter
101 96
      * @return void
102 97
      */
103
-    public function setCounter($counter)
104
-    {
98
+    public function setCounter($counter) {
105 99
         $this->counter = $counter;
106 100
     }
107 101
 
Please login to merge, or discard this patch.
Classes/Plugins/DownloadTool/DownloadTool.php 4 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,6 @@
 block discarded – undo
107 107
 
108 108
     /**
109 109
      * Get PDF document list
110
-
111 110
      * @return array of attachments
112 111
      */
113 112
     protected function getAttachments()
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $content = '';
73 73
         if (is_array($attachments)) {
74 74
             foreach ($attachments as $id => $file) {
75
-                $conf = array(
75
+                $conf = array (
76 76
                     'useCacheHash'     => 0,
77 77
                     'parameter'        => $this->conf['apiPid'] . ' - piwik_download',
78 78
                     'additionalParams' => '&tx_dpf[qid]=' . $this->doc->recordId . '&tx_dpf[action]=attachment' . '&tx_dpf[attachment]=' . $file['ID'],
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
                 $title = $file['LABEL'] ? $file['LABEL'] : $file['ID'];
82 82
                 $markerArray['###FILE###'] = $this->cObj->typoLink($title, $conf);
83 83
 
84
-                if(!empty($vgwort)) {
84
+                if (!empty($vgwort)) {
85 85
                     $markerArray['###VGWORT###'] = "<div class='div_vgwpixel' data-url='" . $vgwort . "'></div>";
86 86
                 } else {
87 87
                     $markerArray['###VGWORT###'] = "";
@@ -103,10 +103,10 @@  discard block
 block discarded – undo
103 103
         $xPath = 'mets:fileSec/mets:fileGrp[@USE="' . $this->conf['fileGrpDownload'] . '"]/mets:file';
104 104
         $files = $this->doc->mets->xpath($xPath);
105 105
         if (!is_array($files)) {
106
-            return array();
106
+            return array ();
107 107
         }
108 108
         foreach ($files as $key => $file) {
109
-            $singleFile = array();
109
+            $singleFile = array ();
110 110
             foreach ($file->attributes('mext', 1) as $attribute => $value) {
111 111
                 $singleFile[$attribute] = $value;
112 112
             }
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         $xPath = '//slub:info/slub:vgwortOpenKey';
129 129
         $vgwortOpenKey = $this->doc->mets->xpath($xPath)[0];
130 130
 
131
-        if (!empty($vgwortOpenKey) or $vgwortOpenKey != FALSE ) {
131
+        if (!empty($vgwortOpenKey) or $vgwortOpenKey != FALSE) {
132 132
             if (GeneralUtility::getIndpEnv('TYPO3_SSL')) {
133 133
                 $vgwortserver = 'https://ssl-vg03.met.vgwort.de/na/';
134 134
             } else {
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,8 +24,7 @@  discard block
 block discarded – undo
24 24
  * @subpackage    tx_dpf
25 25
  * @access    public
26 26
  */
27
-class DownloadTool extends \Kitodo\Dlf\Common\AbstractPlugin
28
-{
27
+class DownloadTool extends \Kitodo\Dlf\Common\AbstractPlugin {
29 28
     public $scriptRelPath = 'Classes/Plugins/DownloadTool.php';
30 29
 
31 30
     /**
@@ -38,8 +37,7 @@  discard block
 block discarded – undo
38 37
      *
39 38
      * @return    string        The content that is displayed on the website
40 39
      */
41
-    public function main($content, $conf)
42
-    {
40
+    public function main($content, $conf) {
43 41
         $this->init($conf);
44 42
 
45 43
         // get the tx_dpf.settings too
@@ -97,8 +95,7 @@  discard block
 block discarded – undo
97 95
 
98 96
      * @return array of attachments
99 97
      */
100
-    protected function getAttachments()
101
-    {
98
+    protected function getAttachments() {
102 99
         // Get pdf documents
103 100
         $xPath = 'mets:fileSec/mets:fileGrp[@USE="' . $this->conf['fileGrpDownload'] . '"]/mets:file';
104 101
         $files = $this->doc->mets->xpath($xPath);
@@ -121,8 +118,7 @@  discard block
 block discarded – undo
121 118
         return $attachments;
122 119
     }
123 120
 
124
-    protected function getVGWortUrl()
125
-    {
121
+    protected function getVGWortUrl() {
126 122
         // Get VG-Wort-OpenKey for document
127 123
         $this->doc->mets->registerXPathNamespace("slub", 'http://slub-dresden.de/');
128 124
         $xPath = '//slub:info/slub:vgwortOpenKey';
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,13 +46,13 @@  discard block
 block discarded – undo
46 46
         // Flexform wins over TS
47 47
         $dpfTSconfig = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_dpf.'];
48 48
         if (is_array($dpfTSconfig['settings.'])) {
49
-            \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($dpfTSconfig['settings.'], $this->conf, true, false);
49
+            \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($dpfTSconfig['settings.'], $this->conf, TRUE, FALSE);
50 50
             $this->conf = $dpfTSconfig['settings.'];
51 51
         }
52 52
 
53 53
         // Load current document.
54 54
         $this->loadDocument();
55
-        if ($this->doc === null || empty($this->conf['fileGrpDownload'])) {
55
+        if ($this->doc === NULL || empty($this->conf['fileGrpDownload'])) {
56 56
             // Quit without doing anything if required variables are not set.
57 57
             return $content;
58 58
         }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
                     'useCacheHash'     => 0,
77 77
                     'parameter'        => $this->conf['apiPid'] . ' - piwik_download',
78 78
                     'additionalParams' => '&tx_dpf[qid]=' . $this->doc->recordId . '&tx_dpf[action]=attachment' . '&tx_dpf[attachment]=' . $file['ID'],
79
-                    'forceAbsoluteUrl' => true,
79
+                    'forceAbsoluteUrl' => TRUE,
80 80
                 );
81 81
                 $title = $file['LABEL'] ? $file['LABEL'] : $file['ID'];
82 82
                 $markerArray['###FILE###'] = $this->cObj->typoLink($title, $conf);
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
                 $content .= $this->cObj->substituteMarkerArray($subpartArray['downloads'], $markerArray);
90 90
             }
91 91
         }
92
-        return $this->cObj->substituteSubpart($this->template, '###DOWNLOADS###', $content, true);
92
+        return $this->cObj->substituteSubpart($this->template, '###DOWNLOADS###', $content, TRUE);
93 93
     }
94 94
 
95 95
     /**
Please login to merge, or discard this patch.
Classes/Services/ProcessNumber/ProcessNumberGenerator.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
             $datetime = new \DateTime();
32 32
             $currentYear = $datetime->format('y');
33 33
 
34
-            $processNumber = $processNumberRepository->getHighestProcessNumberByOwnerIdAndYear(strtolower($ownerId),$currentYear);
34
+            $processNumber = $processNumberRepository->getHighestProcessNumberByOwnerIdAndYear(strtolower($ownerId), $currentYear);
35 35
 
36 36
             if ($processNumber) {
37 37
                 $counter = $processNumber->getCounter() + 1;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,7 @@
 block discarded – undo
20 20
 use EWW\Dpf\Domain\Model\ProcessNumber;
21 21
 use EWW\Dpf\Domain\Repository\ClientRepository;
22 22
 
23
-class ProcessNumberGenerator
24
-{
23
+class ProcessNumberGenerator {
25 24
     public function getProcessNumber($ownerId = NULL) {
26 25
         $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(ObjectManager::class);
27 26
         $processNumberRepository = $objectManager->get(ProcessNumberRepository::class);
Please login to merge, or discard this patch.
Classes/Controller/SearchFEController.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             $this->currentPage = 1;
89 89
         } else {
90 90
             // restore query
91
-            $this->query = (!empty($session[$this->action]['query'])) ? $session[$this->action]['query'] : array();
91
+            $this->query = (!empty($session[$this->action]['query'])) ? $session[$this->action]['query'] : array ();
92 92
             // set current page
93 93
             if ((!empty($currentPage))) {
94 94
                 $this->currentPage = MathUtility::forceIntegerInRange($currentPage, 1);
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
      */
198 198
     private function viewAssign()
199 199
     {
200
-        $this->view->assign('query',       $this->query);
201
-        $this->view->assign('resultList',  $this->resultList);
200
+        $this->view->assign('query', $this->query);
201
+        $this->view->assign('resultList', $this->resultList);
202 202
         $this->view->assign('currentPage', $this->currentPage);
203 203
     }
204 204
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
                 $message,
125 125
                 '',
126 126
                 $severity,
127
-                true
127
+                TRUE
128 128
             );
129 129
         }
130 130
     }
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
                 $message,
156 156
                 '',
157 157
                 $severity,
158
-                true
158
+                TRUE
159 159
             );
160 160
         }
161 161
     }
Please login to merge, or discard this patch.
Braces   +11 added lines, -22 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@  discard block
 block discarded – undo
21 21
  * @package EWW\Dpf\Controller
22 22
  * @deprecated since version 4.0
23 23
  */
24
-class SearchFEController extends \EWW\Dpf\Controller\AbstractSearchController
25
-{
24
+class SearchFEController extends \EWW\Dpf\Controller\AbstractSearchController {
26 25
     /**
27 26
      * action
28 27
      * @var string
@@ -64,8 +63,7 @@  discard block
 block discarded – undo
64 63
     /**
65 64
      * __construct
66 65
      */
67
-    public function __construct()
68
-    {
66
+    public function __construct() {
69 67
         // get session data
70 68
         $session = $this->getSessionData('tx_dpf_frontendsearch');
71 69
         // get action
@@ -106,8 +104,7 @@  discard block
 block discarded – undo
106 104
      * @return void
107 105
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
108 106
      */
109
-    public function initializeSearchAction()
110
-    {
107
+    public function initializeSearchAction() {
111 108
         if ($this->action == 'extendedSearch') {
112 109
             $this->forward('extendedSearch');
113 110
         }
@@ -117,8 +114,7 @@  discard block
 block discarded – undo
117 114
      * action search
118 115
      * @return void
119 116
      */
120
-    public function searchAction()
121
-    {
117
+    public function searchAction() {
122 118
         try {
123 119
             if (!empty($this->query['fulltext'])) {
124 120
                 $query = $this->searchFulltext($this->query['fulltext']);
@@ -146,8 +142,7 @@  discard block
 block discarded – undo
146 142
      * @return void
147 143
      * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
148 144
      */
149
-    public function initializeExtendedSearchAction()
150
-    {
145
+    public function initializeExtendedSearchAction() {
151 146
         if ($this->action == 'search') {
152 147
             $this->forward('search');
153 148
         }
@@ -157,8 +152,7 @@  discard block
 block discarded – undo
157 152
      * action extendedSearch
158 153
      * @return void
159 154
      */
160
-    public function extendedSearchAction()
161
-    {
155
+    public function extendedSearchAction() {
162 156
         try {
163 157
             $this->docTypes();
164 158
             if (!empty(implode('', $this->query))) {
@@ -186,8 +180,7 @@  discard block
 block discarded – undo
186 180
      * @param  array $query
187 181
      * @return array $results
188 182
      */
189
-    private function getResults($query)
190
-    {
183
+    private function getResults($query) {
191 184
         $size = $this->settings['list']['paginate']['itemsPerPage'];
192 185
 
193 186
         $query['body']['from'] = ($this->currentPage - 1) * $size;
@@ -203,8 +196,7 @@  discard block
 block discarded – undo
203 196
      * dummy action for showSearchForm Action used in sidebar
204 197
      * @return void
205 198
      */
206
-    public static function showSearchFormAction()
207
-    {
199
+    public static function showSearchFormAction() {
208 200
 
209 201
     }
210 202
 
@@ -212,8 +204,7 @@  discard block
 block discarded – undo
212 204
      * set session data
213 205
      * @return void
214 206
      */
215
-    private function setSession()
216
-    {
207
+    private function setSession() {
217 208
         $session[$this->action] = array (
218 209
                 'query'       => $this->query,
219 210
                 'currentPage' => $this->currentPage
@@ -225,8 +216,7 @@  discard block
 block discarded – undo
225 216
      * create docTypes
226 217
      * @return void
227 218
      */
228
-    private function docTypes()
229
-    {
219
+    private function docTypes() {
230 220
         // get document types
231 221
         $allTypes = $this->documentTypeRepository->findAll();
232 222
         // add empty field
@@ -242,8 +232,7 @@  discard block
 block discarded – undo
242 232
      * create view
243 233
      * @return void
244 234
      */
245
-    private function viewAssign()
246
-    {
235
+    private function viewAssign() {
247 236
         $this->view->assign('query',       $this->query);
248 237
         $this->view->assign('resultList',  $this->resultList);
249 238
         $this->view->assign('currentPage', $this->currentPage);
Please login to merge, or discard this patch.
Classes/Services/Transfer/Repository.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@
 block discarded – undo
14 14
  * The TYPO3 project - inspiring people to share!
15 15
  */
16 16
 
17
-interface Repository
18
-{
17
+interface Repository {
19 18
 
20 19
     public function ingest($document, $metsXml);
21 20
 
Please login to merge, or discard this patch.
Classes/Services/Transfer/ElasticsearchRepository.php 3 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,9 +66,9 @@
 block discarded – undo
66 66
         $client = $this->clientRepository->findAll()->current();
67 67
 
68 68
         // build es json
69
-        $esJson                               = array();
69
+        $esJson                               = array ();
70 70
         $esJson['OWNER_ID']                   = $client->getOwnerId();
71
-        $esJson['_dissemination']             = array();
71
+        $esJson['_dissemination']             = array ();
72 72
         $esJson['_dissemination']['_content'] = json_decode($json);
73 73
 
74 74
         $esJson = json_encode($esJson);
Please login to merge, or discard this patch.
Braces   +8 added lines, -16 removed lines patch added patch discarded remove patch
@@ -27,8 +27,7 @@  discard block
 block discarded – undo
27 27
  * @package EWW\Dpf\Services\Transfer
28 28
  * @deprecated since version 4.0
29 29
  */
30
-class ElasticsearchRepository implements Repository
31
-{
30
+class ElasticsearchRepository implements Repository {
32 31
     /**
33 32
      * clientRepository
34 33
      *
@@ -45,8 +44,7 @@  discard block
 block discarded – undo
45 44
 
46 45
     protected $url;
47 46
 
48
-    public function __construct()
49
-    {
47
+    public function __construct() {
50 48
 
51 49
         $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(ObjectManager::class);
52 50
         $clientConfigurationManager = $objectManager->get(ClientConfigurationManager::class);
@@ -65,8 +63,7 @@  discard block
 block discarded – undo
65 63
      * saves new document into elasticsearch local
66 64
      * @param \EWW\Dpf\Domain\Model\Document $document
67 65
      */
68
-    public function add($document, $json)
69
-    {
66
+    public function add($document, $json) {
70 67
 
71 68
         $client = $this->clientRepository->findAll()->current();
72 69
 
@@ -103,8 +100,7 @@  discard block
 block discarded – undo
103 100
      * @param \EWW\Dpf\Domain\Model\Document $document
104 101
      * @param string $state
105 102
      */
106
-    public function delete($document, $state)
107
-    {
103
+    public function delete($document, $state) {
108 104
 
109 105
         try {
110 106
             $response = Request::delete($this->url . $document->getUid())
@@ -122,23 +118,19 @@  discard block
 block discarded – undo
122 118
 
123 119
     }
124 120
 
125
-    public function retrieve($id)
126
-    {
121
+    public function retrieve($id) {
127 122
         # not implemented yet
128 123
     }
129 124
 
130
-    public function ingest($document, $metsXML)
131
-    {
125
+    public function ingest($document, $metsXML) {
132 126
         # not implemented yet
133 127
     }
134 128
 
135
-    public function update($document, $metsXml)
136
-    {
129
+    public function update($document, $metsXml) {
137 130
         # not implemented yet
138 131
     }
139 132
 
140
-    public function getNextDocumentId()
141
-    {
133
+    public function getNextDocumentId() {
142 134
         # not implemented yet
143 135
     }
144 136
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      * @var \EWW\Dpf\Domain\Repository\ClientRepository
36 36
      * @TYPO3\CMS\Extbase\Annotation\Inject
37 37
      */
38
-    protected $clientRepository = null;
38
+    protected $clientRepository = NULL;
39 39
 
40 40
     protected $host;
41 41
 
Please login to merge, or discard this patch.
Classes/Services/Identifier/Urn.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@  discard block
 block discarded – undo
14 14
  * The TYPO3 project - inspiring people to share!
15 15
  */
16 16
 
17
-class Urn
18
-{
17
+class Urn {
19 18
 
20 19
     /**
21 20
      * clientRepository
@@ -25,8 +24,7 @@  discard block
 block discarded – undo
25 24
      */
26 25
     protected $clientRepository = null;
27 26
 
28
-    public function getUrn($niss)
29
-    {
27
+    public function getUrn($niss) {
30 28
 
31 29
         $client = $this->clientRepository->findAll()->current();
32 30
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      * @var \EWW\Dpf\Domain\Repository\ClientRepository
24 24
      * @TYPO3\CMS\Extbase\Annotation\Inject
25 25
      */
26
-    protected $clientRepository = null;
26
+    protected $clientRepository = NULL;
27 27
 
28 28
     public function getUrn($niss)
29 29
     {
Please login to merge, or discard this patch.
Classes/Services/Identifier/UrnBuilder.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -150,13 +150,13 @@
 block discarded – undo
150 150
         $nbn = strtolower($urn);
151 151
 
152 152
         // array of characters to match
153
-        $search_pattern = array('/9/', '/8/', '/7/', '/6/', '/5/', '/4/', '/3/', '/2/', '/1/', '/0/', '/a/', '/b/', '/c/',
153
+        $search_pattern = array ('/9/', '/8/', '/7/', '/6/', '/5/', '/4/', '/3/', '/2/', '/1/', '/0/', '/a/', '/b/', '/c/',
154 154
             '/d/', '/e/', '/f/', '/g/', '/h/', '/i/', '/j/', '/k/', '/l/', '/m/', '/n/', '/o/', '/p/', '/q/', '/r/', '/s/',
155 155
             '/t/', '/u/', '/v/', '/w/', '/x/', '/y/', '/z/', '/-/', '/:/');
156 156
 
157 157
         // array of corresponding replacements, '9' will be temporarily replaced with placeholder '_' to prevent
158 158
         // replacement of '41' with '52'
159
-        $replacements = array('_', 9, 8, 7, 6, 5, 4, 3, 2, 1, 18, 14, 19, 15, 16, 21, 22, 23, 24, 25, 42, 26, 27, 13, 28, 29,
159
+        $replacements = array ('_', 9, 8, 7, 6, 5, 4, 3, 2, 1, 18, 14, 19, 15, 16, 21, 22, 23, 24, 25, 42, 26, 27, 13, 28, 29,
160 160
             31, 12, 32, 33, 11, 34, 35, 36, 37, 38, 39, 17);
161 161
 
162 162
         // replace matching pattern in given nbn with corresponding replacement
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,8 +14,7 @@  discard block
 block discarded – undo
14 14
  * The TYPO3 project - inspiring people to share!
15 15
  */
16 16
 
17
-class UrnBuilder
18
-{
17
+class UrnBuilder {
19 18
 
20 19
     /**
21 20
      * Standard prefix of the URN for DNB (Deutsche Nationalbibliothek).
@@ -46,8 +45,7 @@  discard block
 block discarded – undo
46 45
      * @throws InvalidArgumentException Thrown if at least one of the subnamespace parts contain other
47 46
      *                                  characters than characters.
48 47
      */
49
-    public function __construct($snid1, $snid2)
50
-    {
48
+    public function __construct($snid1, $snid2) {
51 49
 
52 50
         if (0 === preg_match('/^[a-zA-Z]+$/', $snid1)) {
53 51
             throw new \InvalidArgumentException('Used invalid first subnamespace identifier.');
@@ -67,8 +65,7 @@  discard block
 block discarded – undo
67 65
      * @throws InvalidArgumentException Thrown if the niss contains invalid characters.
68 66
      * @return string The URN.
69 67
      */
70
-    public function getUrn($niss)
71
-    {
68
+    public function getUrn($niss) {
72 69
 
73 70
         // regexp pattern for valid niss
74 71
         if (0 === preg_match('/^[a-zA-Z0-9\-]+$/', $niss)) {
@@ -89,8 +86,7 @@  discard block
 block discarded – undo
89 86
      * @throws InvalidArgumentException Thrown if the niss contains invalid characters.
90 87
      * @return integer Check digit.
91 88
      */
92
-    public function getCheckDigit($niss)
93
-    {
89
+    public function getCheckDigit($niss) {
94 90
 
95 91
         // regexp pattern for valid niss
96 92
         if (0 === preg_match('/^[a-zA-Z0-9\-]+$/', $niss)) {
@@ -140,8 +136,7 @@  discard block
 block discarded – undo
140 136
      * @param string $urn A partial URN with the checkdigit missing.
141 137
      * @return string The given URN with all characters replaced by numbers.
142 138
      */
143
-    private function replaceUrnChars($urn)
144
-    {
139
+    private function replaceUrnChars($urn) {
145 140
         // However, the preg_replace function calls itself on the result of a previos run. In order to get
146 141
         // the replacement right, characters and numbers in the arrays below have got a specific order to make
147 142
         // it work. Be careful when changing those numbers! Tests may help ;)
Please login to merge, or discard this patch.
Classes/ViewHelpers/Widget/Controller/PaginateController.php 3 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     /**
35 35
      * @var array
36 36
      */
37
-    protected $configuration = array(
37
+    protected $configuration = array (
38 38
         'itemsPerPage'         => 10,
39 39
         'insertAbove'          => false,
40 40
         'insertBelow'          => true,
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     public function indexAction($currentPage = 1)
93 93
     {
94 94
         // set current page
95
-        if(!empty($this->widgetConfiguration['currentPage'])) {
95
+        if (!empty($this->widgetConfiguration['currentPage'])) {
96 96
             $currentPage = $this->widgetConfiguration['currentPage'];
97 97
         };
98 98
         $this->currentPage = (int) $currentPage;
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
                 $offset = ((int) ($itemsPerPage * ($this->currentPage - 1)));
111 111
             }
112 112
         }
113
-        $this->view->assign('contentArguments', array(
113
+        $this->view->assign('contentArguments', array (
114 114
             $this->widgetConfiguration['as'] => $this->objects,
115 115
         ));
116 116
         $this->view->assign('configuration', $this->configuration);
@@ -151,11 +151,11 @@  discard block
 block discarded – undo
151 151
     protected function buildPagination()
152 152
     {
153 153
         $this->calculateDisplayRange();
154
-        $pages = array();
154
+        $pages = array ();
155 155
         for ($i = $this->displayRangeStart; $i <= $this->displayRangeEnd; $i++) {
156
-            $pages[] = array('number' => $i, 'isCurrent' => $i === $this->currentPage);
156
+            $pages[] = array ('number' => $i, 'isCurrent' => $i === $this->currentPage);
157 157
         }
158
-        $pagination = array(
158
+        $pagination = array (
159 159
             'pages'             => $pages,
160 160
             'current'           => $this->currentPage,
161 161
             'numberOfPages'     => $this->numberOfPages,
Please login to merge, or discard this patch.
Braces   +5 added lines, -10 removed lines patch added patch discarded remove patch
@@ -29,8 +29,7 @@  discard block
 block discarded – undo
29 29
 /*
30 30
  * Class PaginateController
31 31
  */
32
-class PaginateController extends AbstractWidgetController
33
-{
32
+class PaginateController extends AbstractWidgetController {
34 33
     /**
35 34
      * @var array
36 35
      */
@@ -76,8 +75,7 @@  discard block
 block discarded – undo
76 75
     /**
77 76
      * @return void
78 77
      */
79
-    public function initializeAction()
80
-    {
78
+    public function initializeAction() {
81 79
         $this->objects = $this->widgetConfiguration['objects'];
82 80
         ArrayUtility::mergeRecursiveWithOverrule($this->configuration, $this->widgetConfiguration['configuration'], false);
83 81
         $itemsPerPage               = (int) $this->configuration['itemsPerPage'];
@@ -89,8 +87,7 @@  discard block
 block discarded – undo
89 87
      * @param int $currentPage
90 88
      * @return void
91 89
      */
92
-    public function indexAction($currentPage = 1)
93
-    {
90
+    public function indexAction($currentPage = 1) {
94 91
         // set current page
95 92
         if(!empty($this->widgetConfiguration['currentPage'])) {
96 93
             $currentPage = $this->widgetConfiguration['currentPage'];
@@ -123,8 +120,7 @@  discard block
 block discarded – undo
123 120
      *
124 121
      * @return void
125 122
      */
126
-    protected function calculateDisplayRange()
127
-    {
123
+    protected function calculateDisplayRange() {
128 124
         $maximumNumberOfLinks = $this->maximumNumberOfLinks;
129 125
         if ($maximumNumberOfLinks > $this->numberOfPages) {
130 126
             $maximumNumberOfLinks = $this->numberOfPages;
@@ -148,8 +144,7 @@  discard block
 block discarded – undo
148 144
      *
149 145
      * @return array
150 146
      */
151
-    protected function buildPagination()
152
-    {
147
+    protected function buildPagination() {
153 148
         $this->calculateDisplayRange();
154 149
         $pages = array();
155 150
         for ($i = $this->displayRangeStart; $i <= $this->displayRangeEnd; $i++) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
      */
37 37
     protected $configuration = array(
38 38
         'itemsPerPage'         => 10,
39
-        'insertAbove'          => false,
40
-        'insertBelow'          => true,
39
+        'insertAbove'          => FALSE,
40
+        'insertBelow'          => TRUE,
41 41
         'maximumNumberOfLinks' => 99,
42 42
         'addQueryStringMethod' => '',
43 43
         'section'              => '',
@@ -66,12 +66,12 @@  discard block
 block discarded – undo
66 66
     /**
67 67
      * @var int
68 68
      */
69
-    protected $displayRangeStart = null;
69
+    protected $displayRangeStart = NULL;
70 70
 
71 71
     /**
72 72
      * @var int
73 73
      */
74
-    protected $displayRangeEnd = null;
74
+    protected $displayRangeEnd = NULL;
75 75
 
76 76
     /**
77 77
      * @return void
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     public function initializeAction()
80 80
     {
81 81
         $this->objects = $this->widgetConfiguration['objects'];
82
-        ArrayUtility::mergeRecursiveWithOverrule($this->configuration, $this->widgetConfiguration['configuration'], false);
82
+        ArrayUtility::mergeRecursiveWithOverrule($this->configuration, $this->widgetConfiguration['configuration'], FALSE);
83 83
         $itemsPerPage               = (int) $this->configuration['itemsPerPage'];
84 84
         $this->numberOfPages        = $itemsPerPage > 0 ? ceil($this->widgetConfiguration['total'] / $itemsPerPage) : 0;
85 85
         $this->maximumNumberOfLinks = (int) $this->configuration['maximumNumberOfLinks'];
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         }
102 102
         if ($this->currentPage > $this->numberOfPages) {
103 103
             // set $modifiedObjects to NULL if the page does not exist
104
-            $modifiedObjects = null;
104
+            $modifiedObjects = NULL;
105 105
         } else {
106 106
             // modify query
107 107
             $itemsPerPage = (int) $this->configuration['itemsPerPage'];
Please login to merge, or discard this patch.