Skip to content

Commit 9a8210f

Browse files
committed
Installer
------------ * Better IntlMock solution (no longer clashes with automated source code analysis and control)
1 parent 03f7880 commit 9a8210f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

_installer/Classes/IntlMock.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?php /** @noinspection PhpMultipleClassDeclarationsInspection */
1+
<?php
22
/**
33
*
44
* @copyright Copyright (c) Miroslav Marek <mirek.marek@web-jet.cz>
@@ -12,7 +12,7 @@
1212
}
1313

1414

15-
class Locale {
15+
class LocaleMock {
1616
public static function parseLocale(string $locale): ?array
1717
{
1818
return null;
@@ -29,11 +29,16 @@ public static function getDisplayLanguage() : string
2929
}
3030
}
3131

32-
class IntlDateFormatter {
32+
class IntlDateFormatterMock {
3333
public const SHORT = 0;
3434
public const MEDIUM = 0;
3535
public const LONG = '';
3636
public const FULL = '';
3737
public const GREGORIAN = '';
3838
public const TRADITIONAL = '';
3939
}
40+
41+
/** @noinspection PhpIgnoredClassAliasDeclaration */
42+
class_alias( LocaleMock::class, Locale::class, false);
43+
/** @noinspection PhpIgnoredClassAliasDeclaration */
44+
class_alias( IntlDateFormatterMock::class, IntlDateFormatter::class , false);

0 commit comments

Comments
 (0)