Completed
Branch develop (cec3a6)
by
unknown
19:26
created
includes/sabre/sabre/vobject/lib/TimezoneGuesser/FindFromTimezoneMap.php 1 patch
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -11,68 +11,68 @@
 block discarded – undo
11 11
  */
12 12
 class FindFromTimezoneMap implements TimezoneFinder
13 13
 {
14
-    private $map = [];
14
+	private $map = [];
15 15
 
16
-    private $patterns = [
17
-        '/^\((UTC|GMT)(\+|\-)[\d]{2}\:[\d]{2}\) (.*)/',
18
-        '/^\((UTC|GMT)(\+|\-)[\d]{2}\.[\d]{2}\) (.*)/',
19
-    ];
16
+	private $patterns = [
17
+		'/^\((UTC|GMT)(\+|\-)[\d]{2}\:[\d]{2}\) (.*)/',
18
+		'/^\((UTC|GMT)(\+|\-)[\d]{2}\.[\d]{2}\) (.*)/',
19
+	];
20 20
 
21
-    public function find(string $tzid, bool $failIfUncertain = false): ?DateTimeZone
22
-    {
23
-        // Next, we check if the tzid is somewhere in our tzid map.
24
-        if ($this->hasTzInMap($tzid)) {
25
-            return new DateTimeZone($this->getTzFromMap($tzid));
26
-        }
21
+	public function find(string $tzid, bool $failIfUncertain = false): ?DateTimeZone
22
+	{
23
+		// Next, we check if the tzid is somewhere in our tzid map.
24
+		if ($this->hasTzInMap($tzid)) {
25
+			return new DateTimeZone($this->getTzFromMap($tzid));
26
+		}
27 27
 
28
-        // Some Microsoft products prefix the offset first, so let's strip that off
29
-        // and see if it is our tzid map.  We don't want to check for this first just
30
-        // in case there are overrides in our tzid map.
31
-        foreach ($this->patterns as $pattern) {
32
-            if (!preg_match($pattern, $tzid, $matches)) {
33
-                continue;
34
-            }
35
-            $tzidAlternate = $matches[3];
36
-            if ($this->hasTzInMap($tzidAlternate)) {
37
-                return new DateTimeZone($this->getTzFromMap($tzidAlternate));
38
-            }
39
-        }
28
+		// Some Microsoft products prefix the offset first, so let's strip that off
29
+		// and see if it is our tzid map.  We don't want to check for this first just
30
+		// in case there are overrides in our tzid map.
31
+		foreach ($this->patterns as $pattern) {
32
+			if (!preg_match($pattern, $tzid, $matches)) {
33
+				continue;
34
+			}
35
+			$tzidAlternate = $matches[3];
36
+			if ($this->hasTzInMap($tzidAlternate)) {
37
+				return new DateTimeZone($this->getTzFromMap($tzidAlternate));
38
+			}
39
+		}
40 40
 
41
-        return null;
42
-    }
41
+		return null;
42
+	}
43 43
 
44
-    /**
45
-     * This method returns an array of timezone identifiers, that are supported
46
-     * by DateTimeZone(), but not returned by DateTimeZone::listIdentifiers().
47
-     *
48
-     * We're not using DateTimeZone::listIdentifiers(DateTimeZone::ALL_WITH_BC) because:
49
-     * - It's not supported by some PHP versions as well as HHVM.
50
-     * - It also returns identifiers, that are invalid values for new DateTimeZone() on some PHP versions.
51
-     * (See timezonedata/php-bc.php and timezonedata php-workaround.php)
52
-     *
53
-     * @return array
54
-     */
55
-    private function getTzMaps()
56
-    {
57
-        if ([] === $this->map) {
58
-            $this->map = array_merge(
59
-                include __DIR__.'/../timezonedata/windowszones.php',
60
-                include __DIR__.'/../timezonedata/lotuszones.php',
61
-                include __DIR__.'/../timezonedata/exchangezones.php',
62
-                include __DIR__.'/../timezonedata/php-workaround.php'
63
-            );
64
-        }
44
+	/**
45
+	 * This method returns an array of timezone identifiers, that are supported
46
+	 * by DateTimeZone(), but not returned by DateTimeZone::listIdentifiers().
47
+	 *
48
+	 * We're not using DateTimeZone::listIdentifiers(DateTimeZone::ALL_WITH_BC) because:
49
+	 * - It's not supported by some PHP versions as well as HHVM.
50
+	 * - It also returns identifiers, that are invalid values for new DateTimeZone() on some PHP versions.
51
+	 * (See timezonedata/php-bc.php and timezonedata php-workaround.php)
52
+	 *
53
+	 * @return array
54
+	 */
55
+	private function getTzMaps()
56
+	{
57
+		if ([] === $this->map) {
58
+			$this->map = array_merge(
59
+				include __DIR__.'/../timezonedata/windowszones.php',
60
+				include __DIR__.'/../timezonedata/lotuszones.php',
61
+				include __DIR__.'/../timezonedata/exchangezones.php',
62
+				include __DIR__.'/../timezonedata/php-workaround.php'
63
+			);
64
+		}
65 65
 
66
-        return $this->map;
67
-    }
66
+		return $this->map;
67
+	}
68 68
 
69
-    private function getTzFromMap(string $tzid): string
70
-    {
71
-        return $this->getTzMaps()[$tzid];
72
-    }
69
+	private function getTzFromMap(string $tzid): string
70
+	{
71
+		return $this->getTzMaps()[$tzid];
72
+	}
73 73
 
74
-    private function hasTzInMap(string $tzid): bool
75
-    {
76
-        return isset($this->getTzMaps()[$tzid]);
77
-    }
74
+	private function hasTzInMap(string $tzid): bool
75
+	{
76
+		return isset($this->getTzMaps()[$tzid]);
77
+	}
78 78
 }
