@@ -20,8 +20,7 @@ discard block |
||
20 | 20 | * @subpackage dlf |
21 | 21 | * @access public |
22 | 22 | */ |
23 | -class RstSection |
|
24 | -{ |
|
23 | +class RstSection { |
|
25 | 24 | /** @var string */ |
26 | 25 | protected $header = ''; |
27 | 26 | |
@@ -31,8 +30,7 @@ discard block |
||
31 | 30 | /** @var RstSection[] */ |
32 | 31 | protected $subsections = []; |
33 | 32 | |
34 | - public static function format(string $text, array $format = []) |
|
35 | - { |
|
33 | + public static function format(string $text, array $format = []) { |
|
36 | 34 | if (!empty($text)) { |
37 | 35 | if ($format['bold'] ?? false) { |
38 | 36 | $text = '**' . $text . '**'; |
@@ -44,8 +42,7 @@ discard block |
||
44 | 42 | return $text; |
45 | 43 | } |
46 | 44 | |
47 | - public static function paragraphs(array $paragraphs) |
|
48 | - { |
|
45 | + public static function paragraphs(array $paragraphs) { |
|
49 | 46 | $paragraphs = array_values(array_filter($paragraphs, function ($entry) { |
50 | 47 | return !empty($entry); |
51 | 48 | })); |
@@ -53,27 +50,23 @@ discard block |
||
53 | 50 | return implode("\n\n", $paragraphs); |
54 | 51 | } |
55 | 52 | |
56 | - public function subsection() |
|
57 | - { |
|
53 | + public function subsection() { |
|
58 | 54 | $section = new static(); |
59 | 55 | $this->subsections[] = $section; |
60 | 56 | return $section; |
61 | 57 | } |
62 | 58 | |
63 | - public function setHeader(string $text) |
|
64 | - { |
|
59 | + public function setHeader(string $text) { |
|
65 | 60 | $this->header = $text; |
66 | 61 | } |
67 | 62 | |
68 | - public function addText(string $text) |
|
69 | - { |
|
63 | + public function addText(string $text) { |
|
70 | 64 | if (!empty($text)) { |
71 | 65 | $this->text .= $text . "\n\n"; |
72 | 66 | } |
73 | 67 | } |
74 | 68 | |
75 | - public function addTable(array $rows, array $headerRows) |
|
76 | - { |
|
69 | + public function addTable(array $rows, array $headerRows) { |
|
77 | 70 | $numHeaderRows = count($headerRows); |
78 | 71 | |
79 | 72 | $tableRst = <<<RST |
@@ -115,8 +108,7 @@ discard block |
||
115 | 108 | $this->addText($tableRst); |
116 | 109 | } |
117 | 110 | |
118 | - public function render(int $level = 0) |
|
119 | - { |
|
111 | + public function render(int $level = 0) { |
|
120 | 112 | $result = ''; |
121 | 113 | |
122 | 114 | $result .= $this->renderHeader($level); |
@@ -130,8 +122,7 @@ discard block |
||
130 | 122 | return $result; |
131 | 123 | } |
132 | 124 | |
133 | - protected function renderHeader(int $level) |
|
134 | - { |
|
125 | + protected function renderHeader(int $level) { |
|
135 | 126 | $result = ''; |
136 | 127 | |
137 | 128 | $headerChar = ['=', '=', '-', '~', '"'][$level]; |
@@ -5,12 +5,10 @@ |
||
5 | 5 | use Kitodo\Dlf\Tests\Functional\FunctionalTestCase; |
6 | 6 | use TYPO3\CMS\Core\Utility\GeneralUtility; |
7 | 7 | |
8 | -class PageViewProxyDisabledTest extends FunctionalTestCase |
|
9 | -{ |
|
8 | +class PageViewProxyDisabledTest extends FunctionalTestCase { |
|
10 | 9 | protected $disableJsonWrappedResponse = true; |
11 | 10 | |
12 | - protected function queryProxy(array $query, string $method = 'GET') |
|
13 | - { |
|
11 | + protected function queryProxy(array $query, string $method = 'GET') { |
|
14 | 12 | $query['eID'] = 'tx_dlf_pageview_proxy'; |
15 | 13 | |
16 | 14 | return $this->httpClient->request($method, '', [ |
@@ -8,8 +8,7 @@ |
||
8 | 8 | use Kitodo\Dlf\Tests\Functional\FunctionalTestCase; |
9 | 9 | use TYPO3\CMS\Extbase\Persistence\Generic\LazyObjectStorage; |
10 | 10 | |
11 | -class DocumentRepositoryTest extends FunctionalTestCase |
|
12 | -{ |
|
11 | +class DocumentRepositoryTest extends FunctionalTestCase { |
|
13 | 12 | /** |
14 | 13 | * @var DocumentRepository |
15 | 14 | */ |
@@ -24,8 +24,7 @@ |
||
24 | 24 | * |
25 | 25 | * @access public |
26 | 26 | */ |
27 | -class EditInProductionWarning extends AbstractNode |
|
28 | -{ |
|
27 | +class EditInProductionWarning extends AbstractNode { |
|
29 | 28 | /** |
30 | 29 | * Generates warning message when editing 'index_name' field |
31 | 30 | * |
@@ -25,8 +25,7 @@ |
||
25 | 25 | * |
26 | 26 | * @access public |
27 | 27 | */ |
28 | -class SolrCoreStatus extends AbstractNode |
|
29 | -{ |
|
28 | +class SolrCoreStatus extends AbstractNode { |
|
30 | 29 | /** |
31 | 30 | * Shows Solr core status for given 'index_name' |
32 | 31 | * |
@@ -33,8 +33,7 @@ |
||
33 | 33 | * |
34 | 34 | * @access public |
35 | 35 | */ |
36 | -class DataHandler implements LoggerAwareInterface |
|
37 | -{ |
|
36 | +class DataHandler implements LoggerAwareInterface { |
|
38 | 37 | use LoggerAwareTrait; |
39 | 38 | |
40 | 39 | /** |
@@ -20,8 +20,7 @@ |
||
20 | 20 | * |
21 | 21 | * @access public |
22 | 22 | */ |
23 | -class KitodoProductionHacks |
|
24 | -{ |
|
23 | +class KitodoProductionHacks { |
|
25 | 24 | /** |
26 | 25 | * Hook for \Kitodo\Dlf\Common\MetsDocument::establishRecordId() |
27 | 26 | * When using Kitodo.Production the record identifier is saved only in MODS, but not |
@@ -24,8 +24,7 @@ discard block |
||
24 | 24 | * |
25 | 25 | * @access public |
26 | 26 | */ |
27 | -class ConfigurationForm |
|
28 | -{ |
|
27 | +class ConfigurationForm { |
|
29 | 28 | |
30 | 29 | /** |
31 | 30 | * Check if a connection to a Solr server could be established with the given credentials. |
@@ -60,8 +59,7 @@ discard block |
||
60 | 59 | * |
61 | 60 | * @return void |
62 | 61 | */ |
63 | - public function __construct() |
|
64 | - { |
|
62 | + public function __construct() { |
|
65 | 63 | // Load backend localization file. |
66 | 64 | Helper::getLanguageService()->includeLLFile('EXT:dlf/Resources/Private/Language/locallang_be.xlf'); |
67 | 65 | } |
@@ -29,8 +29,7 @@ |
||
29 | 29 | * |
30 | 30 | * @access public |
31 | 31 | */ |
32 | -class ItemsProcFunc implements LoggerAwareInterface |
|
33 | -{ |
|
32 | +class ItemsProcFunc implements LoggerAwareInterface { |
|
34 | 33 | use LoggerAwareTrait; |
35 | 34 | |
36 | 35 | /** |