Skip to content

Commit 8a6a01a

Browse files
author
Andrew Welch
committed
chore: Craft CMS 3.x -> Craft CMS
1 parent b0a891f commit 8a6a01a

File tree

9 files changed

+26
-36
lines changed

9 files changed

+26
-36
lines changed

src/Transcoder.php

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Transcoder plugin for Craft CMS 3.x
3+
* Transcoder plugin for Craft CMS
44
*
55
* Transcode videos to various formats, and provide thumbnails of the video
66
*
@@ -10,21 +10,14 @@
1010

1111
namespace nystudio107\transcoder;
1212

13-
use nystudio107\transcoder\assetbundles\transcoder\TranscoderAsset;
14-
use nystudio107\transcoder\services\Transcode;
15-
use nystudio107\transcoder\variables\TranscoderVariable;
16-
use nystudio107\transcoder\models\Settings;
17-
18-
use nystudio107\pluginvite\services\VitePluginService;
19-
2013
use Craft;
2114
use craft\base\Plugin;
2215
use craft\console\Application as ConsoleApplication;
2316
use craft\elements\Asset;
2417
use craft\events\AssetThumbEvent;
2518
use craft\events\PluginEvent;
26-
use craft\events\RegisterUrlRulesEvent;
2719
use craft\events\RegisterCacheOptionsEvent;
20+
use craft\events\RegisterUrlRulesEvent;
2821
use craft\helpers\Assets as AssetsHelper;
2922
use craft\helpers\FileHelper;
3023
use craft\helpers\UrlHelper;
@@ -33,7 +26,11 @@
3326
use craft\utilities\ClearCaches;
3427
use craft\web\twig\variables\CraftVariable;
3528
use craft\web\UrlManager;
36-
29+
use nystudio107\pluginvite\services\VitePluginService;
30+
use nystudio107\transcoder\assetbundles\transcoder\TranscoderAsset;
31+
use nystudio107\transcoder\models\Settings;
32+
use nystudio107\transcoder\services\Transcode;
33+
use nystudio107\transcoder\variables\TranscoderVariable;
3734
use yii\base\ErrorException;
3835
use yii\base\Event;
3936

@@ -44,9 +41,9 @@
4441
* @package Transcode
4542
* @since 1.0.0
4643
*
47-
* @property Transcode $transcode
48-
* @property Settings $settings
49-
* @property VitePluginService $vite
44+
* @property Transcode $transcode
45+
* @property Settings $settings
46+
* @property VitePluginService $vite
5047
* @method Settings getSettings()
5148
*/
5249
class Transcoder extends Plugin

src/assetbundles/transcoder/TranscoderAsset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Transcoder plugin for Craft CMS 3.x
3+
* Transcoder plugin for Craft CMS
44
*
55
* Transcode videos to various formats, and provide thumbnails of the video
66
*