Please login to merge, or discard this patch.
htdocs/includes/sabre/sabre/vobject/lib/TimezoneGuesser/FindFromOffset.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -11,21 +11,21 @@
 block discarded – undo
11 11
  */
12 12
 class FindFromOffset implements TimezoneFinder
13 13
 {
14
-    public function find(string $tzid, bool $failIfUncertain = false): ?DateTimeZone
15
-    {
16
-        // Maybe the author was hyper-lazy and just included an offset. We
17
-        // support it, but we aren't happy about it.
18
-        if (preg_match('/^GMT(\+|-)([0-9]{4})$/', $tzid, $matches)) {
19
-            // Note that the path in the source will never be taken from PHP 5.5.10
20
-            // onwards. PHP 5.5.10 supports the "GMT+0100" style of format, so it
21
-            // already gets returned early in this function. Once we drop support
22
-            // for versions under PHP 5.5.10, this bit can be taken out of the
23
-            // source.
24
-            // @codeCoverageIgnoreStart
25
-            return new DateTimeZone('Etc/GMT'.$matches[1].ltrim(substr($matches[2], 0, 2), '0'));
26
-            // @codeCoverageIgnoreEnd
27
-        }
14
+	public function find(string $tzid, bool $failIfUncertain = false): ?DateTimeZone
15
+	{
16
+		// Maybe the author was hyper-lazy and just included an offset. We
17
+		// support it, but we aren't happy about it.
18
+		if (preg_match('/^GMT(\+|-)([0-9]{4})$/', $tzid, $matches)) {
19
+			// Note that the path in the source will never be taken from PHP 5.5.10
20
+			// onwards. PHP 5.5.10 supports the "GMT+0100" style of format, so it
21
+			// already gets returned early in this function. Once we drop support
22
+			// for versions under PHP 5.5.10, this bit can be taken out of the
23
+			// source.
24
+			// @codeCoverageIgnoreStart
25
+			return new DateTimeZone('Etc/GMT'.$matches[1].ltrim(substr($matches[2], 0, 2), '0'));
26
+			// @codeCoverageIgnoreEnd
27
+		}
28 28
 
29
-        return null;
30
-    }
29
+		return null;
30
+	}
31 31
 }
