@@ -57,7 +57,7 @@ |
||
57 | 57 | } |
58 | 58 | $dmdIds = explode(' ', $id); |
59 | 59 | foreach ($dmdIds as $dmdId) { |
60 | - $recordIds = $xml->xpath('//mets:dmdSec[@ID="' . $dmdId . '"]//mods:mods/mods:recordInfo/mods:recordIdentifier'); |
|
60 | + $recordIds = $xml->xpath('//mets:dmdSec[@ID="'.$dmdId.'"]//mods:mods/mods:recordInfo/mods:recordIdentifier'); |
|
61 | 61 | if (!empty($recordIds)) { |
62 | 62 | $record_id = (string) $recordIds[0]; |
63 | 63 | break; |
@@ -20,8 +20,7 @@ discard block |
||
20 | 20 | * @subpackage dlf |
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 |
@@ -34,8 +33,7 @@ discard block |
||
34 | 33 | * |
35 | 34 | * @return void |
36 | 35 | */ |
37 | - public function construct_postProcessRecordId(\SimpleXMLElement &$xml, &$record_id) |
|
38 | - { |
|
36 | + public function construct_postProcessRecordId(\SimpleXMLElement &$xml, &$record_id) { |
|
39 | 37 | if (!$record_id) { |
40 | 38 | $xml->registerXPathNamespace('mods', 'http://www.loc.gov/mods/v3'); |
41 | 39 | // Get all logical structure nodes with metadata, but without associated METS-Pointers. |
@@ -82,7 +82,7 @@ |
||
82 | 82 | } |
83 | 83 | // Append "valueURI" to name using Unicode unit separator. |
84 | 84 | if (isset($authors[$i]['valueURI'])) { |
85 | - $metadata['author'][$i] .= chr(31) . (string) $authors[$i]['valueURI']; |
|
85 | + $metadata['author'][$i] .= chr(31).(string) $authors[$i]['valueURI']; |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 | } |
@@ -32,8 +32,7 @@ |
||
32 | 32 | * |
33 | 33 | * @return void |
34 | 34 | */ |
35 | - public function extractMetadata(\SimpleXMLElement $xml, array &$metadata) |
|
36 | - { |
|
35 | + public function extractMetadata(\SimpleXMLElement $xml, array &$metadata) { |
|
37 | 36 | $xml->registerXPathNamespace('mods', 'http://www.loc.gov/mods/v3'); |
38 | 37 | // Get "author" and "author_sorting". |
39 | 38 | $authors = $xml->xpath('./mods:name[./mods:role/mods:roleTerm[@type="code" and @authority="marcrelator"]="aut"]'); |
@@ -21,8 +21,7 @@ |
||
21 | 21 | * @access public |
22 | 22 | * @abstract |
23 | 23 | */ |
24 | -interface FulltextInterface |
|
25 | -{ |
|
24 | +interface FulltextInterface { |
|
26 | 25 | /** |
27 | 26 | * This extracts raw fulltext data from XML |
28 | 27 | * |
@@ -21,8 +21,7 @@ |
||
21 | 21 | * @access public |
22 | 22 | * @abstract |
23 | 23 | */ |
24 | -interface MetadataInterface |
|
25 | -{ |
|
24 | +interface MetadataInterface { |
|
26 | 25 | /** |
27 | 26 | * This extracts metadata from XML |
28 | 27 | * |
@@ -25,8 +25,7 @@ discard block |
||
25 | 25 | * @subpackage dlf |
26 | 26 | * @access public |
27 | 27 | */ |
28 | -class IiifUrlReader implements UrlReaderInterface |
|
29 | -{ |
|
28 | +class IiifUrlReader implements UrlReaderInterface { |
|
30 | 29 | /** |
31 | 30 | * Singleton instance of the class |
32 | 31 | * |
@@ -40,8 +39,7 @@ discard block |
||
40 | 39 | * {@inheritDoc} |
41 | 40 | * @see \Ubl\Iiif\Tools\UrlReaderInterface::getContent() |
42 | 41 | */ |
43 | - public function getContent($url) |
|
44 | - { |
|
42 | + public function getContent($url) { |
|
45 | 43 | $fileContents = GeneralUtility::getUrl($url); |
46 | 44 | if ($fileContents !== false) { |
47 | 45 | return $fileContents; |
@@ -57,8 +55,7 @@ discard block |
||
57 | 55 | * |
58 | 56 | * @return IiifUrlReader |
59 | 57 | */ |
60 | - public static function getInstance() |
|
61 | - { |
|
58 | + public static function getInstance() { |
|
62 | 59 | if (!isset(self::$instance)) { |
63 | 60 | self::$instance = new IiifUrlReader(); |
64 | 61 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | protected function getClass(FlashMessage $flashMessage): string |
67 | 67 | { |
68 | - return 'alert-' . self::$classes[$flashMessage->getSeverity()]; |
|
68 | + return 'alert-'.self::$classes[$flashMessage->getSeverity()]; |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
@@ -95,19 +95,19 @@ discard block |
||
95 | 95 | $markup[] = '<div class="typo3-messages">'; |
96 | 96 | foreach ($flashMessages as $flashMessage) { |
97 | 97 | $messageTitle = $flashMessage->getTitle(); |
98 | - $markup[] = '<div class="alert ' . htmlspecialchars($this->getClass($flashMessage)) . '">'; |
|
98 | + $markup[] = '<div class="alert '.htmlspecialchars($this->getClass($flashMessage)).'">'; |
|
99 | 99 | $markup[] = ' <div class="media">'; |
100 | 100 | $markup[] = ' <div class="media-left">'; |
101 | 101 | $markup[] = ' <span class="fa-stack fa-lg">'; |
102 | 102 | $markup[] = ' <i class="fa fa-circle fa-stack-2x"></i>'; |
103 | - $markup[] = ' <i class="fa fa-' . htmlspecialchars($this->getIconName($flashMessage)) . ' fa-stack-1x"></i>'; |
|
103 | + $markup[] = ' <i class="fa fa-'.htmlspecialchars($this->getIconName($flashMessage)).' fa-stack-1x"></i>'; |
|
104 | 104 | $markup[] = ' </span>'; |
105 | 105 | $markup[] = ' </div>'; |
106 | 106 | $markup[] = ' <div class="media-body">'; |
107 | 107 | if ($messageTitle !== '') { |
108 | - $markup[] = ' <h4 class="alert-title">' . htmlspecialchars($messageTitle) . '</h4>'; |
|
108 | + $markup[] = ' <h4 class="alert-title">'.htmlspecialchars($messageTitle).'</h4>'; |
|
109 | 109 | } |
110 | - $markup[] = ' <p class="alert-message">' . $flashMessage->getMessage() . '</p>'; |
|
110 | + $markup[] = ' <p class="alert-message">'.$flashMessage->getMessage().'</p>'; |
|
111 | 111 | $markup[] = ' </div>'; |
112 | 112 | $markup[] = ' </div>'; |
113 | 113 | $markup[] = '</div>'; |
@@ -23,10 +23,8 @@ |
||
23 | 23 | * @subpackage dlf |
24 | 24 | * @access public |
25 | 25 | */ |
26 | -class DocumentTypeProvider extends AbstractProvider |
|
27 | -{ |
|
28 | - public function __construct() |
|
29 | - { |
|
26 | +class DocumentTypeProvider extends AbstractProvider { |
|
27 | + public function __construct() { |
|
30 | 28 | $this->expressionLanguageProviders = [ |
31 | 29 | DocumentTypeFunctionProvider::class |
32 | 30 | ]; |
@@ -24,8 +24,7 @@ |
||
24 | 24 | * @subpackage dlf |
25 | 25 | * @access public |
26 | 26 | */ |
27 | -class SolrCoreStatus extends AbstractNode |
|
28 | -{ |
|
27 | +class SolrCoreStatus extends AbstractNode { |
|
29 | 28 | /** |
30 | 29 | * Shows Solr core status for given 'index_name' |
31 | 30 | * |
@@ -55,7 +55,7 @@ |
||
55 | 55 | $uptimeInSeconds = floor($response->getUptime() / 1000); |
56 | 56 | $dateTimeFrom = new \DateTime('@0'); |
57 | 57 | $dateTimeTo = new \DateTime("@$uptimeInSeconds"); |
58 | - $uptime = $dateTimeFrom->diff($dateTimeTo)->format('%a ' . Helper::getLanguageService()->getLL('flash.days') . ', %H:%I:%S'); |
|
58 | + $uptime = $dateTimeFrom->diff($dateTimeTo)->format('%a '.Helper::getLanguageService()->getLL('flash.days').', %H:%I:%S'); |
|
59 | 59 | $numDocuments = $response->getNumberOfDocuments(); |
60 | 60 | $startTime = $response->getStartTime() ? strftime('%c', $response->getStartTime()->getTimestamp()) : 'N/A'; |
61 | 61 | $lastModified = $response->getLastModified() ? strftime('%c', $response->getLastModified()->getTimestamp()) : 'N/A'; |
@@ -23,8 +23,7 @@ |
||
23 | 23 | * @subpackage dlf |
24 | 24 | * @access public |
25 | 25 | */ |
26 | -class EditInProductionWarning extends AbstractNode |
|
27 | -{ |
|
26 | +class EditInProductionWarning extends AbstractNode { |
|
28 | 27 | /** |
29 | 28 | * Generates warning message when editing 'index_name' field |
30 | 29 | * |