summaryrefslogtreecommitdiffstats
path: root/lib/private/Preview
diff options
context:
space:
mode:
authordependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>2021-01-12 09:15:48 +0000
committerChristoph Wurst <christoph@winzerhof-wurst.at>2021-02-18 13:31:24 +0100
commiteb502c02ff7693bb36318d857985f79e7bac370c (patch)
tree61a7a10839f0c3a19bf8af869af267c484b51e02 /lib/private/Preview
parentd79cc8ea6ddc6f562ed0eeffc13cdbedf5df81bb (diff)
downloadnextcloud-server-eb502c02ff7693bb36318d857985f79e7bac370c.tar.gz
nextcloud-server-eb502c02ff7693bb36318d857985f79e7bac370c.zip
Bump nextcloud/coding-standard from 0.3.0 to 0.5.0
Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Preview')
-rw-r--r--lib/private/Preview/Bitmap.php2
-rw-r--r--lib/private/Preview/HEIC.php2
-rw-r--r--lib/private/Preview/MarkDown.php4
-rw-r--r--lib/private/Preview/Office.php2
-rw-r--r--lib/private/Preview/ProviderV1Adapter.php2
5 files changed, 6 insertions, 6 deletions
diff --git a/lib/private/Preview/Bitmap.php b/lib/private/Preview/Bitmap.php
index 7322e07ab34..e8d8c7a3fa5 100644
--- a/lib/private/Preview/Bitmap.php
+++ b/lib/private/Preview/Bitmap.php
@@ -106,7 +106,7 @@ abstract class Bitmap extends ProviderV2 {
* @return \Imagick
*/
private function resize($bp, $maxX, $maxY) {
- list($previewWidth, $previewHeight) = array_values($bp->getImageGeometry());
+ [$previewWidth, $previewHeight] = array_values($bp->getImageGeometry());
// We only need to resize a preview which doesn't fit in the maximum dimensions
if ($previewWidth > $maxX || $previewHeight > $maxY) {
diff --git a/lib/private/Preview/HEIC.php b/lib/private/Preview/HEIC.php
index f9f85090a80..872db6f2ec9 100644
--- a/lib/private/Preview/HEIC.php
+++ b/lib/private/Preview/HEIC.php
@@ -122,7 +122,7 @@ class HEIC extends ProviderV2 {
* @return \Imagick
*/
private function resize($bp, $maxX, $maxY) {
- list($previewWidth, $previewHeight) = array_values($bp->getImageGeometry());
+ [$previewWidth, $previewHeight] = array_values($bp->getImageGeometry());
// We only need to resize a preview which doesn't fit in the maximum dimensions
if ($previewWidth > $maxX || $previewHeight > $maxY) {
diff --git a/lib/private/Preview/MarkDown.php b/lib/private/Preview/MarkDown.php
index d809c6a9443..d900c2b3ac2 100644
--- a/lib/private/Preview/MarkDown.php
+++ b/lib/private/Preview/MarkDown.php
@@ -75,8 +75,8 @@ class MarkDown extends TXT {
imagecolorallocate($image, 255, 255, 255);
$textColor = imagecolorallocate($image, 0, 0, 0);
- $fontFile = __DIR__ . '/../../../core/fonts/NotoSans-Regular.ttf';
- $fontFileBold = __DIR__ . '/../../../core/fonts/NotoSans-Bold.ttf';
+ $fontFile = __DIR__ . '/../../../core/fonts/NotoSans-Regular.ttf';
+ $fontFileBold = __DIR__ . '/../../../core/fonts/NotoSans-Bold.ttf';
$canUseTTF = function_exists('imagettftext');
diff --git a/lib/private/Preview/Office.php b/lib/private/Preview/Office.php
index 6719aeace8f..d6f9ac3dfd7 100644
--- a/lib/private/Preview/Office.php
+++ b/lib/private/Preview/Office.php
@@ -59,7 +59,7 @@ abstract class Office extends ProviderV2 {
//create imagick object from png
$pngPreview = null;
try {
- list($dirname, , , $filename) = array_values(pathinfo($absPath));
+ [$dirname, , , $filename] = array_values(pathinfo($absPath));
$pngPreview = $tmpDir . '/' . $filename . '.png';
$png = new \imagick($pngPreview . '[0]');
diff --git a/lib/private/Preview/ProviderV1Adapter.php b/lib/private/Preview/ProviderV1Adapter.php
index f09b0f47583..6f5242a5204 100644
--- a/lib/private/Preview/ProviderV1Adapter.php
+++ b/lib/private/Preview/ProviderV1Adapter.php
@@ -50,7 +50,7 @@ class ProviderV1Adapter implements IProviderV2 {
}
public function getThumbnail(File $file, int $maxX, int $maxY): ?IImage {
- list($view, $path) = $this->getViewAndPath($file);
+ [$view, $path] = $this->getViewAndPath($file);
$thumbnail = $this->providerV1->getThumbnail($path, $maxX, $maxY, false, $view);
return $thumbnail === false ? null: $thumbnail;
}