Please login to merge, or discard this patch.
htdocs/includes/sabre/sabre/vobject/lib/TimezoneGuesser/TimezoneGuesser.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,5 +7,5 @@
 block discarded – undo
7 7
 
8 8
 interface TimezoneGuesser
9 9
 {
10
-    public function guess(VTimeZone $vtimezone, bool $failIfUncertain = false): ?DateTimeZone;
10
+	public function guess(VTimeZone $vtimezone, bool $failIfUncertain = false): ?DateTimeZone;
11 11
 }
Please login to merge, or discard this patch.
includes/sabre/sabre/vobject/lib/TimezoneGuesser/GuessFromLicEntry.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -13,21 +13,21 @@
 block discarded – undo
13 13
  */
14 14
 class GuessFromLicEntry implements TimezoneGuesser
15 15
 {
16
-    public function guess(VTimeZone $vtimezone, bool $failIfUncertain = false): ?DateTimeZone
17
-    {
18
-        if (!isset($vtimezone->{'X-LIC-LOCATION'})) {
19
-            return null;
20
-        }
16
+	public function guess(VTimeZone $vtimezone, bool $failIfUncertain = false): ?DateTimeZone
17
+	{
18
+		if (!isset($vtimezone->{'X-LIC-LOCATION'})) {
19
+			return null;
20
+		}
21 21
 
22
-        $lic = (string) $vtimezone->{'X-LIC-LOCATION'};
22
+		$lic = (string) $vtimezone->{'X-LIC-LOCATION'};
23 23
 
24
-        // Libical generators may specify strings like
25
-        // "SystemV/EST5EDT". For those we must remove the
26
-        // SystemV part.
27
-        if ('SystemV/' === substr($lic, 0, 8)) {
28
-            $lic = substr($lic, 8);
29
-        }
24
+		// Libical generators may specify strings like
25
+		// "SystemV/EST5EDT". For those we must remove the
26
+		// SystemV part.
27
+		if ('SystemV/' === substr($lic, 0, 8)) {
28
+			$lic = substr($lic, 8);
29
+		}
30 30
 
31
-        return TimeZoneUtil::getTimeZone($lic, null, $failIfUncertain);
32
-    }
31
+		return TimeZoneUtil::getTimeZone($lic, null, $failIfUncertain);
32
+	}
33 33
 }
Please login to merge, or discard this patch.
htdocs/includes/sabre/sabre/vobject/lib/ITip/Message.php 1 patch
Indentation   +105 added lines, -105 removed lines patch added patch discarded remove patch
@@ -16,121 +16,121 @@
 block discarded – undo
16 16
  */
17 17
 class Message
