remove unused cache annotation param

This commit is contained in:
Ilyas Salikhov 2024-10-01 18:38:58 +03:00
parent 990b781322
commit 5db963666a
2 changed files with 0 additions and 41 deletions

View File

@ -125,11 +125,6 @@ class ApiDoc
*/ */
private $route; private $route;
/**
* @var int
*/
private $cache;
/** /**
* @var bool * @var bool
*/ */
@ -257,10 +252,6 @@ class ApiDoc
} }
} }
if (isset($data['cache'])) {
$this->setCache($data['cache']);
}
if (isset($data['section'])) { if (isset($data['section'])) {
$this->section = $data['section']; $this->section = $data['section'];
} }
@ -513,22 +504,6 @@ class ApiDoc
$this->host = $host; $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 * @return bool
*/ */
@ -661,10 +636,6 @@ class ApiDoc
$data['section'] = $section; $data['section'] = $section;
} }
if ($cache = $this->cache) {
$data['cache'] = $cache;
}
if ($tags = $this->tags) { if ($tags = $this->tags) {
$data['tags'] = $tags; $data['tags'] = $tags;
} }

View File

@ -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 public function testConstructWithRequirements(): void
{ {
$data = [ $data = [