@@ -504,7 +504,7 @@ |
||
| 504 | 504 | { |
| 505 | 505 | $privacyOptions = ['nobody', 'contacts', 'password', 'users', 'disable']; |
| 506 | 506 | |
| 507 | - if(in_array($data['privacy']['view'], $privacyOptions, true)) { |
|
| 507 | + if (in_array($data['privacy']['view'], $privacyOptions, true)) { |
|
| 508 | 508 | $video->private = true; |
| 509 | 509 | } |
| 510 | 510 | |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | */ |
| 29 | 29 | public static function getDuration($seconds): string |
| 30 | 30 | { |
| 31 | - $hours = (int)((int)$seconds / 3600); |
|
| 31 | + $hours = (int) ((int) $seconds / 3600); |
|
| 32 | 32 | $minutes = (($seconds / 60) % 60); |
| 33 | 33 | $seconds %= 60; |
| 34 | 34 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | public static function getDuration8601($seconds): string |
| 56 | 56 | { |
| 57 | - $hours = (int)((int)$seconds / 3600); |
|
| 57 | + $hours = (int) ((int) $seconds / 3600); |
|
| 58 | 58 | $minutes = (($seconds / 60) % 60); |
| 59 | 59 | $seconds %= 60; |
| 60 | 60 | |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | public function getEmbedHtml($videoId, array $options = []): string |
| 233 | 233 | { |
| 234 | 234 | $embedAttributes = [ |
| 235 | - 'title' => 'External video from ' . $this->getHandle(), |
|
| 235 | + 'title' => 'External video from '.$this->getHandle(), |
|
| 236 | 236 | 'frameborder' => '0', |
| 237 | 237 | 'allowfullscreen' => 'true', |
| 238 | 238 | 'allowscriptaccess' => 'true', |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | |
| 249 | 249 | $title = $options['title'] ?? false; |
| 250 | 250 | |
| 251 | - if($title) { |
|
| 251 | + if ($title) { |
|
| 252 | 252 | $this->parseEmbedAttribute($embedAttributes, $options, 'title', 'title'); |
| 253 | 253 | } |
| 254 | 254 | |
@@ -421,11 +421,11 @@ discard block |
||
| 421 | 421 | |
| 422 | 422 | try { |
| 423 | 423 | $response = $client->request('GET', $uri, $options); |
| 424 | - $body = (string)$response->getBody(); |
|
| 424 | + $body = (string) $response->getBody(); |
|
| 425 | 425 | $data = Json::decode($body); |
| 426 | 426 | } catch (BadResponseException $badResponseException) { |
| 427 | 427 | $response = $badResponseException->getResponse(); |
| 428 | - $body = (string)$response->getBody(); |
|
| 428 | + $body = (string) $response->getBody(); |
|
| 429 | 429 | |
| 430 | 430 | try { |
| 431 | 431 | $data = Json::decode($body); |
@@ -133,7 +133,7 @@ |
||
| 133 | 133 | ]; |
| 134 | 134 | |
| 135 | 135 | $key = 'plugins.videos.settings.oauthProviderOptions'; |
| 136 | - $configPath = $key . '.' . $gateway->getHandle(); |
|
| 136 | + $configPath = $key.'.'.$gateway->getHandle(); |
|
| 137 | 137 | |
| 138 | 138 | Craft::$app->getProjectConfig()->set($configPath, $configData, "Save the “{$gateway->getHandle()}” integration"); |
| 139 | 139 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | // Get OAuth provider options |
| 26 | 26 | $oauthProviderOptions = $projectConfig->get('plugins.videos.settings.oauthProviderOptions', true); |
| 27 | 27 | |
| 28 | - if(!is_array($oauthProviderOptions)) { |
|
| 28 | + if (!is_array($oauthProviderOptions)) { |
|
| 29 | 29 | return true; |
| 30 | 30 | } |
| 31 | 31 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | $projectConfig->set('plugins.videos.settings.oauthProviderOptions', [], "Reset the oauth provider options"); |
| 36 | 36 | |
| 37 | 37 | // Rebuild OAuth provider options |
| 38 | - foreach($oauthProviderOptions as $providerHandle => $provider) { |
|
| 38 | + foreach ($oauthProviderOptions as $providerHandle => $provider) { |
|
| 39 | 39 | $projectConfig->set('plugins.videos.settings.oauthProviderOptions.'.$providerHandle, $provider, "Save the “{$providerHandle}” provider"); |
| 40 | 40 | } |
| 41 | 41 | } |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | { |
| 101 | 101 | $options = parent::getOauthProviderOptions($parse); |
| 102 | 102 | |
| 103 | - if(!isset($options['useOidcMode'])) { |
|
| 103 | + if (!isset($options['useOidcMode'])) { |
|
| 104 | 104 | $options['useOidcMode'] = true; |
| 105 | 105 | } |
| 106 | 106 | |