@@ -28,11 +28,11 @@ discard block |
||
| 28 | 28 | /** |
| 29 | 29 | * @inheritdoc |
| 30 | 30 | */ |
| 31 | - public function __construct(array $config = []) |
|
| 31 | + public function __construct(array $config = [ ]) |
|
| 32 | 32 | { |
| 33 | 33 | // Unset any deprecated properties |
| 34 | 34 | if (!empty($config)) { |
| 35 | - unset($config['transcoderPath'], $config['transcoderUrl']); |
|
| 35 | + unset($config[ 'transcoderPath' ], $config[ 'transcoderUrl' ]); |
|
| 36 | 36 | } |
| 37 | 37 | parent::__construct($config); |
| 38 | 38 | } |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | public function init() |
| 227 | 227 | { |
| 228 | 228 | $tokens = [ |
| 229 | - '{DOCUMENT_ROOT}' => $_SERVER['DOCUMENT_ROOT'], |
|
| 229 | + '{DOCUMENT_ROOT}' => $_SERVER[ 'DOCUMENT_ROOT' ], |
|
| 230 | 230 | ]; |
| 231 | 231 | $this->transcoderPath = str_replace(array_keys($tokens), array_values($tokens), $this->transcoderPath); |
| 232 | 232 | } |
@@ -237,25 +237,25 @@ discard block |
||
| 237 | 237 | public function rules() |
| 238 | 238 | { |
| 239 | 239 | return [ |
| 240 | - ['ffmpegPath', 'string'], |
|
| 241 | - ['ffmpegPath', 'required'], |
|
| 242 | - ['ffprobePath', 'string'], |
|
| 243 | - ['ffprobePath', 'required'], |
|
| 244 | - ['ffprobeOptions', 'string'], |
|
| 245 | - ['ffprobeOptions', 'safe'], |
|
| 246 | - ['transcoderPath', 'string'], |
|
| 247 | - ['transcoderPath', 'required'], |
|
| 248 | - ['transcoderPaths', 'array'], |
|
| 249 | - ['transcoderPaths', 'required'], |
|
| 250 | - ['transcoderUrls', 'array'], |
|
| 251 | - ['transcoderUrls', 'required'], |
|
| 252 | - ['useHashedNames', 'boolean'], |
|
| 253 | - ['useHashedNames', 'default', 'value' => false], |
|
| 254 | - ['videoEncoders', 'required'], |
|
| 255 | - ['audioEncoders', 'required'], |
|
| 256 | - ['defaultVideoOptions', 'required'], |
|
| 257 | - ['defaultThumbnailOptions', 'required'], |
|
| 258 | - ['defaultAudioOptions', 'required'], |
|
| 240 | + [ 'ffmpegPath', 'string' ], |
|
| 241 | + [ 'ffmpegPath', 'required' ], |
|
| 242 | + [ 'ffprobePath', 'string' ], |
|
| 243 | + [ 'ffprobePath', 'required' ], |
|
| 244 | + [ 'ffprobeOptions', 'string' ], |
|
| 245 | + [ 'ffprobeOptions', 'safe' ], |
|
| 246 | + [ 'transcoderPath', 'string' ], |
|
| 247 | + [ 'transcoderPath', 'required' ], |
|
| 248 | + [ 'transcoderPaths', 'array' ], |
|
| 249 | + [ 'transcoderPaths', 'required' ], |
|
| 250 | + [ 'transcoderUrls', 'array' ], |
|
| 251 | + [ 'transcoderUrls', 'required' ], |
|
| 252 | + [ 'useHashedNames', 'boolean' ], |
|
| 253 | + [ 'useHashedNames', 'default', 'value' => false ], |
|
| 254 | + [ 'videoEncoders', 'required' ], |
|
| 255 | + [ 'audioEncoders', 'required' ], |
|
| 256 | + [ 'defaultVideoOptions', 'required' ], |
|
| 257 | + [ 'defaultThumbnailOptions', 'required' ], |
|
| 258 | + [ 'defaultAudioOptions', 'required' ], |
|
| 259 | 259 | ]; |
| 260 | 260 | } |
| 261 | 261 | } |