Skip to content

Commit

Permalink
Fix CS.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Aug 5, 2022
1 parent ea3a273 commit 0cce4b1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,10 @@
"lowest-setup": "composer update --prefer-lowest --prefer-stable --prefer-dist --no-interaction && cp composer.json composer.backup && composer require --dev dereuromark/composer-prefer-lowest && mv composer.backup composer.json",
"cs-check": "phpcs -s -p --standard=vendor/fig-r/psr2r-sniffer/PSR2R/ruleset.xml --extensions=php src/ tests/",
"cs-fix": "phpcbf -p --standard=vendor/fig-r/psr2r-sniffer/PSR2R/ruleset.xml --extensions=php src/ tests/"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
4 changes: 2 additions & 2 deletions src/MediaEmbed.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ protected function _matchUrl($url, array $regexRules) {
*/
protected function _parseLink($url, $regex) {
$context = stream_context_create(
['http' => ['header' => 'Connection: close']],
);
['http' => ['header' => 'Connection: close']],
);
$content = file_get_contents($url, false, $context);
if (!$content) {
return false;
Expand Down
4 changes: 2 additions & 2 deletions src/Object/MediaObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ public function icon() {
$icon .= $url;

$context = stream_context_create(
['http' => ['header' => 'Connection: close']],
);
['http' => ['header' => 'Connection: close']],
);
// E.g. http://www.google.com/s2/favicons?domain=xyz.com
$file = file_get_contents($icon, false, $context);
if ($file === false) {
Expand Down

0 comments on commit 0cce4b1

Please sign in to comment.