Skip to content

Commit b090bca

Browse files
committed
Merge branch 'feature/data-exception-interface'
2 parents 1f46323 + 514a225 commit b090bca

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/DataExceptionInterface.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
4+
namespace HalloVerden\HttpExceptions;
5+
6+
7+
interface DataExceptionInterface {
8+
9+
/**
10+
* @return array|null
11+
*/
12+
public function getData(): ?array;
13+
}

src/Http/HttpException.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33

44
namespace HalloVerden\HttpExceptions\Http;
55

6+
use HalloVerden\HttpExceptions\DataExceptionInterface;
7+
68
/**
79
* Class HttpException
810
*
911
* @package HalloVerden\HttpExceptions\Http
1012
*/
11-
class HttpException extends \Symfony\Component\HttpKernel\Exception\HttpException {
13+
class HttpException extends \Symfony\Component\HttpKernel\Exception\HttpException implements DataExceptionInterface {
1214
/**
1315
* @var array|null
1416
*/

0 commit comments

Comments
 (0)