-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
65 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Tempest\Highlight\Languages\Php; | ||
|
||
use Tempest\Highlight\Languages\DocComment\DocCommentLanguage; | ||
use Tempest\Highlight\Languages\Php\Patterns\PhpDocCommentGenericTypePattern; | ||
use Tempest\Highlight\Languages\Php\Patterns\PhpDocCommentParamTypePattern; | ||
use Tempest\Highlight\Languages\Php\Patterns\PhpDocCommentReturnTypePattern; | ||
use Tempest\Highlight\Languages\Php\Patterns\PhpDocCommentTemplateTypePattern; | ||
use Tempest\Highlight\Languages\Php\Patterns\PhpDocCommentVariablePattern; | ||
use Tempest\Highlight\Languages\Php\Patterns\PhpDocCommentVarTypePattern; | ||
|
||
class PhpDocCommentLanguage extends DocCommentLanguage | ||
{ | ||
public function getPatterns(): array | ||
{ | ||
return [ | ||
...parent::getPatterns(), | ||
new PhpDocCommentParamTypePattern(), | ||
new PhpDocCommentVarTypePattern(), | ||
new PhpDocCommentReturnTypePattern(), | ||
new PhpDocCommentTemplateTypePattern(), | ||
new PhpDocCommentGenericTypePattern(), | ||
new PhpDocCommentVariablePattern(), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,6 @@ pre, code { | |
color: #000; | ||
} | ||
|
||
.hl-comment span, | ||
.hl-comment { | ||
color: #888888; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
```php | ||
final readonly class BookController | ||
{ | ||
#[Post(uri: '/books/create')] | ||
public function store(BookRequest $request): Response | ||
{ | ||
$book = map($request)->to(Book::class)->save(); | ||
|
||
return response() | ||
->redirect(uri([self::class, 'show'], id: $book->id)); | ||
} | ||
} | ||
/** | ||
* This function will do some things | ||
* | ||
* @template T | ||
* @param class-string<T> $className the class' name | ||
* @param int $id | ||
* @return T|null | ||
* | ||
* That's about all | ||
*/ | ||
``` |