Skip to content

Commit d167965

Browse files
authored
Reordered the $class variable
1 parent 3bc3da9 commit d167965

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/FlushQueryCacheObserver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ public function restored(Model $model)
7171
*/
7272
protected function invalidateCache(Model $model): void
7373
{
74+
$class = get_class($model);
75+
7476
if (! $model->getCacheTagsToInvalidateOnUpdate()) {
7577
throw new Exception('Automatic invalidation for '.$class.' works only if at least one tag to be invalidated is specified.');
7678
}
7779

78-
$class = get_class($model);
79-
8080
$class::flushQueryCache(
8181
$model->getCacheTagsToInvalidateOnUpdate()
8282
);

0 commit comments

Comments
 (0)