Completed
Push — feature/issue-54 ( 74298b...f633ee )
by Mikaël
32:39
created

StructArrayReservedMethod::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace WsdlToPhp\PackageGenerator\ConfigurationReader;
4
5
class StructArrayReservedMethod extends StructReservedMethod
6
{
7
    /**
8
     * @param string $filename
9
     */
10
    protected function __construct($filename)
11
    {
12
        parent::__construct($filename);
13
        $this->parseReservedKeywords(parent::getDefaultConfigurationPath());
14
    }
15
    /**
16
     * @throws \InvalidArgumentException
17
     * @param string options's file to parse
18
     * @return StructArrayReservedMethod
19
     */
20
    public static function instance($filename = null)
21
    {
22
        return parent::instance(empty($filename) ? self::getDefaultArrayConfigurationPath() : $filename);
23
    }
24
    /**
25
     * @return string
26
     */
27
    public static function getDefaultArrayConfigurationPath()
28
    {
29
        return dirname(__FILE__) . '/../resources/config/struct_array_reserved_keywords.yml';
30
    }
31
}
32