1414use Casbin \Persist \AdapterHelper ;
1515use DateTime ;
1616use Casbin \Exceptions \InvalidFilterTypeException ;
17+ use Throwable ;
1718
1819/**
1920 * DatabaseAdapter.
@@ -182,6 +183,7 @@ public function removePolicy(string $sec, string $ptype, array $rule): void
182183 * @param string $sec
183184 * @param string $ptype
184185 * @param string[][] $rules
186+ * @throws Throwable
185187 */
186188 public function removePolicies (string $ sec , string $ ptype , array $ rules ): void
187189 {
@@ -229,11 +231,12 @@ public function _removeFilteredPolicy(string $sec, string $ptype, int $fieldInde
229231 * RemoveFilteredPolicy removes policy rules that match the filter from the storage.
230232 * This is part of the Auto-Save feature.
231233 *
232- * @param string $sec
233- * @param string $ptype
234- * @param int $fieldIndex
234+ * @param string $sec
235+ * @param string $ptype
236+ * @param int $fieldIndex
235237 * @param string|null ...$fieldValues
236238 * @return void
239+ * @throws Throwable
237240 */
238241 public function removeFilteredPolicy (string $ sec , string $ ptype , int $ fieldIndex , ?string ...$ fieldValues ): void
239242 {
@@ -276,6 +279,7 @@ public function updatePolicy(string $sec, string $ptype, array $oldRule, array $
276279 * @param string[][] $oldRules
277280 * @param string[][] $newRules
278281 * @return void
282+ * @throws Throwable
279283 */
280284 public function updatePolicies (string $ sec , string $ ptype , array $ oldRules , array $ newRules ): void
281285 {
@@ -295,6 +299,7 @@ public function updatePolicies(string $sec, string $ptype, array $oldRules, arra
295299 * @param integer $fieldIndex
296300 * @param string ...$fieldValues
297301 * @return array
302+ * @throws Throwable
298303 */
299304 public function updateFilteredPolicies (string $ sec , string $ ptype , array $ newPolicies , int $ fieldIndex , string ...$ fieldValues ): array
300305 {
@@ -311,6 +316,7 @@ public function updateFilteredPolicies(string $sec, string $ptype, array $newPol
311316 *
312317 * @param Model $model
313318 * @param mixed $filter
319+ * @throws InvalidFilterTypeException
314320 */
315321 public function loadFilteredPolicy (Model $ model , $ filter ): void
316322 {
0 commit comments