Skip to content

Commit afcfd52

Browse files
committed
Code style
1 parent 6298865 commit afcfd52

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/ICalendarOrg/ZCiCal.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ public function __construct(string $data = '', int $maxevents = 1_000_000, int $
125125
elseif (' ' == \substr($line, 0, 1))
126126
{
127127
// This appends to the previous line.
128-
if ($lastdatakey !== null) {
128+
if (null !== $lastdatakey) {
129129
$this->curnode->data[$lastdatakey]->values[
130-
count($this->curnode->data[$lastdatakey]->values)-1
131-
] .= ltrim($line);
130+
\count($this->curnode->data[$lastdatakey]->values) - 1
131+
] .= \ltrim($line);
132132
}
133133
}
134134
else

tests/LinefoldingTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ public function testLineFolding() : void
3131
SUMMARY:Reserved
3232
END:VEVENT
3333
END:VCALENDAR
34-
EOS
35-
;
34+
EOS;
3635

3736
$test = new \ICalendarOrg\ZCiCal($sample);
3837

@@ -42,14 +41,14 @@ public function testLineFolding() : void
4241
$node = $test->tree->child[0];
4342

4443
// Make sure all expected fields are there
45-
foreach (array('DTEND', 'DTSTART', 'UID', 'DESCRIPTION', 'SUMMARY')
44+
foreach (['DTEND', 'DTSTART', 'UID', 'DESCRIPTION', 'SUMMARY']
4645
as $field) {
4746
$this->assertArrayHasKey($field, $node->data);
4847
}
4948

5049
// Make sure description matches
5150
$this->assertEquals(
52-
trim($node->data['DESCRIPTION']->values[0]),
51+
\trim($node->data['DESCRIPTION']->values[0]),
5352
'Reservation URL: https://www.airbnb.com/hosting/reservations/details/xxx\nPhone Number (Last 4 Digits): 0000'
5453
);
5554
}

0 commit comments

Comments
 (0)