Files
scummvm-web/include/Models/CreditsModel.php
T
Thunderforge 73958c69d5 BUILD: Standardizing the variable names for parsing data
Fixes the following Codacy issues:

* Avoid variables with short names like `$a`. Configured minimum length is 3.
* Avoid unused local variables such as '$key'.
2020-04-03 13:47:28 +02:00

22 lines
557 B
PHP

<?php
namespace ScummVM\Models;
use ScummVM\Objects\CreditsSection;
/**
* The CreditsModel will generate CreditsSection objects.
*/
abstract class CreditsModel extends BasicModel
{
/* Get all credit sections and their contents. */
public static function getAllCredits()
{
$fname = DIR_DATA . '/credits.yaml';
$parsedData = \yaml_parse_file($fname);
foreach (array_values($parsedData['credits']['section']) as $value) {
$sections[] = new CreditsSection($value);
}
return $sections;
}
}