Skip to content

Commit

Permalink
Added interfaces for Routes Core
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Helldar committed Nov 15, 2021
1 parent a061044 commit 4b9475b
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 1 deletion.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"symfony/polyfill-php80": "^1.23"
},
"require-dev": {
"illuminate/database": "^8.0"
"illuminate/database": "^8.0",
"phpdocumentor/reflection-docblock": "^5.0"
},
"autoload": {
"psr-4": {
Expand Down
37 changes: 37 additions & 0 deletions src/Routing/Core/Config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

/*
* This file is part of the "dragon-code/contracts" project.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Andrey Helldar <[email protected]>
*
* @copyright 2021 Andrey Helldar
*
* @license MIT
*
* @see https://github.com/TheDragonCode/contracts
*/

declare(strict_types=1);

namespace DragonCode\Contracts\Routing\Core;

interface Config
{
public function getApiMiddleware(): array;

public function getWebMiddleware(): array;

public function getHideMethods(): array;

public function getHideMatching(): array;

public function getDomainForce(): bool;

public function getUrl(): ?string;

public function getNamespace(): ?string;
}
40 changes: 40 additions & 0 deletions src/Routing/Core/Tag.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

/*
* This file is part of the "dragon-code/contracts" project.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Andrey Helldar <[email protected]>
*
* @copyright 2021 Andrey Helldar
*
* @license MIT
*
* @see https://github.com/TheDragonCode/contracts
*/

declare(strict_types=1);

namespace DragonCode\Contracts\Routing\Core;

use Illuminate\Contracts\Support\Arrayable;
use phpDocumentor\Reflection\DocBlock\Tag as DocTag;

interface Tag extends Arrayable
{
public function getCode(): int;

public function setCode(): void;

public function getClass(): string;

public function setClass(DocTag $tag): void;

public function getDescription(): ?string;

public function setDescription(DocTag $tag): void;

public function setSources(array $items): self;
}

0 comments on commit 4b9475b

Please sign in to comment.