Skip to content

Commit 6037edc

Browse files
committed
refactor: ECS code cleanup
1 parent 95df5bd commit 6037edc

File tree

7 files changed

+10
-11
lines changed

7 files changed

+10
-11
lines changed

src/Transcoder.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ protected function addComponents()
154154
Event::on(
155155
CraftVariable::class,
156156
CraftVariable::EVENT_INIT,
157-
function (Event $event) {
157+
function(Event $event) {
158158
/** @var CraftVariable $variable */
159159
$variable = $event->sender;
160160
$variable->set('transcoder', [
@@ -175,7 +175,7 @@ protected function installEventHandlers()
175175
Event::on(
176176
Assets::class,
177177
Assets::EVENT_GET_THUMB_PATH,
178-
function (AssetThumbEvent $event) {
178+
function(AssetThumbEvent $event) {
179179
Craft::debug(
180180
'Assets::EVENT_GET_THUMB_PATH',
181181
__METHOD__
@@ -195,7 +195,7 @@ function (AssetThumbEvent $event) {
195195
Event::on(
196196
ClearCaches::class,
197197
ClearCaches::EVENT_REGISTER_CACHE_OPTIONS,
198-
function (RegisterCacheOptionsEvent $event) {
198+
function(RegisterCacheOptionsEvent $event) {
199199
$event->options[] = [
200200
'key' => 'transcoder',
201201
'label' => Craft::t('transcoder', 'Transcoder caches'),
@@ -208,7 +208,7 @@ function (RegisterCacheOptionsEvent $event) {
208208
Event::on(
209209
Plugins::class,
210210
Plugins::EVENT_AFTER_INSTALL_PLUGIN,
211-
function (PluginEvent $event) {
211+
function(PluginEvent $event) {
212212
if ($event->plugin === $this) {
213213
$request = Craft::$app->getRequest();
214214
if ($request->isCpRequest) {
@@ -233,7 +233,7 @@ protected function installSiteEventListeners()
233233
Event::on(
234234
UrlManager::class,
235235
UrlManager::EVENT_REGISTER_SITE_URL_RULES,
236-
function (RegisterUrlRulesEvent $event) {
236+
function(RegisterUrlRulesEvent $event) {
237237
Craft::debug(
238238
'UrlManager::EVENT_REGISTER_SITE_URL_RULES',
239239
__METHOD__

src/config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
'timeInSecs' => '',
162162
'seekInSecs' => '',
163163
'synchronous' => false,
164-
'stripMetadata' => false
164+
'stripMetadata' => false,
165165
],
166166

167167
// Default options for Gif encoding

src/controllers/DefaultController.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
*/
2626
class DefaultController extends Controller
2727
{
28-
2928
// Protected Properties
3029
// =========================================================================
3130

src/models/Settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ class Settings extends Model
215215
'audioSampleRate' => '44100',
216216
'audioChannels' => '2',
217217
'synchronous' => false,
218-
'stripMetadata' => false
218+
'stripMetadata' => false,
219219
];
220220

221221
/**

src/services/ServicesTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function __construct($id, $parent = null, array $config = [])
4949
'devServerInternal' => 'http://craft-transcoder-buildchain:3001',
5050
'checkDevServer' => true,
5151
],
52-
]
52+
],
5353
], $config);
5454

5555
parent::__construct($id, $parent, $config);

src/services/Transcode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public function getVideoUrl($filePath, $videoOptions, $generate = true): string
207207
if (file_exists($destVideoPath) && (@filemtime($destVideoPath) >= @filemtime($filePath))) {
208208
$url = $settings['transcoderUrls']['video'] . $subfolder ?? $settings['transcoderUrls']['default'];
209209
$result = Craft::parseEnv($url) . $destVideoFile;
210-
// skip encoding
210+
// skip encoding
211211
} elseif (!$generate) {
212212
$result = "";
213213
} else {

src/translations/en/transcoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
'{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}',
21-
'Module does not exist in the manifest: {moduleName}' => 'Module does not exist in the manifest: {moduleName}'
21+
'Module does not exist in the manifest: {moduleName}' => 'Module does not exist in the manifest: {moduleName}',
2222
];

0 commit comments

Comments
 (0)