Skip to content

Commit

Permalink
Fixed code style
Browse files Browse the repository at this point in the history
  • Loading branch information
Steveb-p committed Nov 14, 2024
1 parent 255aadc commit 1e78182
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/contracts/Validation/AbstractValidationStructWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
/**
* @template T of object
*
* @implements \Ibexa\Contracts\Core\Validation\ValidatorStructWrapperInterface<T>
* @implements \Ibexa\Contracts\Core\Validation\ValidationStructWrapperInterface<T>
*/
abstract class AbstractValidationStructWrapper implements ValidatorStructWrapperInterface
abstract class AbstractValidationStructWrapper implements ValidationStructWrapperInterface
{
/**
* @phpstan-var T
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use Symfony\Component\Validator\Validator\ContextualValidatorInterface;
use Symfony\Component\Validator\Validator\ValidatorInterface;

final class StructValidator implements ValidatorInterface
final class StructWrapperValidator implements ValidatorInterface
{
private ValidatorInterface $inner;

Expand All @@ -37,7 +37,7 @@ public function validate($value, $constraints = null, $groups = null): Constrain
{
$result = $this->inner->validate($value, $constraints, $groups);

if (!$value instanceof ValidatorStructWrapperInterface) {
if (!$value instanceof ValidationStructWrapperInterface) {
return $result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* @template T of object
*/
interface ValidatorStructWrapperInterface
interface ValidationStructWrapperInterface
{
public function getStructName(): string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*/
namespace Ibexa\Tests\Core\Validation;

use Ibexa\Contracts\Core\Validation\StructValidator;
use Ibexa\Contracts\Core\Validation\ValidatorStructWrapperInterface;
use Ibexa\Contracts\Core\Validation\StructWrapperValidator;
use Ibexa\Contracts\Core\Validation\ValidationStructWrapperInterface;
use PHPUnit\Framework\TestCase;
use stdClass;
use Symfony\Component\Validator\ConstraintViolation;
Expand All @@ -17,19 +17,19 @@
use Symfony\Component\Validator\Validator\ValidatorInterface;

/**
* @covers \Ibexa\Contracts\Core\Validation\StructValidator
* @covers \Ibexa\Contracts\Core\Validation\StructWrapperValidator
*/
final class StructValidatorTest extends TestCase
final class StructWrapperValidatorTest extends TestCase
{
/** @var \Symfony\Component\Validator\Validator\ValidatorInterface&\PHPUnit\Framework\MockObject\MockObject */
private ValidatorInterface $validator;

private StructValidator $structValidator;
private StructWrapperValidator $structValidator;

protected function setUp(): void
{
$this->validator = $this->createMock(ValidatorInterface::class);
$this->structValidator = new StructValidator($this->validator);
$this->structValidator = new StructWrapperValidator($this->validator);
}

public function testAssertValidStructWithValidStruct(): void
Expand Down Expand Up @@ -80,7 +80,7 @@ public function testAssertValidStructWithInvalidWrapperStruct(): void
$initialError = $this->createExampleConstraintViolation();
$initialErrors = $this->createExampleConstraintViolationList($initialError);

$wrapper = $this->createMock(ValidatorStructWrapperInterface::class);
$wrapper = $this->createMock(ValidationStructWrapperInterface::class);
$wrapper->expects(self::once())
->method('getStructName')
->willReturn('$struct');
Expand Down

0 comments on commit 1e78182

Please sign in to comment.