18 18
 {
19
-    /**
20
-     * The object's UID.
21
-     *
22
-     * @var string
23
-     */
24
-    public $uid;
19
+	/**
20
+	 * The object's UID.
21
+	 *
22
+	 * @var string
23
+	 */
24
+	public $uid;
25 25
 
26
-    /**
27
-     * The component type, such as VEVENT.
28
-     *
29
-     * @var string
30
-     */
31
-    public $component;
26
+	/**
27
+	 * The component type, such as VEVENT.
28
+	 *
29
+	 * @var string
30
+	 */
31
+	public $component;
32 32
 
33
-    /**
34
-     * Contains the ITip method, which is something like REQUEST, REPLY or
35
-     * CANCEL.
36
-     *
37
-     * @var string
38
-     */
39
-    public $method;
33
+	/**
34
+	 * Contains the ITip method, which is something like REQUEST, REPLY or
35
+	 * CANCEL.
36
+	 *
37
+	 * @var string
38
+	 */
39
+	public $method;
40 40
 
41
-    /**
42
-     * The current sequence number for the event.
43
-     *
44
-     * @var int
45
-     */
46
-    public $sequence;
41
+	/**
42
+	 * The current sequence number for the event.
43
+	 *
44
+	 * @var int
45
+	 */
46
+	public $sequence;
47 47
 
48
-    /**
49
-     * The senders' email address.
50
-     *
51
-     * Note that this does not imply that this has to be used in a From: field
52
-     * if the message is sent by email. It may also be populated in Reply-To:
53
-     * or not at all.
54
-     *
55
-     * @var string
56
-     */
57
-    public $sender;
48
+	/**
49
+	 * The senders' email address.
50
+	 *
51
+	 * Note that this does not imply that this has to be used in a From: field
52
+	 * if the message is sent by email. It may also be populated in Reply-To:
53
+	 * or not at all.
54
+	 *
55
+	 * @var string
56
+	 */
57
+	public $sender;
58 58
 
59
-    /**
60
-     * The name of the sender. This is often populated from a CN parameter from
61
-     * either the ORGANIZER or ATTENDEE, depending on the message.
62
-     *
63
-     * @var string|null
64
-     */
65
-    public $senderName;
59
+	/**
60
+	 * The name of the sender. This is often populated from a CN parameter from
61
+	 * either the ORGANIZER or ATTENDEE, depending on the message.
62
+	 *
63
+	 * @var string|null
64
+	 */
65
+	public $senderName;
66 66
 
67
-    /**
68
-     * The recipient's email address.
69
-     *
70
-     * @var string
71
-     */
72
-    public $recipient;
67
+	/**
68
+	 * The recipient's email address.
69
+	 *
70
+	 * @var string
71
+	 */
72
+	public $recipient;
73 73
 
74
-    /**
75
-     * The name of the recipient. This is usually populated with the CN
76
-     * parameter from the ATTENDEE or ORGANIZER property, if it's available.
77
-     *
78
-     * @var string|null
79
-     */
80
-    public $recipientName;
74
+	/**
75
+	 * The name of the recipient. This is usually populated with the CN
76
+	 * parameter from the ATTENDEE or ORGANIZER property, if it's available.
77
+	 *
78
+	 * @var string|null
79
+	 */
80
+	public $recipientName;
81 81
 
82
-    /**
83
-     * After the message has been delivered, this should contain a string such
84
-     * as : 1.1;Sent or 1.2;Delivered.
85
-     *
86
-     * In case of a failure, this will hold the error status code.
87
-     *
88
-     * See:
89
-     * http://tools.ietf.org/html/rfc6638#section-7.3
90
-     *
91
-     * @var string
92
-     */
93
-    public $scheduleStatus;
82
+	/**
83
+	 * After the message has been delivered, this should contain a string such
84
+	 * as : 1.1;Sent or 1.2;Delivered.
85
+	 *
86
+	 * In case of a failure, this will hold the error status code.
87
+	 *
88
+	 * See:
89
+	 * http://tools.ietf.org/html/rfc6638#section-7.3
90
+	 *
91
+	 * @var string
92
+	 */
93
+	public $scheduleStatus;
94 94
 
95
-    /**
96
-     * The iCalendar / iTip body.
97
-     *
98
-     * @var \Sabre\VObject\Component\VCalendar
99
-     */
100
-    public $message;
95
+	/**
96
+	 * The iCalendar / iTip body.
97
+	 *
98
+	 * @var \Sabre\VObject\Component\VCalendar
99
+	 */
100
+	public $message;
101 101
 
102
-    /**
103
-     * This will be set to true, if the iTip broker considers the change
104
-     * 'significant'.
105
-     *
106
-     * In practice, this means that we'll only mark it true, if for instance
107
-     * DTSTART changed. This allows systems to only send iTip messages when
108
-     * significant changes happened. This is especially useful for iMip, as
109
-     * normally a ton of messages may be generated for normal calendar use.
110
-     *
111
-     * To see the list of properties that are considered 'significant', check
112
-     * out Sabre\VObject\ITip\Broker::$significantChangeProperties.
113
-     *
114
-     * @var bool
115
-     */
116
-    public $significantChange = true;
102
+	/**
103
+	 * This will be set to true, if the iTip broker considers the change
104
+	 * 'significant'.
105
+	 *
106
+	 * In practice, this means that we'll only mark it true, if for instance
107
+	 * DTSTART changed. This allows systems to only send iTip messages when
108
+	 * significant changes happened. This is especially useful for iMip, as
109
+	 * normally a ton of messages may be generated for normal calendar use.
110
+	 *
111
+	 * To see the list of properties that are considered 'significant', check
112
+	 * out Sabre\VObject\ITip\Broker::$significantChangeProperties.
113
+	 *
114
+	 * @var bool
115
+	 */
116
+	public $significantChange = true;
117 117
 
118
-    /**
119
-     * Returns the schedule status as a string.
120
-     *
121
-     * For example:
122
-     * 1.2
123
-     *
124
-     * @return mixed bool|string
125
-     */
126
-    public function getScheduleStatus()
127
-    {
128
-        if (!$this->scheduleStatus) {
129
-            return false;
130
-        } else {
131
-            list($scheduleStatus) = explode(';', $this->scheduleStatus);
118
+	/**
119
+	 * Returns the schedule status as a string.
120
+	 *
121
+	 * For example:
122
+	 * 1.2
123
+	 *
124
+	 * @return mixed bool|string
125
+	 */
126
+	public function getScheduleStatus()
127
+	{
128
+		if (!$this->scheduleStatus) {
129
+			return false;
130
+		} else {
131
+			list($scheduleStatus) = explode(';', $this->scheduleStatus);
132 132
 
133
-            return $scheduleStatus;
134
-        }
135
-    }
133
+			return $scheduleStatus;
134
+		}
135
+	}
136 136
 }
