Passed
Pull Request — master (#155)
by
unknown
09:50
created
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/FileId.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,13 +14,11 @@  discard block
 block discarded – undo
14 14
  * The TYPO3 project - inspiring people to share!
15 15
  */
16 16
 
17
-class FileId
18
-{
17
+class FileId {
19 18
 
20 19
     protected $id = 0;
21 20
 
22
-    public function __construct($document)
23
-    {
21
+    public function __construct($document) {
24 22
 
25 23
         $idList   = array();
26 24
         $this->id = 0;
@@ -42,8 +40,7 @@  discard block
 block discarded – undo
42 40
 
43 41
     }
44 42
 
45
-    public function getId($file)
46
-    {
43
+    public function getId($file) {
47 44
 
48 45
         $fileId = $file->getDatastreamIdentifier();
49 46
         if (empty($fileId)) {
Please login to merge, or discard this patch.
Classes/Services/Identifier/Urn.php 1 patch
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.
Classes/Services/Identifier/UrnBuilder.php 1 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/PaginateViewHelper.php 1 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.
Classes/ViewHelpers/Widget/Controller/PaginateController.php 1 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.
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.