Passed
Pull Request — master (#155)
by
unknown
09:50
created
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
      * @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/Services/Email/Notifier.php 3 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -163,13 +163,13 @@
 block discarded – undo
163 163
 
164 164
     protected function sendMail($reveiver, $subject, $body, $args, $mailType)
165 165
     {
166
-        $emailReceiver = array();
166
+        $emailReceiver = array ();
167 167
         $emailReceiver[$reveiver] = $reveiver;
168 168
         $message = (new \TYPO3\CMS\Core\Mail\MailMessage())
169
-            ->setFrom(array('[email protected]' => '[email protected]'))
169
+            ->setFrom(array ('[email protected]' => '[email protected]'))
170 170
             ->setTo($emailReceiver)
171
-            ->setSubject($this->replaceMarkers($subject,$args))
172
-            ->setBody($this->replaceMarkers($body,$args),$mailType);
171
+            ->setSubject($this->replaceMarkers($subject, $args))
172
+            ->setBody($this->replaceMarkers($body, $args), $mailType);
173 173
         $message->send();
174 174
     }
175 175
 
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      * @var \EWW\Dpf\Domain\Repository\ClientRepository
24 24
      * @inject
25 25
      */
26
-    protected $clientRepository = null;
26
+    protected $clientRepository = NULL;
27 27
 
28 28
 
29 29
     /**
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      * @var \EWW\Dpf\Domain\Repository\DocumentTypeRepository
33 33
      * @inject
34 34
      */
35
-    protected $documentTypeRepository = null;
35
+    protected $documentTypeRepository = NULL;
36 36
 
37 37
     public function sendNewDocumentNotification(\EWW\Dpf\Domain\Model\Document $document)
38 38
     {
Please login to merge, or discard this patch.
Braces   +6 added lines, -12 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 Notifier
18
-{
17
+class Notifier {
19 18
 
20 19
     /**
21 20
      * clientRepository
@@ -34,8 +33,7 @@  discard block
 block discarded – undo
34 33
      */
35 34
     protected $documentTypeRepository = null;
36 35
 
37
-    public function sendNewDocumentNotification(\EWW\Dpf\Domain\Model\Document $document)
38
-    {
36
+    public function sendNewDocumentNotification(\EWW\Dpf\Domain\Model\Document $document) {
39 37
 
40 38
         try {
41 39
             $client = $this->clientRepository->findAll()->current();
@@ -102,8 +100,7 @@  discard block
 block discarded – undo
102 100
 
103 101
     }
104 102
 
105
-    public function sendIngestNotification(\EWW\Dpf\Domain\Model\Document $document)
106
-    {
103
+    public function sendIngestNotification(\EWW\Dpf\Domain\Model\Document $document) {
107 104
 
108 105
         try {
109 106
             $client = $this->clientRepository->findAll()->current();
@@ -149,8 +146,7 @@  discard block
 block discarded – undo
149 146
 
150 147
     }
151 148
 
152
-    public function sendRegisterNotification(\EWW\Dpf\Domain\Model\Document $document)
153
-    {
149
+    public function sendRegisterNotification(\EWW\Dpf\Domain\Model\Document $document) {
154 150
 
155 151
         try {
156 152
             $client = $this->clientRepository->findAll()->current();
@@ -199,8 +195,7 @@  discard block
 block discarded – undo
199 195
 
200 196
     }
201 197
 
202
-    protected function replaceMarkers($message, $args)
203
-    {
198
+    protected function replaceMarkers($message, $args) {
204 199
         if (is_array($args)) {
205 200
             foreach ($args as $key => $value) {
206 201
                 $message = str_replace($key, $value, $message);
@@ -210,8 +205,7 @@  discard block
 block discarded – undo
210 205
     }
211 206
 
212 207
 
213
-    protected function sendMail($reveiver, $subject, $body, $args, $mailType)
214
-    {
208
+    protected function sendMail($reveiver, $subject, $body, $args, $mailType) {
215 209
         $emailReceiver = array();
216 210
         $emailReceiver[$reveiver] = $reveiver;
217 211
         $message = (new \TYPO3\CMS\Core\Mail\MailMessage())
Please login to merge, or discard this patch.
Classes/ViewHelpers/Widget/PaginateViewHelper.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
      * @param array $configuration
69 69
      * @return string
70 70
      */
71
-    public function render($objects, $total, $as, $currentPage, array $configuration = array('itemsPerPage' => 10, 'insertAbove' => false, 'insertBelow' => true, 'maximumNumberOfLinks' => 99))
71
+    public function render($objects, $total, $as, $currentPage, array $configuration = array ('itemsPerPage' => 10, 'insertAbove' => false, 'insertBelow' => true, 'maximumNumberOfLinks' => 99))
72 72
     {
73 73
         return $this->initiateSubRequest();
74 74
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,8 +50,7 @@  discard block
 block discarded – undo
50 50
  * So, there is no negative performance overhead in using the Paginate Widget.
51 51
  *
52 52
  */
53
-class PaginateViewHelper extends \TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper
54
-{
53
+class PaginateViewHelper extends \TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper {
55 54
 
56 55
     /**
57 56
      * @var \EWW\Dpf\ViewHelpers\Widget\Controller\PaginateController
@@ -68,8 +67,7 @@  discard block
 block discarded – undo
68 67
      * @param array $configuration
69 68
      * @return string
70 69
      */
71
-    public function render($objects, $total, $as, $currentPage, array $configuration = array('itemsPerPage' => 10, 'insertAbove' => false, 'insertBelow' => true, 'maximumNumberOfLinks' => 99))
72
-    {
70
+    public function render($objects, $total, $as, $currentPage, array $configuration = array('itemsPerPage' => 10, 'insertAbove' => false, 'insertBelow' => true, 'maximumNumberOfLinks' => 99)) {
73 71
         return $this->initiateSubRequest();
74 72
     }
75 73
 }
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
      * @param array $configuration
69 69
      * @return string
70 70
      */
71
-    public function render($objects, $total, $as, $currentPage, array $configuration = array('itemsPerPage' => 10, 'insertAbove' => false, 'insertBelow' => true, 'maximumNumberOfLinks' => 99))
71
+    public function render($objects, $total, $as, $currentPage, array $configuration = array('itemsPerPage' => 10, 'insertAbove' => FALSE, 'insertBelow' => TRUE, 'maximumNumberOfLinks' => 99))
72 72
     {
73 73
         return $this->initiateSubRequest();
74 74
     }
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.
Classes/ViewHelpers/InArrayViewHelper.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,15 +14,13 @@
 block discarded – undo
14 14
  * The TYPO3 project - inspiring people to share!
15 15
  */
16 16
 
17
-class InArrayViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
18
-{
17
+class InArrayViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper {
19 18
 
20 19
     /**
21 20
      * @param mixed $needle The searched value
22 21
      * @param mixed $array The array
23 22
      */
24
-    public function render($needle, $array)
25
-    {
23
+    public function render($needle, $array) {
26 24
         return in_array($needle, $array);
27 25
     }
28 26
 
Please login to merge, or discard this patch.
Classes/ViewHelpers/CalcIndexViewHelper.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@  discard block
 block discarded – undo
32 32
  * @subpackage tx_slub_news_extend
33 33
  */
34 34
 
35
-class CalcIndexViewHelper extends AbstractViewHelper
36
-{
35
+class CalcIndexViewHelper extends AbstractViewHelper {
37 36
 
38 37
     /**
39 38
      * Render the supplied DateTime object as a formatted date.
@@ -47,8 +46,7 @@  discard block
 block discarded – undo
47 46
      * @author Alexander Bigga <[email protected]>
48 47
      * @api
49 48
      */
50
-    public function render($currentIndex, $currentPage, $itemsPerPage)
51
-    {
49
+    public function render($currentIndex, $currentPage, $itemsPerPage) {
52 50
         return ($currentPage - 1) * $itemsPerPage + $currentIndex;
53 51
     }
54 52
 }
Please login to merge, or discard this patch.
Classes/ViewHelpers/LanguageViewHelper.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,11 +14,9 @@  discard block
 block discarded – undo
14 14
  * The TYPO3 project - inspiring people to share!
15 15
  */
16 16
 
17
-class LanguageViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
18
-{
17
+class LanguageViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper {
19 18
 
20
-    protected function getLanguage()
21
-    {
19
+    protected function getLanguage() {
22 20
         if (TYPO3_MODE === 'FE') {
23 21
             if (isset($GLOBALS['TSFE']->config['config']['language'])) {
24 22
                 return $GLOBALS['TSFE']->config['config']['language'];
@@ -29,8 +27,7 @@  discard block
 block discarded – undo
29 27
         return 'en'; //default
30 28
     }
31 29
 
32
-    public function render()
33
-    {
30
+    public function render() {
34 31
         return $this->getLanguage();
35 32
     }
36 33
 
Please login to merge, or discard this patch.
Classes/Domain/Repository/DocumentTransferLogRepository.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,6 @@
 block discarded – undo
17 17
 /**
18 18
  * The repository for DocumentTransferLogs
19 19
  */
20
-class DocumentTransferLogRepository extends \TYPO3\CMS\Extbase\Persistence\Repository
21
-{
20
+class DocumentTransferLogRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {
22 21
 
23 22
 }
Please login to merge, or discard this patch.