-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
format fields can now be attributed with request details
- Loading branch information
Showing
12 changed files
with
174 additions
and
40 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,6 @@ public function test(string $arg) | |
// var_dump($format->checkIfAssignable("primaryAdminsIds", [ "10000000-2000-4000-8000-160000000000", "10000000-2000-4000-8000-160000000000" ])); | ||
|
||
$format = new UserFormat(); | ||
$format->checkedAssign("titlesBeforeName", null); | ||
var_dump($format->checkedAssign("email", "[email protected]")); | ||
} | ||
} |
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,16 @@ | ||
<?php | ||
|
||
namespace App\Helpers\MetaFormats; | ||
|
||
use Attribute; | ||
|
||
/** | ||
* Attribute for request parameter details. | ||
*/ | ||
#[Attribute] | ||
class RequestAttribute | ||
{ | ||
public function __construct(RequestParamType $type, string $description = "", bool $required = true) | ||
Check failure on line 13 in app/helpers/MetaFormats/RequestAttribute.php GitHub Actions / phpstan (8.2)
Check failure on line 13 in app/helpers/MetaFormats/RequestAttribute.php GitHub Actions / phpstan (8.2)
Check failure on line 13 in app/helpers/MetaFormats/RequestAttribute.php GitHub Actions / phpstan (8.2)
Check failure on line 13 in app/helpers/MetaFormats/RequestAttribute.php GitHub Actions / phpstan (8.3)
Check failure on line 13 in app/helpers/MetaFormats/RequestAttribute.php GitHub Actions / phpstan (8.3)
|
||
{ | ||
} | ||
} |
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,17 @@ | ||
<?php | ||
|
||
namespace App\Helpers\MetaFormats; | ||
|
||
class RequestParamData | ||
{ | ||
public RequestParamType $type; | ||
public string $description; | ||
public bool $required; | ||
|
||
public function __construct(RequestParamType $type, string $description, bool $required) | ||
{ | ||
$this->type = $type; | ||
$this->description = $description; | ||
$this->required = $required; | ||
} | ||
} |
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,14 @@ | ||
<?php | ||
|
||
namespace App\Helpers\MetaFormats; | ||
|
||
// @codingStandardsIgnoreStart | ||
/** | ||
* An enumeration of request parameter types. | ||
*/ | ||
enum RequestParamType | ||
{ | ||
case Post; | ||
case Query; | ||
} | ||
// @codingStandardsIgnoreEnd |