| 1 | <?php  | 
            ||
| 11 | class Generator implements GeneratorInterface  | 
            ||
| 12 | { | 
            ||
| 13 | /**  | 
            ||
| 14 | * @var \XL2TP\Interfaces\ConfigInterface  | 
            ||
| 15 | */  | 
            ||
| 16 | public $config;  | 
            ||
| 17 | |||
| 18 | /**  | 
            ||
| 19 | * Generator constructor.  | 
            ||
| 20 | *  | 
            ||
| 21 | * @param \XL2TP\Interfaces\ConfigInterface $config  | 
            ||
| 22 | */  | 
            ||
| 23 | 4 | public function __construct(ConfigInterface $config)  | 
            |
| 27 | |||
| 28 | /**  | 
            ||
| 29 | * Render section by parameters in array  | 
            ||
| 30 | *  | 
            ||
| 31 | * @param \XL2TP\Section $section Name of section: global, default, lac, lnc  | 
            ||
| 32 | *  | 
            ||
| 33 | * @return string  | 
            ||
| 34 | */  | 
            ||
| 35 | 2 | private function render(Section $section): string  | 
            |
| 49 | |||
| 50 | /**  | 
            ||
| 51 | * Generate L2TP configuration by parameters from memory  | 
            ||
| 52 | *  | 
            ||
| 53 | * @return string  | 
            ||
| 54 | * @throws \RuntimeException If was set bad config  | 
            ||
| 55 | */  | 
            ||
| 56 | 3 | public function generate(): string  | 
            |
| 69 | }  | 
            ||
| 70 | 
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: