fix: type declarations
This commit is contained in:
1 parent
f0b648b7a4
commit
834bbd0da8
3 files changed
+10
-10
No files matched your search
@@ -11,7 +11,7 @@ class Verta extends Facade
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected static function getFacadeAccessor()
|
protected static function getFacadeAccessor(): string
|
||||||
{
|
{
|
||||||
return 'verta';
|
return 'verta';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ class VertaServiceProvider extends ServiceProvider
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function boot()
|
public function boot(): void
|
||||||
{
|
{
|
||||||
$this->loadValidators();
|
$this->loadValidators();
|
||||||
|
|
||||||
@@ -87,9 +87,9 @@ class VertaServiceProvider extends ServiceProvider
|
|||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function register()
|
public function register(): void
|
||||||
{
|
{
|
||||||
$this->app->bind('verta', function ($app) {
|
$this->app->bind('verta', function () {
|
||||||
return new Verta();
|
return new Verta();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -99,12 +99,12 @@ class VertaServiceProvider extends ServiceProvider
|
|||||||
*
|
*
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function provides()
|
public function provides(): array
|
||||||
{
|
{
|
||||||
return ['verta'];
|
return ['verta'];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function loadValidators()
|
public function loadValidators(): void
|
||||||
{
|
{
|
||||||
$className = JalaliValidator::class . '@';
|
$className = JalaliValidator::class . '@';
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ class JalaliValidatorTest extends TestCase
|
|||||||
/***
|
/***
|
||||||
* provider for tests
|
* provider for tests
|
||||||
*/
|
*/
|
||||||
public static function correctDateFormatProvider()
|
public static function correctDateFormatProvider(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
[
|
[
|
||||||
@@ -112,7 +112,7 @@ class JalaliValidatorTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* provider for tests
|
* provider for tests
|
||||||
*/
|
*/
|
||||||
public static function incorrectDateFormatProvider()
|
public static function incorrectDateFormatProvider(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
[
|
[
|
||||||
@@ -133,7 +133,7 @@ class JalaliValidatorTest extends TestCase
|
|||||||
/**
|
/**
|
||||||
* provider for tests
|
* provider for tests
|
||||||
*/
|
*/
|
||||||
public static function jalaliValidatorMethods()
|
public static function jalaliValidatorMethods(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
["validateDate"],
|
["validateDate"],
|
||||||
@@ -155,7 +155,7 @@ class JalaliValidatorTest extends TestCase
|
|||||||
* @test
|
* @test
|
||||||
* @dataProvider jalaliValidatorMethods
|
* @dataProvider jalaliValidatorMethods
|
||||||
*/
|
*/
|
||||||
public function whenJalaliValidatorSecoundArgumentIsEmpty($method)
|
public function whenJalaliValidatorSecondArgumentIsEmpty($method)
|
||||||
{
|
{
|
||||||
$this->assertFalse(
|
$this->assertFalse(
|
||||||
$this->jalaliValidator->{$method}(null, [], [])
|
$this->jalaliValidator->{$method}(null, [], [])
|
||||||
|
|||||||
Reference in new issue
Block a user