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
|
|
|
|
{
|
2022-12-14 19:15:20 +01:00
|
|
|
public function validateData(Request $request, array $rules): array
|
2019-07-09 21:43:18 +02:00
|
|
|
{
|
|
|
|
return $this->validate($request, $rules);
|
|
|
|
}
|
|
|
|
|
2022-12-14 19:15:20 +01:00
|
|
|
public function hasValidator(): bool
|
2019-07-09 21:43:18 +02:00
|
|
|
{
|
|
|
|
return !is_null($this->validator);
|
|
|
|
}
|
|
|
|
}
|