Skip to content

Commit 1642b0c

Browse files
committed
Code Style
1 parent 708e086 commit 1642b0c

File tree

10 files changed

+21
-16
lines changed

10 files changed

+21
-16
lines changed

examples/parseicalendar.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* parseicalendar.php
45
*

examples/recurringdate.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* recurringdate.php
45
*

examples/timezoneevent.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* timezoneevent.php
45
*

src/ICalendarOrg/ZCTimeZoneHelper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Create timezone data for use in icalendar file
45
*

src/ICalendarOrg/ZCiCalDataNode.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Create iCalendar data structure
45
*

src/ICalendarOrg/ZCiCalNode.php

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Create iCalendar data structure
45
*
@@ -140,31 +141,26 @@ public function export(?ZCiCalNode $node = null, int $level = 0) : string
140141
}
141142
$txtstr .= 'BEGIN:' . $node->getName() . "\r\n";
142143

143-
if (\property_exists($node, 'data'))
144+
foreach ($node->data as $d)
144145
{
145-
foreach ($node->data as $d)
146+
if (\is_array($d))
146147
{
147-
if (\is_array($d))
148-
{
149-
foreach ($d as $c)
150-
{
151-
$txtstr .= $c;
152-
}
153-
}
154-
else
148+
foreach ($d as $c)
155149
{
156-
$txtstr .= $d;
150+
$txtstr .= $c;
157151
}
158152
}
153+
else
154+
{
155+
$txtstr .= $d;
156+
}
159157
}
160158

161-
if (\property_exists($node, 'child'))
159+
foreach ($node->child as $c)
162160
{
163-
foreach ($node->child as $c)
164-
{
165-
$txtstr .= $node->export($c, $level + 1);
166-
}
161+
$txtstr .= $node->export($c, $level + 1);
167162
}
163+
168164
$txtstr .= 'END:' . $node->getName() . "\r\n";
169165

170166
return $txtstr;

src/ICalendarOrg/ZDateHelper.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* Date helper class
45
*

tests/FileTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* This file is part of the ICalendarOrg package
45
*

tests/LinefoldingTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* This file is part of the ICalendarOrg package
45
*

tests/ZCiCalDataNodeTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* This file is part of the ICalendarOrg package
45
*

0 commit comments

Comments
 (0)