Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

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