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
|
||||
*/
|
||||
protected static function getFacadeAccessor()
|
||||
protected static function getFacadeAccessor(): string
|
||||
{
|
||||
return 'verta';
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ class VertaServiceProvider extends ServiceProvider
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
public function boot(): void
|
||||
{
|
||||
$this->loadValidators();
|
||||
|
||||
@@ -87,9 +87,9 @@ class VertaServiceProvider extends ServiceProvider
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
public function register(): void
|
||||
{
|
||||
$this->app->bind('verta', function ($app) {
|
||||
$this->app->bind('verta', function () {
|
||||
return new Verta();
|
||||
});
|
||||
}
|
||||
@@ -99,12 +99,12 @@ class VertaServiceProvider extends ServiceProvider
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provides()
|
||||
public function provides(): array
|
||||
{
|
||||
return ['verta'];
|
||||
}
|
||||
|
||||
public function loadValidators()
|
||||
public function loadValidators(): void
|
||||
{
|
||||
$className = JalaliValidator::class . '@';
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ class JalaliValidatorTest extends TestCase
|
||||
/***
|
||||
* provider for tests
|
||||
*/
|
||||
public static function correctDateFormatProvider()
|
||||
public static function correctDateFormatProvider(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@@ -112,7 +112,7 @@ class JalaliValidatorTest extends TestCase
|
||||
/**
|
||||
* provider for tests
|
||||
*/
|
||||
public static function incorrectDateFormatProvider()
|
||||
public static function incorrectDateFormatProvider(): array
|
||||
{
|
||||
return [
|
||||
[
|
||||
@@ -133,7 +133,7 @@ class JalaliValidatorTest extends TestCase
|
||||
/**
|
||||
* provider for tests
|
||||
*/
|
||||
public static function jalaliValidatorMethods()
|
||||
public static function jalaliValidatorMethods(): array
|
||||
{
|
||||
return [
|
||||
["validateDate"],
|
||||
@@ -155,7 +155,7 @@ class JalaliValidatorTest extends TestCase
|
||||
* @test
|
||||
* @dataProvider jalaliValidatorMethods
|
||||
*/
|
||||
public function whenJalaliValidatorSecoundArgumentIsEmpty($method)
|
||||
public function whenJalaliValidatorSecondArgumentIsEmpty($method)
|
||||
{
|
||||
$this->assertFalse(
|
||||
$this->jalaliValidator->{$method}(null, [], [])
|
||||
|
||||
Reference in new issue
Block a user