YamlLoader::parseFile()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 1
c 1
b 0
f 1
dl 0
loc 2
rs 10
ccs 1
cts 1
cp 1
cc 1
nc 1
nop 1
crap 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Nexendrie\Translation\Loaders;
5
6
use Symfony\Component\Yaml\Yaml;
7
8
/**
9
 * YamlLoader
10
 * Loads texts from yaml files
11
 *
12
 * @author Jakub Konečný
13
 */
14 1
final class YamlLoader extends FileLoader {
15
  protected string $extension = "yaml";
16
17
  /**
18
   * @throws \Symfony\Component\Yaml\Exception\ParseException
19
   */
20
  protected function parseFile(string $filename): array {
21 1
    return Yaml::parseFile($filename);
22
  }
23
}
24
?>