engelsystem/tests/Unit/Http/Validation/Stub/ValidatesRequestImplementat...

24 lines
498 B
PHP
Raw Normal View History

2019-07-09 21:43:18 +02:00
<?php
namespace Engelsystem\Test\Unit\Http\Validation\Stub;
use Engelsystem\Controllers\BaseController;
use Engelsystem\Http\Request;
class ValidatesRequestImplementation extends BaseController
{
/**
* @param array $rules
* @return array
*/
public function validateData(Request $request, array $rules): array
2019-07-09 21:43:18 +02:00
{
return $this->validate($request, $rules);
}
public function hasValidator(): bool
2019-07-09 21:43:18 +02:00
{
return !is_null($this->validator);
}
}