mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Run PHP-CS-FIXER to make sure
code is consisted with PSR-1 + PSR-2
This commit is contained in:
1 parent
c9d3448571
commit
35680bbae9
37 files changed
+928
-753
No files matched your search
@@ -13,6 +13,7 @@ class Local extends Device
|
||||
|
||||
/**
|
||||
* Local constructor.
|
||||
*
|
||||
* @param string $root
|
||||
*/
|
||||
public function __construct($root = '')
|
||||
@@ -41,21 +42,22 @@ class Local extends Device
|
||||
*/
|
||||
public function getRoot()
|
||||
{
|
||||
return '/storage/uploads/' . $this->root;
|
||||
return '/storage/uploads/'.$this->root;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $filename
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPath($filename)
|
||||
{
|
||||
$path = '';
|
||||
|
||||
for ($i = 0; $i < 4; $i++) {
|
||||
$path = ($i < strlen($filename)) ? $path . DIRECTORY_SEPARATOR . $filename[$i] : $path . DIRECTORY_SEPARATOR . 'x';
|
||||
for ($i = 0; $i < 4; ++$i) {
|
||||
$path = ($i < strlen($filename)) ? $path.DIRECTORY_SEPARATOR.$filename[$i] : $path.DIRECTORY_SEPARATOR.'x';
|
||||
}
|
||||
|
||||
return $this->getRoot() . $path . DIRECTORY_SEPARATOR . $filename;
|
||||
return $this->getRoot().$path.DIRECTORY_SEPARATOR.$filename;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,16 +32,17 @@ class S3 extends Device
|
||||
|
||||
/**
|
||||
* @param string $filename
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPath($filename)
|
||||
{
|
||||
$path = '';
|
||||
|
||||
for ($i = 0; $i < 4; $i++) {
|
||||
$path = ($i < strlen($filename)) ? $path . DIRECTORY_SEPARATOR . $filename[$i] : $path . DIRECTORY_SEPARATOR . 'x';
|
||||
for ($i = 0; $i < 4; ++$i) {
|
||||
$path = ($i < strlen($filename)) ? $path.DIRECTORY_SEPARATOR.$filename[$i] : $path.DIRECTORY_SEPARATOR.'x';
|
||||
}
|
||||
|
||||
return $this->getRoot() . $path . DIRECTORY_SEPARATOR . $filename;
|
||||
return $this->getRoot().$path.DIRECTORY_SEPARATOR.$filename;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user