Please login to merge, or discard this patch.
htdocs/includes/sabre/sabre/vobject/lib/Writer.php 1 patch
Indentation   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -16,53 +16,53 @@
 block discarded – undo
16 16
  */
17 17
 class Writer
18 18
 {
19
-    /**
20
-     * Serializes a vCard or iCalendar object.
21
-     *
22
-     * @return string
23
-     */
24
-    public static function write(Component $component)
25
-    {
26
-        return $component->serialize();
27
-    }
19
+	/**
20
+	 * Serializes a vCard or iCalendar object.
21
+	 *
22
+	 * @return string
23
+	 */
24
+	public static function write(Component $component)
25
+	{
26
+		return $component->serialize();
27
+	}
28 28
 
29
-    /**
30
-     * Serializes a jCal or jCard object.
31
-     *
32
-     * @param int $options
33
-     *
34
-     * @return string
35
-     */
36
-    public static function writeJson(Component $component, $options = 0)
37
-    {
38
-        return json_encode($component, $options);
39
-    }
29
+	/**
30
+	 * Serializes a jCal or jCard object.
31
+	 *
32
+	 * @param int $options
33
+	 *
34
+	 * @return string
35
+	 */
36
+	public static function writeJson(Component $component, $options = 0)
37
+	{
38
+		return json_encode($component, $options);
39
+	}
40 40
 
41
-    /**
42
-     * Serializes a xCal or xCard object.
43
-     *
44
-     * @return string
45
-     */
46
-    public static function writeXml(Component $component)
47
-    {
48
-        $writer = new Xml\Writer();
49
-        $writer->openMemory();
50
-        $writer->setIndent(true);
41
+	/**
42
+	 * Serializes a xCal or xCard object.
43
+	 *
44
+	 * @return string
45
+	 */
46
+	public static function writeXml(Component $component)
47
+	{
48
+		$writer = new Xml\Writer();
49
+		$writer->openMemory();
50
+		$writer->setIndent(true);
51 51
 
52
-        $writer->startDocument('1.0', 'utf-8');
52
+		$writer->startDocument('1.0', 'utf-8');
53 53
 
54
-        if ($component instanceof Component\VCalendar) {
55
-            $writer->startElement('icalendar');
56
-            $writer->writeAttribute('xmlns', Parser\XML::XCAL_NAMESPACE);
57
-        } else {
58
-            $writer->startElement('vcards');
59
-            $writer->writeAttribute('xmlns', Parser\XML::XCARD_NAMESPACE);
60
-        }
54
+		if ($component instanceof Component\VCalendar) {
55
+			$writer->startElement('icalendar');
56
+			$writer->writeAttribute('xmlns', Parser\XML::XCAL_NAMESPACE);
57
+		} else {
58
+			$writer->startElement('vcards');
59
+			$writer->writeAttribute('xmlns', Parser\XML::XCARD_NAMESPACE);
60
+		}
61 61
 
62
-        $component->xmlSerialize($writer);
62
+		$component->xmlSerialize($writer);
63 63
 
64
-        $writer->endElement();
64
+		$writer->endElement();
65 65
 
66
-        return $writer->outputMemory();
67
-    }
66
+		return $writer->outputMemory();
67
+	}
68 68
 }
