Skip to content

Commit e57f778

Browse files
committed
php-cs-fixer executed
1 parent 7d4f6df commit e57f778

File tree

5 files changed

+16
-17
lines changed

5 files changed

+16
-17
lines changed

src/Adapters/N500px.php

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,35 @@
1111

1212
class N500px extends Adapter implements AdapterInterface
1313
{
14-
1514
/**
1615
* {@inheritdoc}
1716
*/
1817
public static function check(Request $request)
1918
{
2019
return $request->isValid() && $request->match([
2120
'https?://500px.com/photo/*',
22-
]);;
21+
]);
2322
}
24-
2523

2624
/**
2725
* {@inheritdoc}
2826
*/
2927
public function getCode()
3028
{
31-
if (is_numeric($this->request->getDirectoryPosition(1))) {
32-
return Utils::iframe($this->request->createUrl()->withDirectoryPosition(2,'embed.html'), $this->width, $this->height);
29+
if (is_numeric($this->request->getDirectoryPosition(1))) {
30+
return Utils::iframe($this->request->createUrl()->withDirectoryPosition(2, 'embed.html'), $this->width, $this->height);
3331
}
3432

35-
return '';
33+
return '';
3634
}
3735

38-
3936
/**
4037
* {@inheritdoc}
4138
*/
4239
public function run()
43-
{
40+
{
4441
//order is important
45-
$this->addProvider('oembed', new Providers\OEmbed());
42+
$this->addProvider('oembed', new Providers\OEmbed());
4643
$this->addProvider('opengraph', new Providers\OpenGraph());
4744
}
4845
}

src/Providers/OEmbed/N500px.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?php
22

33
namespace Embed\Providers\OEmbed;
4+
45
use Embed\Url;
56

67
/**
@@ -14,10 +15,10 @@ class N500px extends OEmbedImplementation
1415
*/
1516
public static function getEndPoint(Url $url)
1617
{
17-
18-
if (is_numeric($url->getDirectoryPosition(1))) {
19-
return $url->createUrl()->withDirectoryPosition(2,'oembed.json');
20-
}
18+
if (is_numeric($url->getDirectoryPosition(1))) {
19+
return $url->createUrl()->withDirectoryPosition(2, 'oembed.json');
20+
}
21+
2122
return '';
2223
}
2324

src/Request.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,11 @@ public function match($patterns)
128128
*/
129129
public function getClassNameForDomain()
130130
{
131-
$className = str_replace(array('-',' '),'', ucwords(strtolower($this->getDomain())));
131+
$className = str_replace(array('-', ' '), '', ucwords(strtolower($this->getDomain())));
132132
if (is_numeric(mb_substr($className, 0, 1))) {
133-
$className='N'.$className;
133+
$className = 'N'.$className;
134134
}
135+
135136
return $className;
136137
}
137138

src/RequestResolvers/Curl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Curl implements RequestResolverInterface
2727
public static $binaryContentTypes = [
2828
'#image/.*#',
2929
'#application/(pdf|x-download|zip|pdf|msword|vnd\\.ms|postscript|octet-stream|ogg|x-iso9660-image)#',
30-
'#application/x-zip.*#'
30+
'#application/x-zip.*#',
3131
];
3232

3333
/**

tests/N500Test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public function testPhoto()
88
'https://500px.com/photo/127505793/nude-girl-retro-by-david-dubnitskiy',
99
[
1010
'imageWidth' => 280,
11-
'image'=>'https://drscdn.500px.org/photo/127505793/w%3D280_h%3D280/c415195ae6156c9ba2a3db37130c22be?v=2',
11+
'image' => 'https://drscdn.500px.org/photo/127505793/w%3D280_h%3D280/c415195ae6156c9ba2a3db37130c22be?v=2',
1212
'imageHeight' => 280,
1313
'authorName' => 'David Dubnitskiy',
1414
'type' => 'photo',

0 commit comments

Comments
 (0)