Skip to content

Commit

Permalink
feat: validate command (#112)
Browse files Browse the repository at this point in the history
* feat: validate command

* feat: custom bundle loading support

* fix: default to Spout

* fix: disable Symfony cache
  • Loading branch information
dkarlovi authored Jan 8, 2021
1 parent fdc23bb commit 53e960a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Iterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

interface Iterator extends \Iterator
{
public function current(): ?object;
public function current(): object;

public function key(): int;

Expand Down
2 changes: 1 addition & 1 deletion ReverseIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function __construct(Iterator $iterator, int $startIndex, int $endIndex)
/**
* {@inheritdoc}
*/
public function current(): ?object
public function current(): object
{
return $this->iterator->current();
}
Expand Down
4 changes: 2 additions & 2 deletions Test/FakeIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ public function rewind(): void
/**
* {@inheritdoc}
*/
public function current(): ?object
public function current(): object
{
/** @var null|object $current */
/** @var object $current */
$current = $this->iterator->current();

return $current;
Expand Down
19 changes: 19 additions & 0 deletions Validator.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

declare(strict_types=1);

/*
* This file is part of the xezilaires project.
*
* (c) Dalibor Karlović <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

namespace Xezilaires;

interface Validator
{
public function validate(object $object): \Symfony\Component\Validator\ConstraintViolationListInterface;
}

0 comments on commit 53e960a

Please sign in to comment.