Skip to content

Commit 2482846

Browse files
committed
OS-110 refactoring, phpcs
1 parent 4681c85 commit 2482846

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

modules/os2forms_digital_signature/src/Controller/DigitalSignatureController.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
use Drupal\Core\File\FileSystemInterface;
1010
use Drupal\Core\Site\Settings;
1111
use Drupal\Core\Url;
12-
use Drupal\file\Entity\File;
1312
use Drupal\os2forms_digital_signature\Service\SigningService;
1413
use Psr\Log\LoggerInterface;
1514
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -25,7 +24,7 @@ class DigitalSignatureController extends ControllerBase {
2524
/**
2625
* File Storage.
2726
*
28-
* @var EntityStorageInterface
27+
* @var \Drupal\Core\Entity\EntityStorageInterface
2928
*/
3029
protected EntityStorageInterface $fileStorage;
3130

@@ -119,7 +118,7 @@ public function signCallback($uuid, $hash, $fid = NULL) {
119118
// If $fid is present - we are replacing uploaded/managed file, otherwise
120119
// creating a new one.
121120
if ($fid) {
122-
$file = File::load($fid);
121+
$file = $this->fileStorage->load($fid);
123122
$expectedFileUri = $file->getFileUri();
124123
}
125124
else {

0 commit comments

Comments
 (0)