Format code using php-cs-fixer

This commit is contained in:
jo 2021-10-11 16:10:47 +02:00
parent 43d7dc92cd
commit d52c6184b9
352 changed files with 17473 additions and 17041 deletions

View file

@ -10,7 +10,7 @@ class FileStorageBackend extends StorageBackend
public function getDownloadURLs($resourceId, $contentDispositionFilename)
{
return "";
return '';
}
public function deletePhysicalFile($resourceId)
@ -20,11 +20,11 @@ class FileStorageBackend extends StorageBackend
public function deleteAllCloudFileObjects()
{
return "";
return '';
}
public function getFilePrefix()
{
return "";
return '';
}
}

View file

@ -1,10 +1,7 @@
<?php
/**
*
* Controls access to the storage backend class where a file is stored.
*
*/
class ProxyStorageBackend extends StorageBackend
{
@ -13,6 +10,8 @@ class ProxyStorageBackend extends StorageBackend
/**
* Receives the file's storage backend and instantiates the appropriate
* object.
*
* @param mixed $storageBackend
*/
public function __construct($storageBackend)
{
@ -21,7 +20,7 @@ class ProxyStorageBackend extends StorageBackend
// The storage backend in the airtime.conf directly corresponds to
// the name of the class that implements it, so we can create the
// right backend object dynamically:
if ($storageBackend == "file") {
if ($storageBackend == 'file') {
$this->storageBackend = new FileStorageBackend();
} else {
$this->storageBackend = new $storageBackend($CC_CONFIG[$storageBackend]);
@ -42,7 +41,7 @@ class ProxyStorageBackend extends StorageBackend
{
$this->storageBackend->deletePhysicalFile($resourceId);
}
public function deleteAllCloudFileObjects()
{
$this->storageBackend->deleteAllCloudFileObjects();

View file

@ -1,7 +1,6 @@
<?php
/**
*
* Provides access to file objects stored on a specific storage backend.
*/
abstract class StorageBackend
@ -9,14 +8,16 @@ abstract class StorageBackend
private $bucket;
private $accessKey;
private $secretKey;
/** Returns the file object's URL to the storage backend it is located on. */
abstract public function getAbsoluteFilePath($resourceId);
/** Returns the file object's signed URL. The URL must be signed since they
/** Returns the file object's signed URL. The URL must be signed since they.
* @param mixed $resourceId
* @param mixed $contentDispositionFilename
* privately stored on the storage backend. */
abstract public function getDownloadURLs($resourceId, $contentDispositionFilename);
/** Deletes the file from the storage backend. */
abstract public function deletePhysicalFile($resourceId);
@ -31,27 +32,27 @@ abstract class StorageBackend
{
return $this->bucket;
}
protected function setBucket($bucket)
{
$this->bucket = $bucket;
}
protected function getAccessKey()
{
return $this->accessKey;
}
protected function setAccessKey($accessKey)
{
$this->accessKey = $accessKey;
}
protected function getSecretKey()
{
return $this->secretKey;
}
protected function setSecretKey($secretKey)
{
$this->secretKey = $secretKey;