Skip to content

Commit

Permalink
fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
CJayHe committed Apr 10, 2024
1 parent eb34798 commit d12c8f1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Business/SnapshotBusiness/SnapshotBusiness.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct(ContainerInterface $container)
$this->snapshotRepository = $this->em->getRepository('App:Snapshot');
}

public function setValue($key, $value)
public function setValue($key, $value) : bool
{
$snapshot = $this->snapshotRepository->findOneBy(['configKey' => $key]);

Expand Down Expand Up @@ -81,10 +81,14 @@ public function getValue($key, $def = '', $isUse = false)
return $content;
}

public function hasKey($key)
public function hasKey($key) :bool
{
return !empty($this->snapshotRepository->findOneBy([
if(array_key_exists($key, self::$caches)){
return true;
}

return $this->snapshotRepository->isExist([
'configKey' => $key
]));
]);
}
}

0 comments on commit d12c8f1

Please sign in to comment.