Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 150
Zeile 20... Zeile 20...
20
    protected $lexer;
20
    protected $lexer;
Zeile 21... Zeile 21...
21
 
21
 
22
    /**
22
    /**
23
     * id-left "@" id-right
23
     * id-left "@" id-right
24
     */
24
     */
25
    abstract protected function parseRightFromAt() : Result;
25
    abstract protected function parseRightFromAt(): Result;
26
    abstract protected function parseLeftFromAt() : Result;
26
    abstract protected function parseLeftFromAt(): Result;
Zeile 27... Zeile 27...
27
    abstract protected function preLeftParsing() : Result;
27
    abstract protected function preLeftParsing(): Result;
28
 
28
 
29
 
29
 
30
    public function __construct(EmailLexer $lexer)
30
    public function __construct(EmailLexer $lexer)
Zeile 31... Zeile 31...
31
    {
31
    {
32
        $this->lexer = $lexer;   
32
        $this->lexer = $lexer;
33
    }
33
    }
Zeile 34... Zeile 34...
34
 
34
 
35
    public function parse(string $str) : Result
35
    public function parse(string $str): Result
36
    {
36
    {
Zeile 37... Zeile 37...
37
        $this->lexer->setInput($str);
37
        $this->lexer->setInput($str);
38
 
38
 
39
        if ($this->lexer->hasInvalidTokens()) {
39
        if ($this->lexer->hasInvalidTokens()) {
Zeile 49... Zeile 49...
49
 
49
 
50
        if ($localPartResult->isInvalid()) {
50
        if ($localPartResult->isInvalid()) {
51
            return $localPartResult;
51
            return $localPartResult;
Zeile 52... Zeile 52...
52
        }
52
        }
Zeile 53... Zeile 53...
53
 
53
 
54
        $domainPartResult = $this->parseRightFromAt(); 
54
        $domainPartResult = $this->parseRightFromAt();
55
 
55
 
Zeile 61... Zeile 61...
61
    }
61
    }
Zeile 62... Zeile 62...
62
 
62
 
63
    /**
63
    /**
64
     * @return Warning\Warning[]
64
     * @return Warning\Warning[]
65
     */
65
     */
66
    public function getWarnings() : array
66
    public function getWarnings(): array
67
    {
67
    {
68
        return $this->warnings;
68
        return $this->warnings;
Zeile 69... Zeile 69...
69
    }
69
    }
70
 
70
 
71
    protected function hasAtToken() : bool
71
    protected function hasAtToken(): bool
72
    {
72
    {
Zeile 73... Zeile 73...
73
        $this->lexer->moveNext();
73
        $this->lexer->moveNext();
74
        $this->lexer->moveNext();
74
        $this->lexer->moveNext();
75
 
75