From 5db963666af9313f8185b0f3b2301b9be17bba93 Mon Sep 17 00:00:00 2001 From: Ilyas Salikhov Date: Tue, 1 Oct 2024 18:38:58 +0300 Subject: [PATCH] remove unused cache annotation param --- Annotation/ApiDoc.php | 29 ----------------------------- Tests/Annotation/ApiDocTest.php | 12 ------------ 2 files changed, 41 deletions(-) diff --git a/Annotation/ApiDoc.php b/Annotation/ApiDoc.php index 4db218e..c18145f 100644 --- a/Annotation/ApiDoc.php +++ b/Annotation/ApiDoc.php @@ -125,11 +125,6 @@ class ApiDoc */ private $route; - /** - * @var int - */ - private $cache; - /** * @var bool */ @@ -257,10 +252,6 @@ class ApiDoc } } - if (isset($data['cache'])) { - $this->setCache($data['cache']); - } - if (isset($data['section'])) { $this->section = $data['section']; } @@ -513,22 +504,6 @@ class ApiDoc $this->host = $host; } - /** - * @return int - */ - public function getCache() - { - return $this->cache; - } - - /** - * @param int $cache - */ - public function setCache($cache): void - { - $this->cache = (int) $cache; - } - /** * @return bool */ @@ -661,10 +636,6 @@ class ApiDoc $data['section'] = $section; } - if ($cache = $this->cache) { - $data['cache'] = $cache; - } - if ($tags = $this->tags) { $data['tags'] = $tags; } diff --git a/Tests/Annotation/ApiDocTest.php b/Tests/Annotation/ApiDocTest.php index 969a092..e9bafc3 100644 --- a/Tests/Annotation/ApiDocTest.php +++ b/Tests/Annotation/ApiDocTest.php @@ -203,18 +203,6 @@ class ApiDocTest extends TestCase } } - public function testConstructWithCache(): void - { - $data = [ - 'cache' => '60', - ]; - - $annot = new ApiDoc($data); - $array = $annot->toArray(); - - $this->assertEquals($data['cache'], $array['cache']); - } - public function testConstructWithRequirements(): void { $data = [