Please login to merge, or discard this patch.
htdocs/includes/sabre/sabre/vobject/lib/ElementList.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -17,32 +17,32 @@
 block discarded – undo
17 17
  */
18 18
 class ElementList extends ArrayIterator
19 19
 {
20
-    /* {{{ ArrayAccess Interface */
20
+	/* {{{ ArrayAccess Interface */
21 21
 
22
-    /**
23
-     * Sets an item through ArrayAccess.
24
-     *
25
-     * @param int   $offset
26
-     * @param mixed $value
27
-     */
28
-    #[\ReturnTypeWillChange]
29
-    public function offsetSet($offset, $value)
30
-    {
31
-        throw new LogicException('You can not add new objects to an ElementList');
32
-    }
22
+	/**
23
+	 * Sets an item through ArrayAccess.
24
+	 *
25
+	 * @param int   $offset
26
+	 * @param mixed $value
27
+	 */
28
+	#[\ReturnTypeWillChange]
29
+	public function offsetSet($offset, $value)
30
+	{
31
+		throw new LogicException('You can not add new objects to an ElementList');
32
+	}
33 33
 
34
-    /**
35
-     * Sets an item through ArrayAccess.
36
-     *
37
-     * This method just forwards the request to the inner iterator
38
-     *
39
-     * @param int $offset
40
-     */
41
-    #[\ReturnTypeWillChange]
42
-    public function offsetUnset($offset)
43
-    {
44
-        throw new LogicException('You can not remove objects from an ElementList');
45
-    }
34
+	/**
35
+	 * Sets an item through ArrayAccess.
36
+	 *
37
+	 * This method just forwards the request to the inner iterator
38
+	 *
39
+	 * @param int $offset
40
+	 */
41
+	#[\ReturnTypeWillChange]
42
+	public function offsetUnset($offset)
43
+	{
44
+		throw new LogicException('You can not remove objects from an ElementList');
45
+	}
46 46
 
47
-    /* }}} */
47
+	/* }}} */
48 48
 }
Please login to merge, or discard this patch.
htdocs/includes/sabre/sabre/vobject/lib/Settings.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -17,39 +17,39 @@
 block discarded – undo
17 17
  */
18 18
 class Settings
