| 1 |
<?php |
| 2 |
|
| 3 |
namespace PhpOffice\PhpSpreadsheet\Helper; |
| 4 |
|
| 5 |
class Handler |
| 6 |
{ |
| 7 |
/** @var string */ |
| 8 |
private static $invalidHex = 'Y'; |
| 9 |
|
| 10 |
// A bunch of methods to show that we continue |
| 11 |
// to capture messages even using PhpUnit 10. |
| 12 |
public static function suppressed(): bool |
| 13 |
{ |
| 14 |
return @trigger_error('hello'); |
| 15 |
} |
| 16 |
|
| 17 |
public static function deprecated(): string |
| 18 |
{ |
| 19 |
return (string) hexdec(self::$invalidHex); |
| 20 |
} |
| 21 |
|
| 22 |
public static function notice(string $value): void |
| 23 |
{ |
| 24 |
date_default_timezone_set($value); |
| 25 |
} |
| 26 |
|
| 27 |
public static function warning(): bool |
| 28 |
{ |
| 29 |
return file_get_contents(__FILE__ . 'noexist') !== false; |
| 30 |
} |
| 31 |
|
| 32 |
public static function userDeprecated(): bool |
| 33 |
{ |
| 34 |
return trigger_error('hello', E_USER_DEPRECATED); |
| 35 |
} |
| 36 |
|
| 37 |
public static function userNotice(): bool |
| 38 |
{ |
| 39 |
return trigger_error('userNotice', E_USER_NOTICE); |
| 40 |
} |
| 41 |
|
| 42 |
public static function userWarning(): bool |
| 43 |
{ |
| 44 |
return trigger_error('userWarning', E_USER_WARNING); |
| 45 |
} |
| 46 |
} |
| 47 |
|