Skip to content

Commit 4bfbee5

Browse files
author
matheo
committed
add phpdoc and license header
1 parent 6e3f72d commit 4bfbee5

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

src/TwigComponent/src/Twig/ComponentLexer.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,28 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\UX\TwigComponent\Twig;
413

514
use Twig\Lexer;
615
use Twig\Source;
716
use Twig\TokenStream;
817

18+
/**
19+
* @author Mathèo Daninos <[email protected]>
20+
*
21+
* @internal
22+
*
23+
* thanks to @giorgiopogliani for the inspiration on this lexer <3
24+
* @see https://github.com/giorgiopogliani/twig-components
25+
*/
926
class ComponentLexer extends Lexer
1027
{
1128
public const ATTRIBUTES_REGEX = '(?<attributes>(?:\s+[\w\-:.@]+(=(?:\\\"[^\\\"]*\\\"|\'[^\']*\'|[^\'\\\"=<>]+))?)*\s*)';

src/TwigComponent/tests/Integration/ComponentLexerTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\UX\TwigComponent\Tests\Integration;
413

514
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
615
use Twig\Environment;
716

17+
/**
18+
* @author Mathèo Daninos <[email protected]>
19+
*
20+
* @internal
21+
*/
822
class ComponentLexerTest extends KernelTestCase
923
{
1024
public function testComponentSyntaxOpenTags(): void

0 commit comments

Comments
 (0)