Browse Source

fix(lint): defaultConfig, init() docblock

merge-requests/10/merge
JamesRezo 2 years ago
parent
commit
2f8476ebf6
  1. 20
      supportedversions_fonctions.php

20
supportedversions_fonctions.php

@ -51,7 +51,7 @@ function balise_SUPPORTED_VERSIONS_dist($p) {
*/
class SupportedVersions
{
private const DEFAULT_CONFIG = [
private $defaultConfig = [
'calendar' =>[
'min_year' => 'P3Y',
'max_year' => 'P5Y',
@ -116,7 +116,11 @@ class SupportedVersions
protected static $releasesFile;
/**
* @internal Définit et stocke les paramètres de configuration du calendrier, les données des releases et la date courante.
* @internal Définit et stocke les paramètres de configuration.
*
* - du calendrier,
* - les données des releases
* - et la date courante.
*
* @codeCoverageIgnore
*
@ -139,7 +143,7 @@ class SupportedVersions
// Calendar initialization
$calendar = isset(self::$config['calendar']) ?
self::$config['calendar'] :
self::DEFAULT_CONFIG['calendar']
self::defaultConfig['calendar']
;
$nowYear = self::$now->format('Y');
@ -295,7 +299,7 @@ class SupportedVersions
protected static function dateHorizCoord(DateTime $date) {
$svg = isset(self::$config['svg']) ?
self::$config['svg'] :
self::DEFAULT_CONFIG['svg']
self::defaultConfig['svg']
;
$diff = $date->diff(self::$minDate);
@ -380,7 +384,7 @@ class SupportedVersions
$svg = isset(self::$config['svg']) ?
self::$config['svg'] :
self::DEFAULT_CONFIG['svg']
self::defaultConfig['svg']
;
$branches = array_map(
@ -410,7 +414,7 @@ class SupportedVersions
$svg = isset(self::$config['svg']) ?
self::$config['svg'] :
self::DEFAULT_CONFIG['svg']
self::defaultConfig['svg']
;
$top = self::top($branch) + (0.5 * $svg['branch_height']);
@ -434,7 +438,7 @@ class SupportedVersions
$svg = isset(self::$config['svg']) ?
self::$config['svg'] :
self::DEFAULT_CONFIG['svg']
self::defaultConfig['svg']
;
return $margin_left +
@ -458,7 +462,7 @@ class SupportedVersions
$svg = isset(self::$config['svg']) ?
self::$config['svg'] :
self::DEFAULT_CONFIG['svg']
self::defaultConfig['svg']
;
return intval(

Loading…
Cancel
Save