diff --git a/src/Http/Json/Problem/ProblemFactory.php b/src/Http/Json/Problem/ProblemFactory.php index 419d8405..a2914ea7 100644 --- a/src/Http/Json/Problem/ProblemFactory.php +++ b/src/Http/Json/Problem/ProblemFactory.php @@ -37,25 +37,6 @@ */ class ProblemFactory { - /** - * Returns an array containing of the json representative for the made Problem, - * and the second index is the status used. - * - * @param int $status - * @param string|null $title - * @param string|null $detail - * @return array - */ - public static function makeJson(int $status, string $title = null, string $detail = null): array - { - $made = self::make($status, $title, $detail); - - return [ - $made->toJson(), - $made->getStatus() - ]; - } - /** * Returns a new Problem based on the status submitted. diff --git a/tests/Http/Json/Problem/ProblemFactoryTest.php b/tests/Http/Json/Problem/ProblemFactoryTest.php index 2e8aab9d..66d6511e 100644 --- a/tests/Http/Json/Problem/ProblemFactoryTest.php +++ b/tests/Http/Json/Problem/ProblemFactoryTest.php @@ -80,24 +80,4 @@ public function testMake() $this->assertSame("detail", $problem->getDetail()); } - /** - * test makeJson() - */ - public function testMakeJson() - { - $statuses = [400, 405, 500, 123442]; - - foreach ($statuses as $status) { - $problem = ProblemFactory::makeJson($status, "title", "detail"); - $this->assertIsArray($problem[0]); - $this->assertSame( - ProblemFactory::make($status, "title", "detail")->toJson(), - $problem[0] - ); - $this->assertSame( - $status, - $problem[1] - ); - } - } }