Passed
Push — develop ( aeaa02...49fa9d )
by Andrew
06:05
created

Parse::ics()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * iCalendar plugin for Craft CMS 3.x
4
 *
5
 * Tools for parsing & formatting the RFC 2445 iCalendar (.ics) specification
6
 *
7
 * @link      https://nystudio107.com
8
 * @copyright Copyright (c) 2019 nystudio107
9
 */
10
11
namespace nystudio107\icalendar\services;
12
13
use craft\base\Component;
14
15
use ICal\ICal;
16
17
/**
18
 * @author    nystudio107
19
 * @package   ICalendar
20
 * @since     1.1.0
21
 */
22
class Parse extends Component
23
{
24
    // Public Methods
25
    // =========================================================================
26
27
    /**
28
     * Return the ICal object (or null) for the events feed
29
     *
30
     * @param mixed|array|string $files
31
     * @param array              $config
32
     *
33
     * @return null|ICal
34
     */
35
    public function ics($files, array $config = [])
36
    {
37
        return new ICal($files, $config);
38
    }
39
}
40