@@ -82,8 +82,8 @@ |
||
82 | 82 | private function createVcardObjectWithProperties(string $content): VCard |
83 | 83 | { |
84 | 84 | $vcardProperties = array( |
85 | - Kind::getNode() => null, |
|
86 | - Version::getNode() => null); |
|
85 | + Kind::getNode() => null, |
|
86 | + Version::getNode() => null); |
|
87 | 87 | |
88 | 88 | $lines = explode("\n", $content); |
89 | 89 | foreach ($lines as $line) { |
@@ -19,7 +19,7 @@ |
||
19 | 19 | public function getVcfString(): string |
20 | 20 | { |
21 | 21 | return $this->telephone->getNode() . |
22 | - ';TYPE=' . $this->telephone->getType()->__toString() . |
|
23 | - ';VALUE=' . $this->telephone->getValue() . ':tel:' . $this->telephone->getTelephoneNumber(); |
|
22 | + ';TYPE=' . $this->telephone->getType()->__toString() . |
|
23 | + ';VALUE=' . $this->telephone->getValue() . ':tel:' . $this->telephone->getTelephoneNumber(); |
|
24 | 24 | } |
25 | 25 | } |
@@ -327,24 +327,24 @@ discard block |
||
327 | 327 | */ |
328 | 328 | public function testTelephonePropertyContent(): void |
329 | 329 | { |
330 | - // Given |
|
331 | - $expectedContent = "BEGIN:VCARD\r\n" . |
|
330 | + // Given |
|
331 | + $expectedContent = "BEGIN:VCARD\r\n" . |
|
332 | 332 | "VERSION:4.0\r\n" . |
333 | 333 | "KIND:individual\r\n" . |
334 | 334 | "TEL;TYPE=home;VALUE=uri:tel:+33-01-23-45-67\r\n" . |
335 | 335 | "TEL;TYPE=work;VALUE=uri:tel:+33-05-42-41-96\r\n" . |
336 | 336 | "END:VCARD\r\n"; |
337 | 337 | |
338 | - $formatter = new Formatter(new VcfFormatter(), ''); |
|
339 | - $vcard = (new VCard()) |
|
338 | + $formatter = new Formatter(new VcfFormatter(), ''); |
|
339 | + $vcard = (new VCard()) |
|
340 | 340 | ->add(new Telephone('+33 01 23 45 67')) |
341 | 341 | ->add(new Telephone('+33-05-42-41-96', Type::work())); |
342 | 342 | |
343 | - // When |
|
344 | - $formatter->addVCard($vcard); |
|
343 | + // When |
|
344 | + $formatter->addVCard($vcard); |
|
345 | 345 | |
346 | - // Then |
|
347 | - $this->assertEquals($expectedContent, $formatter->getContent()); |
|
346 | + // Then |
|
347 | + $this->assertEquals($expectedContent, $formatter->getContent()); |
|
348 | 348 | } |
349 | 349 | |
350 | 350 | /** |
@@ -352,21 +352,21 @@ discard block |
||
352 | 352 | */ |
353 | 353 | public function testNamePropertyContent(): void |
354 | 354 | { |
355 | - // Given |
|
356 | - $expectedContent = "BEGIN:VCARD\r\n" . |
|
355 | + // Given |
|
356 | + $expectedContent = "BEGIN:VCARD\r\n" . |
|
357 | 357 | "VERSION:4.0\r\n" . |
358 | 358 | "KIND:individual\r\n" . |
359 | 359 | "N:van den Berg;Melroy;Antoine;Mr.;\r\n" . |
360 | 360 | "END:VCARD\r\n"; |
361 | 361 | |
362 | - $formatter = new Formatter(new VcfFormatter(), ''); |
|
363 | - $vcard = (new VCard())->add(new Name('van den Berg', 'Melroy', 'Antoine', 'Mr.')); |
|
362 | + $formatter = new Formatter(new VcfFormatter(), ''); |
|
363 | + $vcard = (new VCard())->add(new Name('van den Berg', 'Melroy', 'Antoine', 'Mr.')); |
|
364 | 364 | |
365 | - // When |
|
366 | - $formatter->addVCard($vcard); |
|
365 | + // When |
|
366 | + $formatter->addVCard($vcard); |
|
367 | 367 | |
368 | - // Then |
|
369 | - $this->assertEquals($expectedContent, $formatter->getContent()); |
|
368 | + // Then |
|
369 | + $this->assertEquals($expectedContent, $formatter->getContent()); |
|
370 | 370 | } |
371 | 371 | |
372 | 372 | /** |
@@ -375,21 +375,21 @@ discard block |
||
375 | 375 | */ |
376 | 376 | public function testAddressPropertyContentWithLineBreak() : void |
377 | 377 | { |
378 | - // Given |
|
379 | - $expectedContent = "BEGIN:VCARD\r\n" . |
|
378 | + // Given |
|
379 | + $expectedContent = "BEGIN:VCARD\r\n" . |
|
380 | 380 | "VERSION:4.0\r\n" . |
381 | 381 | "KIND:individual\r\n" . |
382 | 382 | "ADR;TYPE=home:42;Villa;Main Street 500;London;Barnet;EN4 0AG;United Kingd\r\n" . |
383 | 383 | // Line break because of 75 octets width limit, immediately followed by a single white space. |
384 | 384 | " om\r\n" . |
385 | 385 | "END:VCARD\r\n"; |
386 | - $formatter = new Formatter(new VcfFormatter(), ''); |
|
387 | - $vcard = (new VCard())->add(new Address('42', 'Villa', 'Main Street 500', 'London', 'Barnet', 'EN4 0AG', 'United Kingdom')); |
|
386 | + $formatter = new Formatter(new VcfFormatter(), ''); |
|
387 | + $vcard = (new VCard())->add(new Address('42', 'Villa', 'Main Street 500', 'London', 'Barnet', 'EN4 0AG', 'United Kingdom')); |
|
388 | 388 | |
389 | - // When |
|
390 | - $formatter->addVCard($vcard); |
|
389 | + // When |
|
390 | + $formatter->addVCard($vcard); |
|
391 | 391 | |
392 | - // Then |
|
393 | - $this->assertEquals($expectedContent, $formatter->getContent()); |
|
392 | + // Then |
|
393 | + $this->assertEquals($expectedContent, $formatter->getContent()); |
|
394 | 394 | } |
395 | 395 | } |