@@ -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]; |
@@ -6,19 +6,16 @@ |
||
| 6 | 6 | use Kitodo\Dlf\Tests\Functional\FunctionalTestCase; |
| 7 | 7 | use TYPO3\CMS\Core\Utility\GeneralUtility; |
| 8 | 8 | |
| 9 | -class PageViewProxyTest extends FunctionalTestCase |
|
| 10 | -{ |
|
| 9 | +class PageViewProxyTest extends FunctionalTestCase { |
|
| 11 | 10 | protected $disableJsonWrappedResponse = true; |
| 12 | 11 | |
| 13 | - protected function getDlfConfiguration() |
|
| 14 | - { |
|
| 12 | + protected function getDlfConfiguration() { |
|
| 15 | 13 | return array_merge(parent::getDlfConfiguration(), [ |
| 16 | 14 | 'enableInternalProxy' => true, |
| 17 | 15 | ]); |
| 18 | 16 | } |
| 19 | 17 | |
| 20 | - protected function queryProxy(array $query, string $method = 'GET') |
|
| 21 | - { |
|
| 18 | + protected function queryProxy(array $query, string $method = 'GET') { |
|
| 22 | 19 | $query['eID'] = 'tx_dlf_pageview_proxy'; |
| 23 | 20 | |
| 24 | 21 | return $this->httpClient->request($method, '', [ |
@@ -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 | */ |
@@ -34,8 +34,7 @@ discard block |
||
| 34 | 34 | * |
| 35 | 35 | * @access public |
| 36 | 36 | */ |
| 37 | -class PageViewProxy |
|
| 38 | -{ |
|
| 37 | +class PageViewProxy { |
|
| 39 | 38 | /** |
| 40 | 39 | * @access protected |
| 41 | 40 | * @var RequestFactory |
@@ -55,8 +54,7 @@ discard block |
||
| 55 | 54 | * |
| 56 | 55 | * @return void |
| 57 | 56 | */ |
| 58 | - public function __construct() |
|
| 59 | - { |
|
| 57 | + public function __construct() { |
|
| 60 | 58 | $this->requestFactory = GeneralUtility::makeInstance(RequestFactory::class); |
| 61 | 59 | $this->extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('dlf'); |
| 62 | 60 | } |
@@ -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 |