Skip to content

Commit

Permalink
drop invalid comments + remove prev argument for NotEnoughValidSchema…
Browse files Browse the repository at this point in the history
…s and TooManyValidSchemas exception classes
  • Loading branch information
ckilb committed Jan 22, 2020
1 parent 9ef0a62 commit 1418a09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
6 changes: 2 additions & 4 deletions src/Schema/Exception/NotEnoughValidSchemas.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

use Throwable;

// Indicates that data was not matched against a combination of schema keywords
class NotEnoughValidSchemas extends KeywordMismatch
{
/** @var Throwable[] */
Expand All @@ -22,10 +21,9 @@ public static function fromKeywordWithInnerExceptions(
string $keyword,
$data,
array $innerExceptions,
?string $message = null,
?Throwable $prev = null
?string $message = null
) : KeywordMismatch {
$instance = new self('Keyword validation failed: ' . $message, 0, $prev);
$instance = new self('Keyword validation failed: ' . $message, 0);
$instance->keyword = $keyword;
$instance->data = $data;
$instance->innerExceptions = $innerExceptions;
Expand Down
7 changes: 2 additions & 5 deletions src/Schema/Exception/TooManyValidSchemas.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
namespace League\OpenAPIValidation\Schema\Exception;

use cebe\openapi\spec\Schema;
use Throwable;

// Indicates that data was not matched against a combination of schema keywords
class TooManyValidSchemas extends KeywordMismatch
{
/** @var Schema[] */
Expand All @@ -23,10 +21,9 @@ public static function fromKeywordWithValidSchemas(
string $keyword,
$data,
array $validSchemas,
?string $message = null,
?Throwable $prev = null
?string $message = null
) : KeywordMismatch {
$instance = new self('Keyword validation failed: ' . $message, 0, $prev);
$instance = new self('Keyword validation failed: ' . $message, 0);
$instance->keyword = $keyword;
$instance->data = $data;
$instance->validSchemas = $validSchemas;
Expand Down

0 comments on commit 1418a09

Please sign in to comment.