19 19
 {
20
-    /**
21
-     * The minimum date we accept for various calculations with dates, such as
22
-     * recurrences.
23
-     *
24
-     * The choice of 1900 is pretty arbitrary, but it covers most common
25
-     * use-cases. In particular, it covers birthdates for virtually everyone
26
-     * alive on earth, which is less than 5 people at the time of writing.
27
-     */
28
-    public static $minDate = '1900-01-01';
20
+	/**
21
+	 * The minimum date we accept for various calculations with dates, such as
22
+	 * recurrences.
23
+	 *
24
+	 * The choice of 1900 is pretty arbitrary, but it covers most common
25
+	 * use-cases. In particular, it covers birthdates for virtually everyone
26
+	 * alive on earth, which is less than 5 people at the time of writing.
27
+	 */
28
+	public static $minDate = '1900-01-01';
29 29
 
30
-    /**
31
-     * The maximum date we accept for various calculations with dates, such as
32
-     * recurrences.
33
-     *
34
-     * The choice of 2100 is pretty arbitrary, but should cover most
35
-     * appointments made for many years to come.
36
-     */
37
-    public static $maxDate = '2100-01-01';
30
+	/**
31
+	 * The maximum date we accept for various calculations with dates, such as
32
+	 * recurrences.
33
+	 *
34
+	 * The choice of 2100 is pretty arbitrary, but should cover most
35
+	 * appointments made for many years to come.
36
+	 */
37
+	public static $maxDate = '2100-01-01';
38 38
 
39
-    /**
40
-     * The maximum number of recurrences that will be generated.
41
-     *
42
-     * This setting limits the maximum of recurring events that this library
43
-     * generates in its recurrence iterators.
44
-     *
45
-     * This is a security measure. Without this, it would be possible to craft
46
-     * specific events that recur many, many times, potentially DDOSing the
47
-     * server.
48
-     *
49
-     * The default (3500) allows creation of a daily event that goes on for 10
50
-     * years, which is hopefully long enough for most.
51
-     *
52
-     * Set this value to -1 to disable this control altogether.
53
-     */
54
-    public static $maxRecurrences = 3500;
39
+	/**
40
+	 * The maximum number of recurrences that will be generated.
41
+	 *
42
+	 * This setting limits the maximum of recurring events that this library
43
+	 * generates in its recurrence iterators.
44
+	 *
45
+	 * This is a security measure. Without this, it would be possible to craft
46
+	 * specific events that recur many, many times, potentially DDOSing the
47
+	 * server.
48
+	 *
49
+	 * The default (3500) allows creation of a daily event that goes on for 10
50
+	 * years, which is hopefully long enough for most.
51
+	 *
52
+	 * Set this value to -1 to disable this control altogether.
53
+	 */
54
+	public static $maxRecurrences = 3500;
55 55
 }
Please login to merge, or discard this patch.
htdocs/includes/sabre/sabre/vobject/lib/Reader.php 1 patch
Indentation   +71 added lines, -71 removed lines patch added patch discarded remove patch
@@ -14,82 +14,82 @@
 block discarded – undo
14 14
  */
15 15
 class Reader
