Passed
Pull Request — master (#123)
by
unknown
09:15 queued 05:05
created
Classes/Domain/Repository/CollectionRepository.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
 
99 99
         // order by oai_name
100 100
         $query->setOrderings(
101
-            array('oai_name' => QueryInterface::ORDER_ASCENDING)
101
+            array ('oai_name' => QueryInterface::ORDER_ASCENDING)
102 102
         );
103 103
 
104 104
         return $query->execute();
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@
 block discarded – undo
28 28
  *
29 29
  * @access public
30 30
  */
31
-class CollectionRepository extends Repository
32
-{
31
+class CollectionRepository extends Repository {
33 32
     /**
34 33
      * @access protected
35 34
      * @var array Set the default ordering. This is applied to findAll(), too.
Please login to merge, or discard this patch.
Classes/Updates/MigrateSettings.php 3 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
      */
55 55
     public function getDescription(): string
56 56
     {
57
-        return 'This wizard migrates existing front end plugins of the extension Kitodo.Presentation (dlf) to' .
58
-            ' make use of the Extbase naming scheme. Therefore it updates the field values' .
57
+        return 'This wizard migrates existing front end plugins of the extension Kitodo.Presentation (dlf) to'.
58
+            ' make use of the Extbase naming scheme. Therefore it updates the field values'.
59 59
             ' "pi_flexform" within the tt_content table';
60 60
     }
61 61
 
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         foreach ($fields as $field) {
171 171
             // change the index attribute if it doesn't start with 'settings.' yet
172 172
             if (strpos($field['index'], 'settings.') === false) {
173
-                $field['index'] = 'settings.' . $field['index'];
173
+                $field['index'] = 'settings.'.$field['index'];
174 174
             }
175 175
         }
176 176
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@
 block discarded – undo
26 26
  *
27 27
  * @internal
28 28
  */
29
-class MigrateSettings implements UpgradeWizardInterface
30
-{
29
+class MigrateSettings implements UpgradeWizardInterface {
31 30
 
32 31
     /**
33 32
      * Return the identifier for this wizard
Please login to merge, or discard this patch.
Upper-Lower-Casing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -108,11 +108,11 @@  discard block
 block discarded – undo
108 108
 
109 109
             // exit if at least one update statement is not successful
110 110
             if (!((bool) $updateResult)) {
111
-                return false;
111
+                return FALSE;
112 112
             }
113 113
         }
114 114
 
115
-        return true;
115
+        return TRUE;
116 116
     }
117 117
 
118 118
     /**
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      */
127 127
     public function updateNecessary(): bool
128 128
     {
129
-        $oldSettingsFound = false;
129
+        $oldSettingsFound = FALSE;
130 130
 
131 131
         $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('tt_content');
132 132
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         // Update the found record sets
145 145
         while ($record = $statement->fetchAssociative()) {
146 146
             $oldSettingsFound = $this->checkForOldSettings($record['pi_flexform']);
147
-            if ($oldSettingsFound === true) {
147
+            if ($oldSettingsFound === TRUE) {
148 148
                 // We found at least one field to be updated --> break here
149 149
                 break;
150 150
             }
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 
188 188
         foreach ($fields as $field) {
189 189
             // change the index attribute if it doesn't start with 'settings.' yet
190
-            if (strpos($field['index'], 'settings.') === false) {
190
+            if (strpos($field['index'], 'settings.') === FALSE) {
191 191
                 $field['index'] = 'settings.' . $field['index'];
192 192
             }
193 193
         }
Please login to merge, or discard this patch.
Tests/routeFunctionalInstance.php 2 patches
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,10 +16,10 @@
 block discarded – undo
16 16
 
17 17
 if (!empty($matches)) {
18 18
     $root = realpath($_SERVER['DOCUMENT_ROOT'] . $matches[0]);
19
-    if ($root !== false) {
19
+    if ($root !== FALSE) {
20 20
         putenv('TYPO3_PATH_ROOT=' . $root);
21 21
         putenv('TYPO3_PATH_APP=' . $root);
22 22
     }
23 23
 }
24 24
 
25
-return false;
25
+return FALSE;
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@
 block discarded – undo
15 15
 preg_match("@.*/(?:acceptance|functional-[a-z\d]+)@", $_SERVER['REQUEST_URI'], $matches);
16 16
 
17 17
 if (!empty($matches)) {
18
-    $root = realpath($_SERVER['DOCUMENT_ROOT'] . $matches[0]);
18
+    $root = realpath($_SERVER['DOCUMENT_ROOT'].$matches[0]);
19 19
     if ($root !== false) {
20
-        putenv('TYPO3_PATH_ROOT=' . $root);
21
-        putenv('TYPO3_PATH_APP=' . $root);
20
+        putenv('TYPO3_PATH_ROOT='.$root);
21
+        putenv('TYPO3_PATH_APP='.$root);
22 22
     }
23 23
 }
24 24
 
Please login to merge, or discard this patch.
Tests/Functional/Api/PageViewProxyDisabledTest.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,12 +5,10 @@
 block discarded – undo
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, '', [
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 
8 8
 class PageViewProxyDisabledTest extends FunctionalTestCase
9 9
 {
10
-    protected $disableJsonWrappedResponse = true;
10
+    protected $disableJsonWrappedResponse = TRUE;
11 11
 
12 12
     protected function queryProxy(array $query, string $method = 'GET')
13 13
     {
Please login to merge, or discard this patch.
Tests/Functional/Repository/DocumentRepositoryTest.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,7 @@
 block discarded – undo
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
      */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@
 block discarded – undo
31 31
 
32 32
         $this->documentRepository = $this->initializeRepository(DocumentRepository::class, 20000);
33 33
 
34
-        $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/documents_1.csv');
35
-        $this->importDataSet(__DIR__ . '/../../Fixtures/Common/pages.xml');
36
-        $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/libraries.csv');
34
+        $this->importCSVDataSet(__DIR__.'/../../Fixtures/Common/documents_1.csv');
35
+        $this->importDataSet(__DIR__.'/../../Fixtures/Common/pages.xml');
36
+        $this->importCSVDataSet(__DIR__.'/../../Fixtures/Common/libraries.csv');
37 37
     }
38 38
 
39 39
     /**
Please login to merge, or discard this patch.
Build/Documentation/dbdocs/Generator.php 3 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
             // There may be a single non-signifying space after the doc-comment asterisk,
185 185
             // which is not included.
186
-            $text .= preg_replace('#\\s*/?[*/]*\\s?(.*)$#', '$1', $line) . "\n";
186
+            $text .= preg_replace('#\\s*/?[*/]*\\s?(.*)$#', '$1', $line)."\n";
187 187
         }
188 188
         $text = trim($text);
189 189
 
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 RST);
205 205
 
206 206
         // Sort tables alphabetically
207
-        usort($tables, function ($lhs, $rhs) {
207
+        usort($tables, function($lhs, $rhs) {
208 208
             return $lhs->name <=> $rhs->name;
209 209
         });
210 210
 
@@ -214,13 +214,13 @@  discard block
 block discarded – undo
214 214
             // Set header
215 215
             $header = $tableInfo->name;
216 216
             if (!empty($tableInfo->feComment)) {
217
-                $header .= ': ' . $tableInfo->feComment;
217
+                $header .= ': '.$tableInfo->feComment;
218 218
             }
219 219
             $section->setHeader($header);
220 220
 
221 221
             // Set introductory text of subsection
222 222
             if ($tableInfo->modelClass) {
223
-                $section->addText('Extbase domain model: ``' . $tableInfo->modelClass . '``');
223
+                $section->addText('Extbase domain model: ``'.$tableInfo->modelClass.'``');
224 224
             }
225 225
             $section->addText($tableInfo->classComment);
226 226
             $section->addText($tableInfo->sqlComment);
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
                 'description' => 'Description',
232 232
             ]];
233 233
 
234
-            $rows = array_map(function ($column) use ($page) {
234
+            $rows = array_map(function($column) use ($page) {
235 235
                 return [
236 236
                     'field' => (
237 237
                         $page->format($column->name, ['bold' => $column->isPrimary])
Please login to merge, or discard this patch.
Braces   +8 added lines, -16 removed lines patch added patch discarded remove patch
@@ -32,8 +32,7 @@  discard block
 block discarded – undo
32 32
  * @subpackage dlf
33 33
  * @access public
34 34
  */
35
-class Generator
36
-{
35
+class Generator {
37 36
     /**
38 37
      * @var LanguageService
39 38
      */
@@ -57,37 +56,32 @@  discard block
 block discarded – undo
57 56
     /**
58 57
      * @param LanguageService $languageService
59 58
      */
60
-    public function injectLanguageService(LanguageService $languageService)
61
-    {
59
+    public function injectLanguageService(LanguageService $languageService) {
62 60
         $this->languageService = $languageService;
63 61
     }
64 62
 
65 63
     /**
66 64
      * @param DataMapper $dataMapper
67 65
      */
68
-    public function injectDataMapper(DataMapper $dataMapper)
69
-    {
66
+    public function injectDataMapper(DataMapper $dataMapper) {
70 67
         $this->dataMapper = $dataMapper;
71 68
     }
72 69
 
73 70
     /**
74 71
      * @param SqlReader $sqlReader
75 72
      */
76
-    public function injectSqlReader(DataMapper $sqlReader)
77
-    {
73
+    public function injectSqlReader(DataMapper $sqlReader) {
78 74
         $this->sqlReader = $sqlReader;
79 75
     }
80 76
 
81 77
     /**
82 78
      * @param ConfigurationManager $configurationManager
83 79
      */
84
-    public function injectConfigurationManager(ConfigurationManager $configurationManager)
85
-    {
80
+    public function injectConfigurationManager(ConfigurationManager $configurationManager) {
86 81
         $this->configurationManager = $configurationManager;
87 82
     }
88 83
 
89
-    public function __construct()
90
-    {
84
+    public function __construct() {
91 85
 
92 86
     }
93 87
 
@@ -205,8 +199,7 @@  discard block
 block discarded – undo
205 199
         return $result;
206 200
     }
207 201
 
208
-    protected function parseDocComment($docComment)
209
-    {
202
+    protected function parseDocComment($docComment) {
210 203
         // TODO: Consider using phpDocumentor (though that splits the docblock into summary and description)
211 204
 
212 205
         // Adopted from DocCommentParser in TYPO3 v9
@@ -231,8 +224,7 @@  discard block
 block discarded – undo
231 224
     /**
232 225
      * Transform table structure into .rst page.
233 226
      */
234
-    public function generatePage(array $tables)
235
-    {
227
+    public function generatePage(array $tables) {
236 228
         $page = new RstSection();
237 229
         $page->setHeader('Database Tables');
238 230
         $page->addText(<<<RST
Please login to merge, or discard this patch.
Upper-Lower-Casing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      */
98 98
     public function collectTables(): array
99 99
     {
100
-        $sqlCode = $this->sqlReader->getTablesDefinitionString(true);
100
+        $sqlCode = $this->sqlReader->getTablesDefinitionString(TRUE);
101 101
         $createTableStatements = $this->sqlReader->getCreateTableStatementArray($sqlCode);
102 102
 
103 103
         $tableToClassName = $this->getTableClassMap();
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
                 continue;
114 114
             }
115 115
 
116
-            $className = $tableToClassName[$tableName] ?? null;
116
+            $className = $tableToClassName[$tableName] ?? NULL;
117 117
 
118 118
             $result[] = $this->getTableInfo($table, $className);
119 119
         }
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
         $isPrimary = [];
152 152
         if (!is_null($primaryKey = $table->getPrimaryKey())) {
153 153
             foreach ($primaryKey->getUnquotedColumns() as $primaryColumn) {
154
-                $isPrimary[$primaryColumn] = true;
154
+                $isPrimary[$primaryColumn] = TRUE;
155 155
             }
156 156
         }
157 157
 
@@ -172,14 +172,14 @@  discard block
 block discarded – undo
172 172
         $result = (object) [
173 173
             'name' => $tableName,
174 174
             'columns' => $columns,
175
-            'modelClass' => null,
175
+            'modelClass' => NULL,
176 176
             'sqlComment' => $table->getComment() ?? '',
177 177
             'classComment' => '',
178 178
             'feComment' => $this->languageService->sL($GLOBALS['TCA'][$tableName]['ctrl']['title'] ?? ''),
179 179
         ];
180 180
 
181 181
         // Integrate doc-comments from model class and its fields
182
-        if ($className !== null) {
182
+        if ($className !== NULL) {
183 183
             $reflection = new ReflectionClass($className);
184 184
 
185 185
             $dataMap = $this->dataMapper->getDataMap($className);
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
                 // In that case, try to guess the column name from the property name.
190 190
 
191 191
                 $column = $dataMap->getColumnMap($property->getName());
192
-                $columnName = $column === null
192
+                $columnName = $column === NULL
193 193
                     ? GeneralUtility::camelCaseToLowerCaseUnderscored($property->getName())
194 194
                     : $column->getColumnName();
195 195
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         $lines = explode("\n", $docComment);
216 216
         foreach ($lines as $line) {
217 217
             // Stop parsing at first tag
218
-            if ($line !== '' && strpos($line, '@') !== false) {
218
+            if ($line !== '' && strpos($line, '@') !== FALSE) {
219 219
                 break;
220 220
             }
221 221
 
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 This is a reference of all database tables defined by Kitodo.Presentation.
240 240
 
241 241
 .. tip:: This page is auto-generated. If you would like to edit it, please use doc-comments in the model class, COMMENT fields in ``ext_tables.sql`` if the table does not have one, or TCA labels. Then, you may re-generate the page by running ``composer docs:db`` inside the Kitodo.Presentation base folder.
242
-RST);
242
+rst);
243 243
 
244 244
         // Sort tables alphabetically
245 245
         usort($tables, function ($lhs, $rhs) {
@@ -274,11 +274,11 @@  discard block
 block discarded – undo
274 274
                     'field' => (
275 275
                         $page->format($column->name, ['bold' => $column->isPrimary])
276 276
                         . "\u{00a0}\u{00a0}"
277
-                        . $page->format($column->type->getName(), ['italic' => true])
277
+                        . $page->format($column->type->getName(), ['italic' => TRUE])
278 278
                     ),
279 279
 
280 280
                     'description' => $page->paragraphs([
281
-                        $page->format($column->feComment, ['italic' => true]),
281
+                        $page->format($column->feComment, ['italic' => TRUE]),
282 282
                         $column->fieldComment,
283 283
                         $column->sqlComment,
284 284
                     ]),
Please login to merge, or discard this patch.
Classes/Eid/PageViewProxy.php 2 patches
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -140,11 +140,11 @@
 block discarded – undo
140 140
                 // For performance, don't download content up-front. Rather, we'll
141 141
                 // download and upload simultaneously.
142 142
                 // https://docs.guzzlephp.org/en/6.5/request-options.html#stream
143
-                'stream' => true,
143
+                'stream' => TRUE,
144 144
 
145 145
                 // Don't throw exceptions when a non-success status code is
146 146
                 // received. We handle these manually.
147
-                'http_errors' => false,
147
+                'http_errors' => FALSE,
148 148
             ]);
149 149
         } catch (\Exception $e) {
150 150
             return new JsonResponse(['message' => 'Could not fetch resource of given URL.'], 500);
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,8 +34,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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', 'general');
62 60
     }
Please login to merge, or discard this patch.
Classes/Controller/StatisticsController.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,13 +33,13 @@
 block discarded – undo
33 33
         $foundNumbers = $this->documentRepository->getStatisticsForSelectedCollection($this->settings);
34 34
 
35 35
         // Set replacements.
36
-        $args['###TITLES###'] = $foundNumbers['titles'] . ' ' . htmlspecialchars(
36
+        $args['###TITLES###'] = $foundNumbers['titles'].' '.htmlspecialchars(
37 37
             LocalizationUtility::translate(
38 38
                 ($foundNumbers['titles'] > 1 ? 'titles' : 'title'), 'dlf'
39 39
             )
40 40
         );
41 41
 
42
-        $args['###VOLUMES###'] = $foundNumbers['volumes'] . ' ' . htmlspecialchars(
42
+        $args['###VOLUMES###'] = $foundNumbers['volumes'].' '.htmlspecialchars(
43 43
             LocalizationUtility::translate(
44 44
                 ($foundNumbers['volumes'] > 1 ? 'volumes' : 'volume'), 'dlf'
45 45
             )
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@
 block discarded – undo
21 21
  *
22 22
  * @access public
23 23
  */
24
-class StatisticsController extends AbstractController
25
-{
24
+class StatisticsController extends AbstractController {
26 25
     /**
27 26
      * The main method of the plugin
28 27
      *
Please login to merge, or discard this patch.
Tests/Functional/Api/OaiPmhTest.php 3 patches
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
 class OaiPmhTest extends FunctionalTestCase
16 16
 {
17
-    protected $disableJsonWrappedResponse = true;
17
+    protected $disableJsonWrappedResponse = TRUE;
18 18
 
19 19
     protected $coreExtensionsToLoad = [
20 20
         'fluid',
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
     protected function setUpOaiSolr()
57 57
     {
58 58
         // Setup Solr only once for all tests in this suite
59
-        static $solr = null;
59
+        static $solr = NULL;
60 60
 
61
-        if ($solr === null) {
61
+        if ($solr === NULL) {
62 62
             $coreName = Solr::createCore();
63 63
             $solr = Solr::getInstance($coreName);
64 64
 
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         $this->expectExceptionMessage('empty list');
162 162
 
163 163
         $oai = Endpoint::build($this->oaiUrl);
164
-        $result = $oai->listRecords('mets', null, (new DateTime())->setDate(1900, 1, 1));
164
+        $result = $oai->listRecords('mets', NULL, (new DateTime())->setDate(1900, 1, 1));
165 165
 
166 166
         $result->current();
167 167
     }
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -51,15 +51,15 @@  discard block
 block discarded – undo
51 51
     {
52 52
         parent::setUp();
53 53
 
54
-        $this->oaiUrl = $this->baseUrl . 'index.php?id=' . $this->oaiPage;
55
-        $this->oaiUrlNoStoragePid = $this->baseUrl . 'index.php?id=' . $this->oaiPageNoStoragePid;
54
+        $this->oaiUrl = $this->baseUrl.'index.php?id='.$this->oaiPage;
55
+        $this->oaiUrlNoStoragePid = $this->baseUrl.'index.php?id='.$this->oaiPageNoStoragePid;
56 56
 
57
-        $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/documents_1.csv');
58
-        $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/metadata.csv');
59
-        $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/libraries.csv');
60
-        $this->importCSVDataSet(__DIR__ . '/../../Fixtures/Common/pages.csv');
61
-        $this->importDataSet(__DIR__ . '/../../Fixtures/OaiPmh/pages.xml');
62
-        $this->importCSVDataSet(__DIR__ . '/../../Fixtures/OaiPmh/solrcores.csv');
57
+        $this->importCSVDataSet(__DIR__.'/../../Fixtures/Common/documents_1.csv');
58
+        $this->importCSVDataSet(__DIR__.'/../../Fixtures/Common/metadata.csv');
59
+        $this->importCSVDataSet(__DIR__.'/../../Fixtures/Common/libraries.csv');
60
+        $this->importCSVDataSet(__DIR__.'/../../Fixtures/Common/pages.csv');
61
+        $this->importDataSet(__DIR__.'/../../Fixtures/OaiPmh/pages.xml');
62
+        $this->importCSVDataSet(__DIR__.'/../../Fixtures/OaiPmh/solrcores.csv');
63 63
 
64 64
         $this->solrCoreRepository = $this->initializeRepository(SolrCoreRepository::class, 20000);
65 65
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             $coreName = Solr::createCore();
76 76
             $solr = Solr::getInstance($coreName);
77 77
 
78
-            $this->importSolrDocuments($solr, __DIR__ . '/../../Fixtures/Common/documents_1.solr.json');
78
+            $this->importSolrDocuments($solr, __DIR__.'/../../Fixtures/Common/documents_1.solr.json');
79 79
         }
80 80
 
81 81
         $oaiCoreModel = $this->solrCoreRepository->findByUid(11001);
Please login to merge, or discard this patch.
Braces   +14 added lines, -28 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@  discard block
 block discarded – undo
21 21
 use Phpoaipmh\Exception\OaipmhException;
22 22
 use SimpleXMLElement;
23 23
 
24
-class OaiPmhTest extends FunctionalTestCase
25
-{
24
+class OaiPmhTest extends FunctionalTestCase {
26 25
     protected $disableJsonWrappedResponse = true;
27 26
 
28 27
     protected $coreExtensionsToLoad = [
@@ -66,8 +65,7 @@  discard block
 block discarded – undo
66 65
         $this->setUpOaiSolr();
67 66
     }
68 67
 
69
-    protected function setUpOaiSolr()
70
-    {
68
+    protected function setUpOaiSolr() {
71 69
         // Setup Solr only once for all tests in this suite
72 70
         static $solr = null;
73 71
 
@@ -87,8 +85,7 @@  discard block
 block discarded – undo
87 85
     /**
88 86
      * @test
89 87
      */
90
-    public function correctlyRespondsOnBadVerb()
91
-    {
88
+    public function correctlyRespondsOnBadVerb() {
92 89
         $client = new HttpClient();
93 90
         $response = $client->get($this->baseUrl, [
94 91
             'query' => [
@@ -113,8 +110,7 @@  discard block
 block discarded – undo
113 110
     /**
114 111
      * @test
115 112
      */
116
-    public function canIdentify()
117
-    {
113
+    public function canIdentify() {
118 114
         $oai = Endpoint::build($this->oaiUrl);
119 115
         $identity = $oai->identify();
120 116
 
@@ -127,8 +123,7 @@  discard block
 block discarded – undo
127 123
     /**
128 124
      * @test
129 125
      */
130
-    public function identifyGivesFallbackDatestampWhenNoDocuments()
131
-    {
126
+    public function identifyGivesFallbackDatestampWhenNoDocuments() {
132 127
         $oai = Endpoint::build($this->oaiUrlNoStoragePid);
133 128
         $identity = $oai->identify();
134 129
 
@@ -138,8 +133,7 @@  discard block
 block discarded – undo
138 133
     /**
139 134
      * @test
140 135
      */
141
-    public function canListMetadataFormats()
142
-    {
136
+    public function canListMetadataFormats() {
143 137
         $oai = Endpoint::build($this->oaiUrl);
144 138
         $formats = $oai->listMetadataFormats();
145 139
 
@@ -154,8 +148,7 @@  discard block
 block discarded – undo
154 148
     /**
155 149
      * @test
156 150
      */
157
-    public function canListRecords()
158
-    {
151
+    public function canListRecords() {
159 152
         $oai = Endpoint::build($this->oaiUrl);
160 153
         $result = $oai->listRecords('mets');
161 154
 
@@ -168,8 +161,7 @@  discard block
 block discarded – undo
168 161
     /**
169 162
      * @test
170 163
      */
171
-    public function noRecordsUntil1900()
172
-    {
164
+    public function noRecordsUntil1900() {
173 165
         $this->expectException(OaipmhException::class);
174 166
         $this->expectExceptionMessage('empty list');
175 167
 
@@ -182,8 +174,7 @@  discard block
 block discarded – undo
182 174
     /**
183 175
      * @test
184 176
      */
185
-    public function canUseResumptionToken()
186
-    {
177
+    public function canUseResumptionToken() {
187 178
         // NOTE: cursor and expirationDate are optional by the specification,
188 179
         //       but we include them in our implementation
189 180
 
@@ -241,8 +232,7 @@  discard block
 block discarded – undo
241 232
     /**
242 233
      * @test
243 234
      */
244
-    public function noResumptionTokenForCompleteList()
245
-    {
235
+    public function noResumptionTokenForCompleteList() {
246 236
         $client = new HttpClient();
247 237
 
248 238
         foreach (['ListIdentifiers', 'ListRecords'] as $verb) {
@@ -264,8 +254,7 @@  discard block
 block discarded – undo
264 254
     /**
265 255
      * @test
266 256
      */
267
-    public function canListAndResumeIdentifiers()
268
-    {
257
+    public function canListAndResumeIdentifiers() {
269 258
         $oai = Endpoint::build($this->oaiUrl);
270 259
         $result = $oai->listIdentifiers('mets');
271 260
 
@@ -278,18 +267,15 @@  discard block
 block discarded – undo
278 267
         self::assertEquals('oai:de:slub-dresden:db:id-476248086', $record->identifier);
279 268
     }
280 269
 
281
-    protected function parseUtc(string $dateTime)
282
-    {
270
+    protected function parseUtc(string $dateTime) {
283 271
         return DateTime::createFromFormat('Y-m-d\TH:i:s\Z', $dateTime);
284 272
     }
285 273
 
286
-    protected function assertUtcDateString(string $dateTime)
287
-    {
274
+    protected function assertUtcDateString(string $dateTime) {
288 275
         self::assertInstanceOf(DateTime::class, $this->parseUtc($dateTime));
289 276
     }
290 277
 
291
-    protected function assertInFuture(string $dateTime)
292
-    {
278
+    protected function assertInFuture(string $dateTime) {
293 279
         self::assertGreaterThan(new DateTime(), $this->parseUtc($dateTime));
294 280
     }
295 281
 }
Please login to merge, or discard this patch.