src/config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/**
4-
* Transcoder plugin for Craft CMS 3.x
4+
* Transcoder plugin for Craft CMS
55
*
66
* Transcode videos to various formats, and provide thumbnails of the video
77
*

src/console/controllers/DefaultController.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Transcode plugin for Craft CMS 3.x
3+
* Transcode plugin for Craft CMS
44
*
55
* Transcode
66
*
@@ -10,11 +10,7 @@
1010

1111
namespace nystudio107\transcoder\console\controllers;
1212

13-
use nystudio107\transcoder\Transcoder;
14-
15-
use Craft;
1613
use yii\console\Controller;
17-
use yii\helpers\Console;
1814

1915
/**
2016
* Default Command

src/controllers/DefaultController.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Transcoder plugin for Craft CMS 3.x
3+
* Transcoder plugin for Craft CMS
44
*
55
* Transcode videos to various formats, and provide thumbnails of the video
66
*
@@ -10,13 +10,12 @@
1010

1111
namespace nystudio107\transcoder\controllers;
1212

13-
use nystudio107\transcoder\Transcoder;
14-
1513
use Craft;
1614
use craft\errors\AssetDisallowedExtensionException;
1715
use craft\helpers\Json as JsonHelper;
1816
use craft\helpers\Path as PathHelper;
1917
use craft\web\Controller;
18+
use nystudio107\transcoder\Transcoder;
2019
use yii\web\BadRequestHttpException;
2120

2221
/**
@@ -77,7 +76,7 @@ public function actionDownloadFile($url)
7776
throw new AssetDisallowedExtensionException("File “{$filePath}” cannot be downloaded because “{$extension}” is not allowed.");
7877
}
7978

80-
$filePath = $_SERVER['DOCUMENT_ROOT'].$filePath;
79+
$filePath = $_SERVER['DOCUMENT_ROOT'] . $filePath;
8180
Craft::$app->getResponse()->sendFile(
8281
$filePath,
8382
null,
@@ -101,7 +100,7 @@ public function actionDownloadFile($url)
101100
public function actionProgress($filename)
102101
{
103102
$result = [];
104-
$progressFile = sys_get_temp_dir().DIRECTORY_SEPARATOR.$filename.'.progress';
103+
$progressFile = sys_get_temp_dir() . DIRECTORY_SEPARATOR . $filename . '.progress';
105104
if (file_exists($progressFile)) {
106105
$content = @file_get_contents($progressFile);
107106
if ($content) {

src/models/Settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Transcoder plugin for Craft CMS 3.x
3+
* Transcoder plugin for Craft CMS
44
*
55
* Transcode videos to various formats, and provide thumbnails of the video
66
*

src/services/Transcode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Transcoder plugin for Craft CMS 3.x
3+
* Transcoder plugin for Craft CMS
44
*
55
* Transcode videos to various formats, and provide thumbnails of the video
66
*

src/translations/en/transcoder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Transcoder plugin for Craft CMS 3.x
3+
* Transcoder plugin for Craft CMS
44
*
55
* Transcode videos to various formats, and provide thumbnails of the video
66
*
@@ -14,8 +14,8 @@
1414
* @since 1.0.0
1515
*/
1616
return [
17-
'Transcoder caches' => 'Transcoder caches',
18-
'{name} plugin loaded' => '{name} plugin loaded',
17+
'Transcoder caches' => 'Transcoder caches',
18+
'{name} plugin loaded' => '{name} plugin loaded',
1919
'{name} cache directory cleared' => '{name} cache directory cleared',
2020
'Manifest file not found at: {manifestPath}' => 'Manifest file not found at: {manifestPath}',
2121
'Module does not exist in the manifest: {moduleName}' => 'Module does not exist in the manifest: {moduleName}'

src/variables/TranscoderVariable.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22
/**
3-
* Transcoder plugin for Craft CMS 3.x
3+
* Transcoder plugin for Craft CMS
44
*
55
* Transcode videos to various formats, and provide thumbnails of the video
66
*
@@ -10,12 +10,10 @@
1010

1111
namespace nystudio107\transcoder\variables;
1212

13-
use nystudio107\transcoder\Transcoder;
14-
13+
use craft\helpers\UrlHelper;
1514
use nystudio107\pluginvite\variables\ViteVariableInterface;
1615
use nystudio107\pluginvite\variables\ViteVariableTrait;
17-
18-
use craft\helpers\UrlHelper;
16+
use nystudio107\transcoder\Transcoder;
1917

2018
/**
2119
* @author nystudio107
@@ -161,7 +159,7 @@ public function getDownloadUrl($url): string
161159
{
162160
$result = '';
163161
$filePath = parse_url($url, PHP_URL_PATH);
164-
$filePath = $_SERVER['DOCUMENT_ROOT'].$filePath;
162+
$filePath = $_SERVER['DOCUMENT_ROOT'] . $filePath;
165163
if (file_exists($filePath)) {
166164
$urlParams = [
167165
'url' => $url,

0 commit comments

Comments
 (0)