YamlLoader   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 0
loc 8
ccs 2
cts 2
cp 1
c 1
b 0
f 1
wmc 1
lcom 0
cbo 2
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A parseFile() 0 3 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
class YamlLoader extends FileLoader {
15
  /** @var string */
16
  protected $extension = "yaml";
17
  
18
  protected function parseFile(string $filename): array {
0 ignored issues
show
Coding Style introduced by Jakub Konečný
Expected 1 space after closing parenthesis; found 0
Loading history...
19 1
    return Yaml::parse(file_get_contents($filename));
20
  }
21
}
22
?>