@@ -382,7 +382,10 @@ discard block |
||
382 | 382 | <?php if ($hasMinorProblems): ?> |
383 | 383 | <h2>Recommendations</h2> |
384 | 384 | <p> |
385 | - <?php if ($hasMajorProblems): ?>Additionally, to<?php else: ?>To<?php endif; ?> enhance your Symfony experience, |
|
385 | + <?php if ($hasMajorProblems): ?>Additionally, to<?php else { |
|
386 | + : ?>To<?php endif; |
|
387 | +} |
|
388 | +?> enhance your Symfony experience, |
|
386 | 389 | it’s recommended that you fix the following: |
387 | 390 | </p> |
388 | 391 | <ol> |
@@ -398,9 +401,12 @@ discard block |
||
398 | 401 | <p id="phpini">* |
399 | 402 | <?php if ($symfonyRequirements->getPhpIniConfigPath()): ?> |
400 | 403 | Changes to the <strong>php.ini</strong> file must be done in "<strong><?php echo $symfonyRequirements->getPhpIniConfigPath() ?></strong>". |
401 | - <?php else: ?> |
|
404 | + <?php else { |
|
405 | + : ?> |
|
402 | 406 | To change settings, create a "<strong>php.ini</strong>". |
403 | - <?php endif; ?> |
|
407 | + <?php endif; |
|
408 | +} |
|
409 | +?> |
|
404 | 410 | </p> |
405 | 411 | <?php endif; ?> |
406 | 412 |
@@ -22,7 +22,7 @@ |
||
22 | 22 | exit('This script is only accessible from localhost.'); |
23 | 23 | } |
24 | 24 | |
25 | -require_once dirname(__FILE__).'/../var/SymfonyRequirements.php'; |
|
25 | +require_once dirname(__FILE__) . '/../var/SymfonyRequirements.php'; |
|
26 | 26 | |
27 | 27 | $symfonyRequirements = new SymfonyRequirements(); |
28 | 28 |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | { |
80 | 80 | $this->mockObjects['importTwine']->expects($this->once()) |
81 | 81 | ->method('run') |
82 | - ->will($this->returnCallback(function ($importfile) { |
|
82 | + ->will($this->returnCallback(function($importfile) { |
|
83 | 83 | return $importfile->getFilename() === 'somefile_readable_exists.html' |
84 | 84 | && $importfile->getLicenseeId() === 'licenseeId' |
85 | 85 | && $importfile->getAuthor() === 'someauthor' |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | { |
152 | 152 | $this->mockObjects['importTwine']->expects($this->once()) |
153 | 153 | ->method('run') |
154 | - ->will($this->returnCallback(function ($importfile) { |
|
154 | + ->will($this->returnCallback(function($importfile) { |
|
155 | 155 | return $importfile->getFilename() === 'somefile_readable_exists.html' |
156 | 156 | && $importfile->getLicenseeId() === 'licenseeId' |
157 | 157 | && $importfile->getAuthor() === 'someauthor' |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | $hitch['status'] = Textnode::HITCH_STATUS_ACTIVE; |
184 | 184 | $this->textnode->appendHitch($hitch); |
185 | 185 | |
186 | - $result = $this->textnode->getHitch($this->textnode->getHitchCount() - 1); |
|
186 | + $result = $this->textnode->getHitch($this->textnode->getHitchCount()-1); |
|
187 | 187 | |
188 | 188 | $this->assertFalse(is_null($result)); |
189 | 189 | |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | */ |
281 | 281 | public function testAppendHitchMoreThanMaximum() |
282 | 282 | { |
283 | - for ($i = 0; $i < Textnode::HITCHES_MAXIMUM_COUNT + 1; $i++) { |
|
283 | + for ($i = 0; $i < Textnode::HITCHES_MAXIMUM_COUNT+1; $i++) { |
|
284 | 284 | $hitch = array(); |
285 | 285 | $hitch['textnodeId'] = $i; |
286 | 286 | $hitch['description'] = "Continue."; |
@@ -311,12 +311,12 @@ discard block |
||
311 | 311 | $hitch['textnodeId'] = "55f5ab3708985c4b188b4578"; |
312 | 312 | $hitch['description'] = "Abort."; |
313 | 313 | $hitch['status'] = Textnode::HITCH_STATUS_INACTIVE; |
314 | - $result = $this->textnode->setHitch($this->textnode->getHitchCount() - 1, $hitch); |
|
314 | + $result = $this->textnode->setHitch($this->textnode->getHitchCount()-1, $hitch); |
|
315 | 315 | |
316 | 316 | $this->assertTrue($result); |
317 | 317 | $this->assertEquals($this->textnode->getHitchCount(), 1); |
318 | 318 | |
319 | - $result = $this->textnode->getHitch($this->textnode->getHitchCount() - 1); |
|
319 | + $result = $this->textnode->getHitch($this->textnode->getHitchCount()-1); |
|
320 | 320 | |
321 | 321 | $this->assertFalse(is_null($result)); |
322 | 322 | |
@@ -367,7 +367,7 @@ discard block |
||
367 | 367 | $hitch = array(); |
368 | 368 | $hitch['description'] = "Abort."; |
369 | 369 | $hitch['status'] = Textnode::HITCH_STATUS_INACTIVE; |
370 | - $result = $this->textnode->setHitch($this->textnode->getHitchCount() - 1, $hitch); |
|
370 | + $result = $this->textnode->setHitch($this->textnode->getHitchCount()-1, $hitch); |
|
371 | 371 | |
372 | 372 | $this->assertFalse($result); |
373 | 373 | } |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | $hitch = array(); |
389 | 389 | $hitch['textnodeId'] = "55f5ab3708985c4b188b4578"; |
390 | 390 | $hitch['status'] = Textnode::HITCH_STATUS_INACTIVE; |
391 | - $result = $this->textnode->setHitch($this->textnode->getHitchCount() - 1, $hitch); |
|
391 | + $result = $this->textnode->setHitch($this->textnode->getHitchCount()-1, $hitch); |
|
392 | 392 | |
393 | 393 | $this->assertFalse($result); |
394 | 394 | } |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | $hitch = array(); |
410 | 410 | $hitch['textnodeId'] = "55f5ab3708985c4b188b4578"; |
411 | 411 | $hitch['description'] = "Abort."; |
412 | - $result = $this->textnode->setHitch($this->textnode->getHitchCount() - 1, $hitch); |
|
412 | + $result = $this->textnode->setHitch($this->textnode->getHitchCount()-1, $hitch); |
|
413 | 413 | |
414 | 414 | $this->assertFalse($result); |
415 | 415 | } |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | $hitch['textnodeId'] = null; |
432 | 432 | $hitch['description'] = "Abort."; |
433 | 433 | $hitch['status'] = Textnode::HITCH_STATUS_INACTIVE; |
434 | - $result = $this->textnode->setHitch($this->textnode->getHitchCount() - 1, $hitch); |
|
434 | + $result = $this->textnode->setHitch($this->textnode->getHitchCount()-1, $hitch); |
|
435 | 435 | |
436 | 436 | $this->assertFalse($result); |
437 | 437 | } |
@@ -449,7 +449,7 @@ discard block |
||
449 | 449 | $this->assertTrue($this->textnode->appendHitch($hitch)); |
450 | 450 | $this->assertEquals($this->textnode->getHitchCount(), 1); |
451 | 451 | |
452 | - $this->assertTrue($this->textnode->removeHitch($this->textnode->getHitchCount() - 1)); |
|
452 | + $this->assertTrue($this->textnode->removeHitch($this->textnode->getHitchCount()-1)); |
|
453 | 453 | $this->assertEquals($this->textnode->getHitchCount(), 0); |
454 | 454 | } |
455 | 455 |
@@ -68,7 +68,7 @@ |
||
68 | 68 | |
69 | 69 | $readpathRepositoryMock->expects($this->once()) |
70 | 70 | ->method('save') |
71 | - ->willReturnCallback(function (ReadpathDocument $readpathDocument) use ($textnodeMockId, $userMockId) { |
|
71 | + ->willReturnCallback(function(ReadpathDocument $readpathDocument) use ($textnodeMockId, $userMockId) { |
|
72 | 72 | $this->assertInstanceOf(ReadpathDocument::class, $readpathDocument); |
73 | 73 | $this->assertEquals($textnodeMockId, $readpathDocument->getTextnodeId()); |
74 | 74 | $this->assertEquals($userMockId, $readpathDocument->getUserId()); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | $options = getopt($shortOptions, $longOptions); |
27 | 27 | |
28 | 28 | if (array_key_exists('help', $options)) { |
29 | - echo "dembelo install script, ".file_get_contents('./files/version')."\n"; |
|
29 | + echo "dembelo install script, " . file_get_contents('./files/version') . "\n"; |
|
30 | 30 | echo "\n"; |
31 | 31 | echo "options:\n"; |
32 | 32 | echo " -u\tuser for chmod (for example: www-data)\n"; |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | } |
36 | 36 | |
37 | 37 | $url = 'https://api.github.com/repos/typearea/dembelo/releases'; |
38 | -$data = shell_exec('curl '.$url); |
|
38 | +$data = shell_exec('curl ' . $url); |
|
39 | 39 | |
40 | 40 | $releases = json_decode($data); |
41 | 41 | |
@@ -66,36 +66,36 @@ discard block |
||
66 | 66 | if (file_exists("files/version")) { |
67 | 67 | $installedVersion = trim(file_get_contents("files/version")); |
68 | 68 | if ($installedVersion === $newVersion) { |
69 | - echo 'latest version ['.$installedVersion.'] already installed. exit' . "\n"; |
|
69 | + echo 'latest version [' . $installedVersion . '] already installed. exit' . "\n"; |
|
70 | 70 | exit(1); |
71 | 71 | } |
72 | 72 | } |
73 | 73 | |
74 | -echo 'download '.$downloadUrl."...\n"; |
|
75 | -shell_exec('wget -q '.$downloadUrl); |
|
76 | -echo 'finished'."\n"; |
|
74 | +echo 'download ' . $downloadUrl . "...\n"; |
|
75 | +shell_exec('wget -q ' . $downloadUrl); |
|
76 | +echo 'finished' . "\n"; |
|
77 | 77 | |
78 | -echo 'extract '.$downloadName."...\n"; |
|
79 | -shell_exec('unzip -o '.$downloadName); |
|
80 | -echo 'finished'."\n"; |
|
78 | +echo 'extract ' . $downloadName . "...\n"; |
|
79 | +shell_exec('unzip -o ' . $downloadName); |
|
80 | +echo 'finished' . "\n"; |
|
81 | 81 | |
82 | 82 | if (array_key_exists('u', $options)) { |
83 | - echo 'chown to '.$options['u']."...\n"; |
|
84 | - shell_exec('chown -R '.$options['u']. ' www/'); |
|
83 | + echo 'chown to ' . $options['u'] . "...\n"; |
|
84 | + shell_exec('chown -R ' . $options['u'] . ' www/'); |
|
85 | 85 | } |
86 | 86 | |
87 | -echo 'clearing cache '."...\n"; |
|
87 | +echo 'clearing cache ' . "...\n"; |
|
88 | 88 | shell_exec('cd www && php bin/console cache:clear --env=prod'); |
89 | 89 | shell_exec('cd www && php bin/console assetic:dump --env=prod'); |
90 | -echo 'finished'."\n"; |
|
90 | +echo 'finished' . "\n"; |
|
91 | 91 | |
92 | -echo 'prepare some apache stuff'."\n"; |
|
92 | +echo 'prepare some apache stuff' . "\n"; |
|
93 | 93 | shell_exec('cp files/apache/htaccess www/web/.htaccess'); |
94 | 94 | if (array_key_exists('u', $options)) { |
95 | 95 | shell_exec('chown ' . $options['u'] . ' www/web/.htaccess'); |
96 | 96 | } |
97 | -echo 'finished'."\n"; |
|
97 | +echo 'finished' . "\n"; |
|
98 | 98 | |
99 | -shell_exec('rm '.$downloadName); |
|
100 | -echo 'installation ['.$newVersion.'] finished'."\n"; |
|
99 | +shell_exec('rm ' . $downloadName); |
|
100 | +echo 'installation [' . $newVersion . '] finished' . "\n"; |
|
101 | 101 | exit(0); |
102 | 102 | \ No newline at end of file |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | use Symfony\Component\HttpFoundation\Request; |
4 | 4 | |
5 | -$loader = require __DIR__.'/../vendor/autoload.php'; |
|
5 | +$loader = require __DIR__ . '/../vendor/autoload.php'; |
|
6 | 6 | |
7 | 7 | $kernel = new AppKernel('prod', false); |
8 | 8 | //$kernel->loadClassCache(); |
@@ -17,7 +17,7 @@ |
||
17 | 17 | //exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.'); |
18 | 18 | } |
19 | 19 | |
20 | -$loader = require __DIR__.'/../vendor/autoload.php'; |
|
20 | +$loader = require __DIR__ . '/../vendor/autoload.php'; |
|
21 | 21 | Debug::enable(); |
22 | 22 | |
23 | 23 | $kernel = new AppKernel('dev', true); |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | $fileHandler = fopen($filenameExtracted, "rb"); |
103 | 103 | |
104 | 104 | if ($fileHandler === false) { |
105 | - throw new Exception("Couldn't open file '".$this->importfile->getFilename()."'"); |
|
105 | + throw new Exception("Couldn't open file '" . $this->importfile->getFilename() . "'"); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | $this->xmlParser = xml_parser_create("UTF-8"); |
@@ -130,12 +130,12 @@ discard block |
||
130 | 130 | throw new Exception('no filename available'); |
131 | 131 | } |
132 | 132 | |
133 | - $extractedFile = $this->importfile->getFilename().'.extracted'; |
|
133 | + $extractedFile = $this->importfile->getFilename() . '.extracted'; |
|
134 | 134 | |
135 | 135 | $fileHandle = fopen($this->importfile->getFilename(), 'r'); |
136 | 136 | $extractedFileHandle = fopen($extractedFile, 'w'); |
137 | 137 | if ($fileHandle === false) { |
138 | - throw new Exception("Failed to read data from file '".$this->importfile->getFilename()."'."); |
|
138 | + throw new Exception("Failed to read data from file '" . $this->importfile->getFilename() . "'."); |
|
139 | 139 | } |
140 | 140 | $writing = false; |
141 | 141 | $matches = array(); |
@@ -168,13 +168,13 @@ discard block |
||
168 | 168 | $peekData = fread($fileHandler, 1024); |
169 | 169 | |
170 | 170 | if ($peekData === false) { |
171 | - throw new Exception("Failed to read data from file '".$this->importfile->getFilename()."'."); |
|
171 | + throw new Exception("Failed to read data from file '" . $this->importfile->getFilename() . "'."); |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | $peekDataLength = strlen($peekData); |
175 | 175 | |
176 | 176 | if ($peekDataLength <= 0) { |
177 | - throw new Exception("File '".$this->importfile->getFilename()."' seems to be empty."); |
|
177 | + throw new Exception("File '" . $this->importfile->getFilename() . "' seems to be empty."); |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | for ($i = 0; $i < $peekDataLength; $i++) { |
@@ -186,22 +186,22 @@ discard block |
||
186 | 186 | continue; |
187 | 187 | } |
188 | 188 | |
189 | - if ($peekDataLength - $i < $magicStringLength) { |
|
190 | - throw new Exception("File '".$this->importfile->getFilename()."' isn't a Twine archive file."); |
|
189 | + if ($peekDataLength-$i < $magicStringLength) { |
|
190 | + throw new Exception("File '" . $this->importfile->getFilename() . "' isn't a Twine archive file."); |
|
191 | 191 | } |
192 | 192 | |
193 | 193 | if (substr($peekData, $i, $magicStringLength) !== $magicString) { |
194 | - throw new Exception("File '".$this->importfile->getFilename()."' isn't a Twine archive file."); |
|
194 | + throw new Exception("File '" . $this->importfile->getFilename() . "' isn't a Twine archive file."); |
|
195 | 195 | } |
196 | 196 | |
197 | 197 | if (fseek($fileHandler, 0) !== 0) { |
198 | - throw new Exception("Couldn't reset reading position after the magic string in the Twine archive file '".$this->importfile->getFilename()."' was checked."); |
|
198 | + throw new Exception("Couldn't reset reading position after the magic string in the Twine archive file '" . $this->importfile->getFilename() . "' was checked."); |
|
199 | 199 | } |
200 | 200 | |
201 | 201 | return true; |
202 | 202 | } |
203 | 203 | |
204 | - throw new Exception("File '".$this->importfile->getFilename()."' doesn't seem to be a Twine archive file."); |
|
204 | + throw new Exception("File '" . $this->importfile->getFilename() . "' doesn't seem to be a Twine archive file."); |
|
205 | 205 | } |
206 | 206 | |
207 | 207 | private function initParser($fileHandler) |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | $errorCode = xml_get_error_code($this->xmlParser); |
222 | 222 | $errorDescription = xml_error_string($errorCode); |
223 | 223 | |
224 | - throw new Exception("Error #".$errorCode.": '".$errorDescription."' occurred while the envelope head for the Twine archive was parsed."); |
|
224 | + throw new Exception("Error #" . $errorCode . ": '" . $errorDescription . "' occurred while the envelope head for the Twine archive was parsed."); |
|
225 | 225 | } |
226 | 226 | |
227 | 227 | do { |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | $errorColumnNumber = xml_get_current_column_number($this->xmlParser); |
238 | 238 | $errorByteIndex = xml_get_current_byte_index($this->xmlParser); |
239 | 239 | |
240 | - throw new Exception("Error #".$errorCode.": '".$errorDescription."' occurred while parsing the Twine archive file '".$this->importfile->getFilename()."' in line ".$errorRowNumber.", character ".$errorColumnNumber." (at byte index ".$errorByteIndex.")."); |
|
240 | + throw new Exception("Error #" . $errorCode . ": '" . $errorDescription . "' occurred while parsing the Twine archive file '" . $this->importfile->getFilename() . "' in line " . $errorRowNumber . ", character " . $errorColumnNumber . " (at byte index " . $errorByteIndex . ")."); |
|
241 | 241 | } |
242 | 242 | } while (feof($fileHandler) === false); |
243 | 243 | |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | $errorCode = xml_get_error_code($this->xmlParser); |
246 | 246 | $errorDescription = xml_error_string($errorCode); |
247 | 247 | |
248 | - throw new Exception("Error #".$errorCode.": '".$errorDescription."' occurred while the envelope foot for the Twine archive was parsed."); |
|
248 | + throw new Exception("Error #" . $errorCode . ": '" . $errorDescription . "' occurred while the envelope foot for the Twine archive was parsed."); |
|
249 | 249 | } |
250 | 250 | |
251 | 251 | $this->parserFree(); |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | private function startElementStoryData($name, array $attrs) |
262 | 262 | { |
263 | 263 | if ($this->twineRelevant === true) { |
264 | - throw new Exception("Nested '".$name."' found in Twine archive file '".$this->importfile->getFilename()."'."); |
|
264 | + throw new Exception("Nested '" . $name . "' found in Twine archive file '" . $this->importfile->getFilename() . "'."); |
|
265 | 265 | } |
266 | 266 | |
267 | 267 | if (isset($attrs['startnode']) !== true) { |
@@ -273,13 +273,13 @@ discard block |
||
273 | 273 | } |
274 | 274 | |
275 | 275 | if (isset($attrs['name']) !== true) { |
276 | - throw new Exception("There is a '".$name."' in the Twine archive file '".$this->importfile->getFilename()."' which is missing its 'name' attribute."); |
|
276 | + throw new Exception("There is a '" . $name . "' in the Twine archive file '" . $this->importfile->getFilename() . "' which is missing its 'name' attribute."); |
|
277 | 277 | } |
278 | 278 | |
279 | 279 | $twineStory = explode("-->", $attrs['name'], 2); |
280 | 280 | |
281 | 281 | if (count($twineStory) !== 2) { |
282 | - throw new Exception("There is a '".$name."' in the Twine archive file '".$this->importfile->getFilename()."' which has an incomplete 'name' attribute. Twine stories must use the naming schema '?-->story name', where '?' is an existing Dembelo Topic Id. Instead, '".$attrs['name']."' was found."); |
|
282 | + throw new Exception("There is a '" . $name . "' in the Twine archive file '" . $this->importfile->getFilename() . "' which has an incomplete 'name' attribute. Twine stories must use the naming schema '?-->story name', where '?' is an existing Dembelo Topic Id. Instead, '" . $attrs['name'] . "' was found."); |
|
283 | 283 | } |
284 | 284 | |
285 | 285 | $this->topicId = $twineStory[0]; |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | $topic = $this->topicRepository->find($this->topicId); |
288 | 288 | |
289 | 289 | if (is_null($topic)) { |
290 | - throw new Exception("The Dembelo Topic with Id '".$this->topicId."', referenced by Twine story '".$attrs['name']."' in the Twine archive file '".$this->importfile->getFilename()."', doesn't exist."); |
|
290 | + throw new Exception("The Dembelo Topic with Id '" . $this->topicId . "', referenced by Twine story '" . $attrs['name'] . "' in the Twine archive file '" . $this->importfile->getFilename() . "', doesn't exist."); |
|
291 | 291 | } |
292 | 292 | |
293 | 293 | $this->twineStartnodeId = $attrs['startnode']; |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | private function getTwineId($tagString, $textnodeTitle) |
299 | 299 | { |
300 | 300 | if (empty($tagString) || !is_string($tagString)) { |
301 | - throw new Exception('no ID given for Textnode "'.$textnodeTitle.'"'); |
|
301 | + throw new Exception('no ID given for Textnode "' . $textnodeTitle . '"'); |
|
302 | 302 | } |
303 | 303 | $tagArray = explode(" ", $tagString); |
304 | 304 | |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | } |
312 | 312 | |
313 | 313 | if ($twineId === false) { |
314 | - throw new Exception('no ID given for Textnode "'.$textnodeTitle.'"'); |
|
314 | + throw new Exception('no ID given for Textnode "' . $textnodeTitle . '"'); |
|
315 | 315 | } |
316 | 316 | |
317 | 317 | return $twineId; |
@@ -320,21 +320,21 @@ discard block |
||
320 | 320 | private function startElementPassageData($name, $attrs) |
321 | 321 | { |
322 | 322 | if ($this->twineText !== false) { |
323 | - throw new Exception("Nested '".$name."' found in Twine archive file '".$this->importfile->getFilename()."'."); |
|
323 | + throw new Exception("Nested '" . $name . "' found in Twine archive file '" . $this->importfile->getFilename() . "'."); |
|
324 | 324 | } |
325 | 325 | |
326 | 326 | if (isset($attrs['pid']) !== true) { |
327 | - throw new Exception("There is a '".$name."' in the Twine archive file '".$this->importfile->getFilename()."' which is missing its 'pid' attribute."); |
|
327 | + throw new Exception("There is a '" . $name . "' in the Twine archive file '" . $this->importfile->getFilename() . "' which is missing its 'pid' attribute."); |
|
328 | 328 | } |
329 | 329 | |
330 | 330 | if (is_numeric($attrs['pid']) !== true) { |
331 | - throw new Exception("There is a '".$name."' in the Twine archive file '".$this->importfile->getFilename()."' which hasn't a numeric value in its 'pid' attribute ('".$attrs['pid']."' was found instead)."); |
|
331 | + throw new Exception("There is a '" . $name . "' in the Twine archive file '" . $this->importfile->getFilename() . "' which hasn't a numeric value in its 'pid' attribute ('" . $attrs['pid'] . "' was found instead)."); |
|
332 | 332 | } |
333 | 333 | |
334 | 334 | $this->twineId = $this->getTwineId($attrs['tags'], $attrs['name']); |
335 | 335 | |
336 | 336 | if (array_key_exists($this->twineId, $this->textnodeMapping) === true) { |
337 | - throw new Exception("There is a '".$name."' in the Twine archive file '".$this->importfile->getFilename()."' which has a non unique 'id' tag [".$this->twineId."], in node '".$attrs['name']."'"); |
|
337 | + throw new Exception("There is a '" . $name . "' in the Twine archive file '" . $this->importfile->getFilename() . "' which has a non unique 'id' tag [" . $this->twineId . "], in node '" . $attrs['name'] . "'"); |
|
338 | 338 | } |
339 | 339 | |
340 | 340 | $this->twineTextnodeName = $attrs['name']; |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | $this->textnode->setAccess(true); |
367 | 367 | $this->accessSet = true; |
368 | 368 | } else { |
369 | - throw new Exception("There is more than one '".$name."' in the Twine archive file '".$this->importfile->getFilename()."' with the startnode value '".$attrs['pid']."' in its 'pid' attribute."); |
|
369 | + throw new Exception("There is more than one '" . $name . "' in the Twine archive file '" . $this->importfile->getFilename() . "' with the startnode value '" . $attrs['pid'] . "' in its 'pid' attribute."); |
|
370 | 370 | } |
371 | 371 | } else { |
372 | 372 | $this->textnode->setAccess(false); |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | private function characterData($parser, $data) |
388 | 388 | { |
389 | 389 | if ($this->twineRelevant === true && $this->twineText === true) { |
390 | - $this->textnode->setText($this->textnode->getText().$data); |
|
390 | + $this->textnode->setText($this->textnode->getText() . $data); |
|
391 | 391 | } |
392 | 392 | } |
393 | 393 | |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | $twineName = array_search($dembeloId, $this->nodeNameMapping); |
399 | 399 | |
400 | 400 | if (is_null($textnode) === true) { |
401 | - throw new Exception("The Dembelo Textnode with Id '".$dembeloId."' doesn't exist, but should by now."); |
|
401 | + throw new Exception("The Dembelo Textnode with Id '" . $dembeloId . "' doesn't exist, but should by now."); |
|
402 | 402 | } |
403 | 403 | |
404 | 404 | /** @todo The links should be exported as XML as well instead of a custom Twine inline format. */ |
@@ -410,13 +410,13 @@ discard block |
||
410 | 410 | $textnodeTextNew = substr($textnodeText, 0, $startPos); |
411 | 411 | |
412 | 412 | while ($startPos !== false) { |
413 | - $endPos = strpos($textnodeText, "]]", $startPos + strlen("[[")); |
|
413 | + $endPos = strpos($textnodeText, "]]", $startPos+strlen("[[")); |
|
414 | 414 | |
415 | 415 | if ($endPos === false) { |
416 | - throw new Exception("The Twine archive file '".$this->importfile->getFilename()."' has a textnode named '".$twineName."' which contains a malformed link that starts with '[[' but has no corresponding ']]'."); |
|
416 | + throw new Exception("The Twine archive file '" . $this->importfile->getFilename() . "' has a textnode named '" . $twineName . "' which contains a malformed link that starts with '[[' but has no corresponding ']]'."); |
|
417 | 417 | } |
418 | 418 | |
419 | - $content = substr($textnodeText, $startPos + strlen("[["), $endPos - ($startPos + strlen("[["))); |
|
419 | + $content = substr($textnodeText, $startPos+strlen("[["), $endPos-($startPos+strlen("[["))); |
|
420 | 420 | $hitch = null; |
421 | 421 | $metadata = null; |
422 | 422 | |
@@ -424,13 +424,13 @@ discard block |
||
424 | 424 | $content = explode("-->", $content, 2); |
425 | 425 | |
426 | 426 | if (strlen($content[0]) <= 0 || strlen($content[1]) <= 0) { |
427 | - throw new Exception("The Twine archive file '".$this->importfile->getFilename()."' contains a '".$name."' with the invalid element '[[".$content[0]."-->".$content[1]."]]'."); |
|
427 | + throw new Exception("The Twine archive file '" . $this->importfile->getFilename() . "' contains a '" . $name . "' with the invalid element '[[" . $content[0] . "-->" . $content[1] . "]]'."); |
|
428 | 428 | } |
429 | 429 | |
430 | 430 | $externalTextnode = $this->textnodeRepository->find($content[1]); |
431 | 431 | |
432 | 432 | if (is_null($externalTextnode)) { |
433 | - throw new Exception("There is a textnode named '".$twineName."' which references the external Dembelo Textnode '".$content[1]."', but a Dembelo Textnode with such an Id doesn't exist."); |
|
433 | + throw new Exception("There is a textnode named '" . $twineName . "' which references the external Dembelo Textnode '" . $content[1] . "', but a Dembelo Textnode with such an Id doesn't exist."); |
|
434 | 434 | } |
435 | 435 | |
436 | 436 | $hitch = array(); |
@@ -441,11 +441,11 @@ discard block |
||
441 | 441 | $content = explode("->", $content, 2); |
442 | 442 | |
443 | 443 | if (strlen($content[0]) <= 0 || strlen($content[1]) <= 0) { |
444 | - throw new Exception("The Twine archive file contains a '".$name."' with the invalid element '[[".$content[0]."->".$content[1]."]]'."); |
|
444 | + throw new Exception("The Twine archive file contains a '" . $name . "' with the invalid element '[[" . $content[0] . "->" . $content[1] . "]]'."); |
|
445 | 445 | } |
446 | 446 | |
447 | 447 | if (array_key_exists($content[1], $this->nodeNameMapping) !== true) { |
448 | - throw new Exception("There is a textnode which references another textnode named '".$content[1]."', but this textnode doesn't exist within the same story."); |
|
448 | + throw new Exception("There is a textnode which references another textnode named '" . $content[1] . "', but this textnode doesn't exist within the same story."); |
|
449 | 449 | } |
450 | 450 | |
451 | 451 | $hitch = array(); |
@@ -456,12 +456,12 @@ discard block |
||
456 | 456 | $content = explode("<-", $content, 2); |
457 | 457 | |
458 | 458 | if (strlen($content[0]) <= 0 || strlen($content[1]) <= 0) { |
459 | - throw new Exception("The Twine archive file '".$this->importfile->getFilename()."' contains a '".$name."' with the invalid element '[[".$content[0]."<-".$content[1]."]]'."); |
|
459 | + throw new Exception("The Twine archive file '" . $this->importfile->getFilename() . "' contains a '" . $name . "' with the invalid element '[[" . $content[0] . "<-" . $content[1] . "]]'."); |
|
460 | 460 | } |
461 | 461 | |
462 | 462 | if (array_key_exists($content[0], $this->nodeNameMapping) !== true) { |
463 | 463 | var_dump($this->nodeNameMapping); |
464 | - throw new Exception("There is a textnode in the Twine archive file which references another textnode named '".$content[0]."', but this textnode doesn't exist within the same story."); |
|
464 | + throw new Exception("There is a textnode in the Twine archive file which references another textnode named '" . $content[0] . "', but this textnode doesn't exist within the same story."); |
|
465 | 465 | } |
466 | 466 | |
467 | 467 | $hitch = array(); |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | $content = explode(">:<", $content, 2); |
473 | 473 | |
474 | 474 | if (strlen($content[0]) <= 0 || strlen($content[1]) <= 0) { |
475 | - throw new Exception("The Twine archive file contains a '".$name."' with the invalid element '[[".$content[0].">:<".$content[1]."]]'."); |
|
475 | + throw new Exception("The Twine archive file contains a '" . $name . "' with the invalid element '[[" . $content[0] . ">:<" . $content[1] . "]]'."); |
|
476 | 476 | } |
477 | 477 | |
478 | 478 | $metadata = $textnode->getMetadata(); |
@@ -482,17 +482,17 @@ discard block |
||
482 | 482 | } |
483 | 483 | |
484 | 484 | if (array_key_exists($content[0], $metadata) === true) { |
485 | - throw new Exception("There is a textnode in the Twine archive file which contains the metadata field '".$content[0]."' twice or would overwrite the already existing value of that field."); |
|
485 | + throw new Exception("There is a textnode in the Twine archive file which contains the metadata field '" . $content[0] . "' twice or would overwrite the already existing value of that field."); |
|
486 | 486 | } |
487 | 487 | |
488 | 488 | $metadata[$content[0]] = $content[1]; |
489 | 489 | } else { |
490 | 490 | if (strlen($content) <= 0) { |
491 | - throw new Exception("The Twine archive file contains a '".$name."' with the invalid element '[[".$content."]]'."); |
|
491 | + throw new Exception("The Twine archive file contains a '" . $name . "' with the invalid element '[[" . $content . "]]'."); |
|
492 | 492 | } |
493 | 493 | |
494 | 494 | if (array_key_exists($content, $this->nodeNameMapping) !== true) { |
495 | - throw new Exception("There is a textnode in the Twine archive file which references another textnode named '".$content."', but this textnode doesn't exist within the same story."); |
|
495 | + throw new Exception("There is a textnode in the Twine archive file which references another textnode named '" . $content . "', but this textnode doesn't exist within the same story."); |
|
496 | 496 | } |
497 | 497 | |
498 | 498 | $hitch = array(); |
@@ -503,11 +503,11 @@ discard block |
||
503 | 503 | |
504 | 504 | if ($hitch !== null) { |
505 | 505 | if ($textnode->getHitchCount() >= Textnode::HITCHES_MAXIMUM_COUNT) { |
506 | - throw new Exception("There is a textnode named '".$twineName."' in the Twine archive file which has more than ".Textnode::HITCHES_MAXIMUM_COUNT." links."); |
|
506 | + throw new Exception("There is a textnode named '" . $twineName . "' in the Twine archive file which has more than " . Textnode::HITCHES_MAXIMUM_COUNT . " links."); |
|
507 | 507 | } |
508 | 508 | |
509 | 509 | if ($textnode->appendHitch($hitch) !== true) { |
510 | - throw new Exception("Failed to append hitch for the textnode named '".$twineName."' from the Twine archive file."); |
|
510 | + throw new Exception("Failed to append hitch for the textnode named '" . $twineName . "' from the Twine archive file."); |
|
511 | 511 | } |
512 | 512 | } |
513 | 513 | |
@@ -519,7 +519,7 @@ discard block |
||
519 | 519 | $startPos = strpos($textnodeText, "[[", $endPos); |
520 | 520 | |
521 | 521 | if ($startPos !== false) { |
522 | - $textnodeTextNew .= substr($textnodeText, $endPos, $startPos - $endPos); |
|
522 | + $textnodeTextNew .= substr($textnodeText, $endPos, $startPos-$endPos); |
|
523 | 523 | } else { |
524 | 524 | $textnodeTextNew .= substr($textnodeText, $endPos); |
525 | 525 | } |
@@ -265,8 +265,8 @@ discard block |
||
265 | 265 | |
266 | 266 | self::$freadStack = [ |
267 | 267 | '<tw-storydata ', |
268 | - '<tw-storydata name="someTopicId-->someStoryName" startnode="1" creator="Twine" creator-version="2.0.8" ifid="8E30D51C-4980-4161-B57F-B11C752E879A" format="Harlowe" options=""><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style>'."\n", |
|
269 | - '<script role="script" id="twine-user-script" type="text/twine-javascript"></script>'."\n", |
|
268 | + '<tw-storydata name="someTopicId-->someStoryName" startnode="1" creator="Twine" creator-version="2.0.8" ifid="8E30D51C-4980-4161-B57F-B11C752E879A" format="Harlowe" options=""><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style>' . "\n", |
|
269 | + '<script role="script" id="twine-user-script" type="text/twine-javascript"></script>' . "\n", |
|
270 | 270 | '<tw-passagedata pid="1" name="someNodeName" tags="Freigegeben ID:foobar" position="104,30">lorem impsum', |
271 | 271 | 'lorem impsum</tw-passagedata></tw-storydata>', |
272 | 272 | ]; |
@@ -310,8 +310,8 @@ discard block |
||
310 | 310 | |
311 | 311 | self::$freadStack = [ |
312 | 312 | '<tw-storydata ', |
313 | - '<tw-storydata name="someTopicId-->someStoryName" startnode="1" creator="Twine" creator-version="2.0.8" ifid="8E30D51C-4980-4161-B57F-B11C752E879A" format="Harlowe" options=""><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style>'."\n", |
|
314 | - '<script role="script" id="twine-user-script" type="text/twine-javascript"></script>'."\n", |
|
313 | + '<tw-storydata name="someTopicId-->someStoryName" startnode="1" creator="Twine" creator-version="2.0.8" ifid="8E30D51C-4980-4161-B57F-B11C752E879A" format="Harlowe" options=""><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style>' . "\n", |
|
314 | + '<script role="script" id="twine-user-script" type="text/twine-javascript"></script>' . "\n", |
|
315 | 315 | '<tw-passagedata pid="1" name="someNodeName1" tags="Freigegeben ID:foobar" position="104,30">lorem ipsum', |
316 | 316 | 'lorem ipsum</tw-passagedata></tw-storydata>', |
317 | 317 | ]; |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | |
331 | 331 | $textnodeRepository->expects($this->once()) |
332 | 332 | ->method('save') |
333 | - ->with($this->callback(function ($textnode) { |
|
333 | + ->with($this->callback(function($textnode) { |
|
334 | 334 | return $textnode instanceof Textnode |
335 | 335 | && $textnode->getText() === "lorem ipsumlorem ipsum"; |
336 | 336 | })); |
@@ -355,8 +355,8 @@ discard block |
||
355 | 355 | |
356 | 356 | self::$freadStack = [ |
357 | 357 | '<tw-storydata ', |
358 | - '<tw-storydata name="someTopicId-->someStoryName" startnode="1" creator="Twine" creator-version="2.0.8" ifid="8E30D51C-4980-4161-B57F-B11C752E879A" format="Harlowe" options=""><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style>'."\n", |
|
359 | - '<script role="script" id="twine-user-script" type="text/twine-javascript"></script>'."\n", |
|
358 | + '<tw-storydata name="someTopicId-->someStoryName" startnode="1" creator="Twine" creator-version="2.0.8" ifid="8E30D51C-4980-4161-B57F-B11C752E879A" format="Harlowe" options=""><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style>' . "\n", |
|
359 | + '<script role="script" id="twine-user-script" type="text/twine-javascript"></script>' . "\n", |
|
360 | 360 | '<tw-passagedata pid="1" name="someNodeName1" tags="Freigegeben ID:foobar" position="104,30">lorem ipsum', |
361 | 361 | 'lorem ipsum</tw-passagedata></tw-storydata>', |
362 | 362 | ]; |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | |
377 | 377 | $textnodeRepository->expects($this->any()) |
378 | 378 | ->method('save') |
379 | - ->with($this->callback(function ($textnode) { |
|
379 | + ->with($this->callback(function($textnode) { |
|
380 | 380 | return $textnode instanceof Textnode |
381 | 381 | && $textnode->getText() === "lorem ipsumlorem ipsum"; |
382 | 382 | })); |
@@ -435,8 +435,8 @@ discard block |
||
435 | 435 | |
436 | 436 | self::$freadStack = [ |
437 | 437 | '<tw-storydata ', |
438 | - '<tw-storydata name="someTopicId-->someStoryName" startnode="1" creator="Twine" creator-version="2.0.8" ifid="8E30D51C-4980-4161-B57F-B11C752E879A" format="Harlowe" options=""><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style>'."\n", |
|
439 | - '<script role="script" id="twine-user-script" type="text/twine-javascript"></script>'."\n", |
|
438 | + '<tw-storydata name="someTopicId-->someStoryName" startnode="1" creator="Twine" creator-version="2.0.8" ifid="8E30D51C-4980-4161-B57F-B11C752E879A" format="Harlowe" options=""><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style>' . "\n", |
|
439 | + '<script role="script" id="twine-user-script" type="text/twine-javascript"></script>' . "\n", |
|
440 | 440 | '<tw-passagedata pid="1" name="someNodeName1" tags="Freigegeben" position="104,30">lorem ipsum', |
441 | 441 | 'lorem ipsum</tw-passagedata></tw-storydata>', |
442 | 442 | ]; |
@@ -473,8 +473,8 @@ discard block |
||
473 | 473 | |
474 | 474 | self::$freadStack = [ |
475 | 475 | '<tw-storydata ', |
476 | - '<tw-storydata name="someTopicId-->someStoryName" startnode="1" creator="Twine" creator-version="2.0.8" ifid="8E30D51C-4980-4161-B57F-B11C752E879A" format="Harlowe" options=""><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style>'."\n", |
|
477 | - '<script role="script" id="twine-user-script" type="text/twine-javascript"></script>'."\n", |
|
476 | + '<tw-storydata name="someTopicId-->someStoryName" startnode="1" creator="Twine" creator-version="2.0.8" ifid="8E30D51C-4980-4161-B57F-B11C752E879A" format="Harlowe" options=""><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style>' . "\n", |
|
477 | + '<script role="script" id="twine-user-script" type="text/twine-javascript"></script>' . "\n", |
|
478 | 478 | '<tw-passagedata pid="1" name="someNodeName1" tags="" position="104,30">lorem ipsum', |
479 | 479 | 'lorem ipsum</tw-passagedata></tw-storydata>', |
480 | 480 | ]; |
@@ -511,8 +511,8 @@ discard block |
||
511 | 511 | |
512 | 512 | self::$freadStack = [ |
513 | 513 | '<tw-storydata ', |
514 | - '<tw-storydata name="someTopicId-->someStoryName" startnode="1" creator="Twine" creator-version="2.0.8" ifid="8E30D51C-4980-4161-B57F-B11C752E879A" format="Harlowe" options=""><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style>'."\n", |
|
515 | - '<script role="script" id="twine-user-script" type="text/twine-javascript"></script>'."\n", |
|
514 | + '<tw-storydata name="someTopicId-->someStoryName" startnode="1" creator="Twine" creator-version="2.0.8" ifid="8E30D51C-4980-4161-B57F-B11C752E879A" format="Harlowe" options=""><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style>' . "\n", |
|
515 | + '<script role="script" id="twine-user-script" type="text/twine-javascript"></script>' . "\n", |
|
516 | 516 | '<tw-passagedata pid="1" name="someNodeName1" tags="Freigegeben ID:foobar" position="104,30">lorem ipsum', |
517 | 517 | 'lorem ipsum</tw-passagedata></tw-storydata>', |
518 | 518 | ]; |
@@ -550,8 +550,8 @@ discard block |
||
550 | 550 | |
551 | 551 | self::$freadStack = [ |
552 | 552 | '<tw-storydata ', |
553 | - '<tw-storydata name="someTopicId-->someStoryName" startnode="1" creator="Twine" creator-version="2.0.8" ifid="8E30D51C-4980-4161-B57F-B11C752E879A" format="Harlowe" options=""><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style>'."\n", |
|
554 | - '<script role="script" id="twine-user-script" type="text/twine-javascript"></script>'."\n", |
|
553 | + '<tw-storydata name="someTopicId-->someStoryName" startnode="1" creator="Twine" creator-version="2.0.8" ifid="8E30D51C-4980-4161-B57F-B11C752E879A" format="Harlowe" options=""><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style>' . "\n", |
|
554 | + '<script role="script" id="twine-user-script" type="text/twine-javascript"></script>' . "\n", |
|
555 | 555 | '<tw-passagedata pid="1" name="someNodeName1" tags="Freigegeben ID:foobar" position="104,30">lorem ipsum', |
556 | 556 | 'lorem ipsum</tw-passagedata></tw-storydata>', |
557 | 557 | ]; |
@@ -591,8 +591,8 @@ discard block |
||
591 | 591 | |
592 | 592 | self::$freadStack = [ |
593 | 593 | '<tw-storydata ', |
594 | - '<tw-storydata name="someTopicId-->someStoryName" startnode="1" creator="Twine" creator-version="2.0.8" ifid="8E30D51C-4980-4161-B57F-B11C752E879A" format="Harlowe" options=""><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style>'."\n", |
|
595 | - '<script role="script" id="twine-user-script" type="text/twine-javascript"></script>'."\n", |
|
594 | + '<tw-storydata name="someTopicId-->someStoryName" startnode="1" creator="Twine" creator-version="2.0.8" ifid="8E30D51C-4980-4161-B57F-B11C752E879A" format="Harlowe" options=""><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style>' . "\n", |
|
595 | + '<script role="script" id="twine-user-script" type="text/twine-javascript"></script>' . "\n", |
|
596 | 596 | '<tw-passagedata pid="1" name="someNodeName1" tags="Freigegeben ID:foobar" position="104,30">lorem ipsum', |
597 | 597 | 'lorem ipsum</tw-passagedata></tw-storydata>', |
598 | 598 | ]; |
@@ -636,8 +636,8 @@ discard block |
||
636 | 636 | |
637 | 637 | self::$freadStack = [ |
638 | 638 | '<tw-storydata ', |
639 | - '<tw-storydata name="someTopicId-->someStoryName" startnode="1" creator="Twine" creator-version="2.0.8" ifid="8E30D51C-4980-4161-B57F-B11C752E879A" format="Harlowe" options=""><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style>'."\n", |
|
640 | - '<script role="script" id="twine-user-script" type="text/twine-javascript"></script>'."\n", |
|
639 | + '<tw-storydata name="someTopicId-->someStoryName" startnode="1" creator="Twine" creator-version="2.0.8" ifid="8E30D51C-4980-4161-B57F-B11C752E879A" format="Harlowe" options=""><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style>' . "\n", |
|
640 | + '<script role="script" id="twine-user-script" type="text/twine-javascript"></script>' . "\n", |
|
641 | 641 | '<tw-passagedata pid="1" name="someNodeName1" tags="ID:someTwineId" position="104,30">lorem ipsum', |
642 | 642 | 'lorem ipsum</tw-passagedata>', |
643 | 643 | '<tw-passagedata pid="2" name="someNodeName2" tags="ID:someTwineId" position="104,30">lorem ipsum', |
@@ -677,8 +677,8 @@ discard block |
||
677 | 677 | |
678 | 678 | self::$freadStack = [ |
679 | 679 | '<tw-storydata ', |
680 | - '<tw-storydata name="someTopicId-->someStoryName" startnode="1" creator="Twine" creator-version="2.0.8" ifid="8E30D51C-4980-4161-B57F-B11C752E879A" format="Harlowe" options=""><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style>'."\n", |
|
681 | - '<script role="script" id="twine-user-script" type="text/twine-javascript"></script>'."\n", |
|
680 | + '<tw-storydata name="someTopicId-->someStoryName" startnode="1" creator="Twine" creator-version="2.0.8" ifid="8E30D51C-4980-4161-B57F-B11C752E879A" format="Harlowe" options=""><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style>' . "\n", |
|
681 | + '<script role="script" id="twine-user-script" type="text/twine-javascript"></script>' . "\n", |
|
682 | 682 | '<tw-passagedata pid="1" name="someNodeName1" tags="ID:someTwineId1" position="104,30">lorem ipsum', |
683 | 683 | 'lorem ipsum [[Linkdata->someNodeName3]]</tw-passagedata>', |
684 | 684 | '</tw-storydata>', |
@@ -717,8 +717,8 @@ discard block |
||
717 | 717 | |
718 | 718 | self::$freadStack = [ |
719 | 719 | '<tw-storydata ', |
720 | - '<tw-storydata name="someTopicId-->someStoryName" startnode="1" creator="Twine" creator-version="2.0.8" ifid="8E30D51C-4980-4161-B57F-B11C752E879A" format="Harlowe" options=""><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style>'."\n", |
|
721 | - '<script role="script" id="twine-user-script" type="text/twine-javascript"></script>'."\n", |
|
720 | + '<tw-storydata name="someTopicId-->someStoryName" startnode="1" creator="Twine" creator-version="2.0.8" ifid="8E30D51C-4980-4161-B57F-B11C752E879A" format="Harlowe" options=""><style role="stylesheet" id="twine-user-stylesheet" type="text/twine-css"></style>' . "\n", |
|
721 | + '<script role="script" id="twine-user-script" type="text/twine-javascript"></script>' . "\n", |
|
722 | 722 | '<tw-passagedata pid="1" name="someNodeName1" tags="ID:someTwineId1" position="104,30">lorem ipsum', |
723 | 723 | 'lorem ipsum [[Linkdata->someNodeName2]]</tw-passagedata>', |
724 | 724 | '<tw-passagedata pid="2" name="someNodeName2" tags="ID:someTwineId2" position="104,30">lorem ipsum', |
@@ -745,9 +745,9 @@ discard block |
||
745 | 745 | |
746 | 746 | $textnodeRepository->expects($this->any()) |
747 | 747 | ->method('save') |
748 | - ->willReturnCallback(function ($textnode) { |
|
748 | + ->willReturnCallback(function($textnode) { |
|
749 | 749 | static $counter = 0; |
750 | - $textnode->setId('someTextnode'.$counter++); |
|
750 | + $textnode->setId('someTextnode' . $counter++); |
|
751 | 751 | }); |
752 | 752 | |
753 | 753 | $importTwine = new ImportTwine($textnodeRepository, $topicRepository); |