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

Parse   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 16
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A ics() 0 3 1
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