File tree Expand file tree Collapse file tree 6 files changed +1
-40
lines changed Expand file tree Collapse file tree 6 files changed +1
-40
lines changed Original file line number Diff line number Diff line change @@ -189,15 +189,4 @@ public static function createFormatInstance(string $format): MetaFormat
189
189
$ instance = new $ format ();
190
190
return $ instance ;
191
191
}
192
-
193
- /**
194
- * Checks whether a value is of a given type.
195
- * @param mixed $value The value to be tested.
196
- * @param \App\Helpers\MetaFormats\PhpTypes $type The desired type of the value.
197
- * @return bool Returns whether the value is of the given type.
198
- */
199
- public static function checkType ($ value , PhpTypes $ type ): bool
200
- {
201
- return gettype ($ value ) === $ type ->value ;
202
- }
203
192
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2
2
3
3
namespace App \Helpers \MetaFormats \Validators ;
4
4
5
- use App \Helpers \MetaFormats \MetaFormatHelper ;
6
- use App \Helpers \MetaFormats \PhpTypes ;
7
-
8
5
/**
9
6
* Validates boolean values. Accepts only boolean true and false.
10
7
*/
Original file line number Diff line number Diff line change 2
2
3
3
namespace App \Helpers \MetaFormats \Validators ;
4
4
5
- use App \Helpers \MetaFormats \MetaFormatHelper ;
6
- use App \Helpers \MetaFormats \PhpTypes ;
7
-
8
5
/**
9
6
* Validates doubles. Accepts doubles as well as their stringified versions.
10
7
*/
Original file line number Diff line number Diff line change 2
2
3
3
namespace App \Helpers \MetaFormats \Validators ;
4
4
5
- use App \Helpers \MetaFormats \MetaFormatHelper ;
6
- use App \Helpers \MetaFormats \PhpTypes ;
7
-
8
5
/**
9
6
* Validates integers. Accepts ints as well as their stringified versions.
10
7
*/
11
8
class VInt
12
9
{
13
10
public const SWAGGER_TYPE = "integer " ;
14
11
15
- public function getExampleValue ()
12
+ public function getExampleValue (): int | string
16
13
{
17
14
return "0 " ;
18
15
}
Original file line number Diff line number Diff line change 2
2
3
3
namespace App \Helpers \MetaFormats \Validators ;
4
4
5
- use App \Helpers \MetaFormats \MetaFormatHelper ;
6
- use App \Helpers \MetaFormats \PhpTypes ;
7
-
8
5
/**
9
6
* Validates strings.
10
7
*/
You can’t perform that action at this time.
0 commit comments