Skip to content

Commit ddb51d9

Browse files
nextcloud-commandjoshtrichards
authored andcommitted
refactor: Apply rector changes
Signed-off-by: GitHub <noreply@github.com>
1 parent ff07c99 commit ddb51d9

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

core/Controller/UpdateController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
use OCP\AppFramework\Http\Attribute\OpenAPI;
2626
use OCP\AppFramework\Http\Attribute\PublicPage;
2727
use OCP\AppFramework\Http\DataResponse;
28+
use OCP\AppFramework\OCSController;
2829
use OCP\EventDispatcher\IEventDispatcher;
2930
use OCP\IConfig;
3031
use OCP\IEventSourceFactory;
@@ -34,7 +35,7 @@
3435
use Psr\Log\LoggerInterface;
3536

3637
#[OpenAPI(scope: OpenApi::SCOPE_IGNORE)]
37-
class UpdateController extends \OCP\AppFramework\OCSController {
38+
class UpdateController extends OCSController {
3839
public function __construct(
3940
string $appName,
4041
IRequest $request,

lib/private/Files/Cache/Cache.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
use OCP\Files\Cache\CacheEntryInsertedEvent;
2525
use OCP\Files\Cache\CacheEntryRemovedEvent;
2626
use OCP\Files\Cache\CacheEntryUpdatedEvent;
27-
use OCP\Files\Cache\CacheInsertEvent;
28-
use OCP\Files\Cache\CacheUpdateEvent;
2927
use OCP\Files\Cache\ICache;
3028
use OCP\Files\Cache\ICacheEntry;
3129
use OCP\Files\Config\IUserMountCache;
@@ -333,7 +331,7 @@ public function insert($file, array $data) {
333331
}
334332

335333
$event = new CacheEntryInsertedEvent($this->storage, $file, $fileId, $storageId);
336-
$this->eventDispatcher->dispatch(CacheInsertEvent::class, $event);
334+
$this->eventDispatcher->dispatch(CacheEntryInsertedEvent::class, $event);
337335
$this->eventDispatcher->dispatchTyped($event);
338336
return $fileId;
339337
}
@@ -437,7 +435,7 @@ public function update($id, array $data) {
437435
// path can still be null if the file doesn't exist
438436
if ($path !== null) {
439437
$event = new CacheEntryUpdatedEvent($this->storage, $path, $id, $this->getNumericStorageId());
440-
$this->eventDispatcher->dispatch(CacheUpdateEvent::class, $event);
438+
$this->eventDispatcher->dispatch(CacheEntryUpdatedEvent::class, $event);
441439
$this->eventDispatcher->dispatchTyped($event);
442440
}
443441
}
@@ -851,11 +849,11 @@ public function moveFromCache(ICache $sourceCache, $sourcePath, $targetPath) {
851849
$this->eventDispatcher->dispatchTyped(new CacheEntriesRemovedEvent([$event]));
852850

853851
$event = new CacheEntryInsertedEvent($this->storage, $targetPath, $sourceId, $this->getNumericStorageId());
854-
$this->eventDispatcher->dispatch(CacheInsertEvent::class, $event);
852+
$this->eventDispatcher->dispatch(CacheEntryInsertedEvent::class, $event);
855853
$this->eventDispatcher->dispatchTyped($event);
856854
} else {
857855
$event = new CacheEntryUpdatedEvent($this->storage, $targetPath, $sourceId, $this->getNumericStorageId());
858-
$this->eventDispatcher->dispatch(CacheUpdateEvent::class, $event);
856+
$this->eventDispatcher->dispatch(CacheEntryUpdatedEvent::class, $event);
859857
$this->eventDispatcher->dispatchTyped($event);
860858
}
861859
} else {

0 commit comments

Comments
 (0)