16 16
 {
17
-    /**
18
-     * If this option is passed to the reader, it will be less strict about the
19
-     * validity of the lines.
20
-     */
21
-    const OPTION_FORGIVING = 1;
17
+	/**
18
+	 * If this option is passed to the reader, it will be less strict about the
19
+	 * validity of the lines.
20
+	 */
21
+	const OPTION_FORGIVING = 1;
22 22
 
23
-    /**
24
-     * If this option is turned on, any lines we cannot parse will be ignored
25
-     * by the reader.
26
-     */
27
-    const OPTION_IGNORE_INVALID_LINES = 2;
23
+	/**
24
+	 * If this option is turned on, any lines we cannot parse will be ignored
25
+	 * by the reader.
26
+	 */
27
+	const OPTION_IGNORE_INVALID_LINES = 2;
28 28
 
29
-    /**
30
-     * Parses a vCard or iCalendar object, and returns the top component.
31
-     *
32
-     * The options argument is a bitfield. Pass any of the OPTIONS constant to
33
-     * alter the parsers' behaviour.
34
-     *
35
-     * You can either supply a string, or a readable stream for input.
36
-     *
37
-     * @param string|resource $data
38
-     * @param int             $options
39
-     * @param string          $charset
40
-     *
41
-     * @return Document
42
-     */
43
-    public static function read($data, $options = 0, $charset = 'UTF-8')
44
-    {
45
-        $parser = new Parser\MimeDir();
46
-        $parser->setCharset($charset);
47
-        $result = $parser->parse($data, $options);
29
+	/**
30
+	 * Parses a vCard or iCalendar object, and returns the top component.
31
+	 *
32
+	 * The options argument is a bitfield. Pass any of the OPTIONS constant to
33
+	 * alter the parsers' behaviour.
34
+	 *
35
+	 * You can either supply a string, or a readable stream for input.
36
+	 *
37
+	 * @param string|resource $data
38
+	 * @param int             $options
39
+	 * @param string          $charset
40
+	 *
41
+	 * @return Document
42
+	 */
43
+	public static function read($data, $options = 0, $charset = 'UTF-8')
44
+	{
45
+		$parser = new Parser\MimeDir();
46
+		$parser->setCharset($charset);
47
+		$result = $parser->parse($data, $options);
48 48
 
49
-        return $result;
50
-    }
49
+		return $result;
50
+	}
51 51
 
52
-    /**
53
-     * Parses a jCard or jCal object, and returns the top component.
54
-     *
55
-     * The options argument is a bitfield. Pass any of the OPTIONS constant to
56
-     * alter the parsers' behaviour.
57
-     *
58
-     * You can either a string, a readable stream, or an array for its input.
59
-     * Specifying the array is useful if json_decode was already called on the
60
-     * input.
61
-     *
62
-     * @param string|resource|array $data
63
-     * @param int                   $options
64
-     *
65
-     * @return Document
66
-     */
67
-    public static function readJson($data, $options = 0)
68
-    {
69
-        $parser = new Parser\Json();
70
-        $result = $parser->parse($data, $options);
52
+	/**
53
+	 * Parses a jCard or jCal object, and returns the top component.
54
+	 *
55
+	 * The options argument is a bitfield. Pass any of the OPTIONS constant to
56
+	 * alter the parsers' behaviour.
57
+	 *
58
+	 * You can either a string, a readable stream, or an array for its input.
59
+	 * Specifying the array is useful if json_decode was already called on the
60
+	 * input.
61
+	 *
62
+	 * @param string|resource|array $data
63
+	 * @param int                   $options
64
+	 *
65
+	 * @return Document
66
+	 */
67
+	public static function readJson($data, $options = 0)
68
+	{
69
+		$parser = new Parser\Json();
70
+		$result = $parser->parse($data, $options);
71 71
 
72
-        return $result;
73
-    }
72
+		return $result;
73
+	}
74 74
 
75
-    /**
76
-     * Parses a xCard or xCal object, and returns the top component.
77
-     *
78
-     * The options argument is a bitfield. Pass any of the OPTIONS constant to
79
-     * alter the parsers' behaviour.
80
-     *
81
-     * You can either supply a string, or a readable stream for input.
82
-     *
83
-     * @param string|resource $data
84
-     * @param int             $options
85
-     *
86
-     * @return Document
87
-     */
88
-    public static function readXML($data, $options = 0)
89
-    {
90
-        $parser = new Parser\XML();
91
-        $result = $parser->parse($data, $options);
75
+	/**
76
+	 * Parses a xCard or xCal object, and returns the top component.
77
+	 *
78
+	 * The options argument is a bitfield. Pass any of the OPTIONS constant to
79
+	 * alter the parsers' behaviour.
80
+	 *
81
+	 * You can either supply a string, or a readable stream for input.
82
+	 *
83
+	 * @param string|resource $data
84
+	 * @param int             $options
85
+	 *
86
+	 * @return Document
87
+	 */
88
+	public static function readXML($data, $options = 0)
89
+	{
90
+		$parser = new Parser\XML();
91
+		$result = $parser->parse($data, $options);
92 92
 
93
-        return $result;
94
-    }
93
+		return $result;
94
+	}
95 95
 }
Please login to merge, or discard this patch.