Run PHP-CS-FIXER to make sure

code is consisted with PSR-1 + PSR-2
This commit is contained in:
eldadfux committed 2019-09-06 20:04:26 +03:00
1 parent c9d3448571
commit 35680bbae9
37 files changed
+928 -753

No files matched your search

+7 -5
View File
@@ -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;
}
}
}
+5 -4
View File
@@ -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;
}
}
}