Skip to content

Commit d32296c

Browse files
committed
php-cs-fixer
1 parent 9963fb4 commit d32296c

File tree

3 files changed

+68
-68
lines changed

3 files changed

+68
-68
lines changed

src/Providers/OEmbed/Infogram.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Infogram extends EndPoint implements EndPointInterface
1212
];
1313
protected static $endPoint = 'https://infogr.am/oembed';
1414

15-
/**
15+
/**
1616
* {@inheritdoc}
1717
*/
1818
public function getEndPoint()

src/Providers/OEmbed/Tumblr.php

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
1-
<?php
2-
3-
namespace Embed\Providers\OEmbed;
4-
5-
use Embed\Adapters\Adapter;
6-
use Embed\Http\Response;
7-
use Embed\Http\Url;
8-
9-
class Tumblr extends EndPoint implements EndPointInterface
10-
{
11-
protected static $pattern = [
12-
'*.tumblr.com/post/*'
13-
];
14-
15-
protected static $endPoint = 'https://www.tumblr.com/oembed/1.0';
16-
17-
/**
18-
* {@inheritdoc}
19-
*/
20-
public static function create(Adapter $adapter)
21-
{
22-
$response = $adapter->getResponse();
23-
if ($response->getStartingUrl()->match(static::$pattern)) {
24-
return new static($response);
25-
}
26-
}
27-
28-
/**
29-
* Constructor.
30-
*
31-
* @param Response $response
32-
*/
33-
private function __construct(Response $response)
34-
{
35-
$this->response = $response;
36-
}
37-
38-
/**
39-
* {@inheritdoc}
40-
*/
41-
public function getEndPoint()
42-
{
43-
return Url::create(static::$endPoint)
44-
->withQueryParameters([
45-
'url' => (string) $this->response->getStartingUrl()
46-
]);
47-
}
48-
}
1+
<?php
2+
3+
namespace Embed\Providers\OEmbed;
4+
5+
use Embed\Adapters\Adapter;
6+
use Embed\Http\Response;
7+
use Embed\Http\Url;
8+
9+
class Tumblr extends EndPoint implements EndPointInterface
10+
{
11+
protected static $pattern = [
12+
'*.tumblr.com/post/*'
13+
];
14+
15+
protected static $endPoint = 'https://www.tumblr.com/oembed/1.0';
16+
17+
/**
18+
* {@inheritdoc}
19+
*/
20+
public static function create(Adapter $adapter)
21+
{
22+
$response = $adapter->getResponse();
23+
if ($response->getStartingUrl()->match(static::$pattern)) {
24+
return new static($response);
25+
}
26+
}
27+
28+
/**
29+
* Constructor.
30+
*
31+
* @param Response $response
32+
*/
33+
private function __construct(Response $response)
34+
{
35+
$this->response = $response;
36+
}
37+
38+
/**
39+
* {@inheritdoc}
40+
*/
41+
public function getEndPoint()
42+
{
43+
return Url::create(static::$endPoint)
44+
->withQueryParameters([
45+
'url' => (string) $this->response->getStartingUrl()
46+
]);
47+
}
48+
}

tests/TumblrTest.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
<?php
2-
3-
namespace Embed\Tests;
4-
5-
class TumblrTest extends AbstractTestCase
6-
{
7-
public function testOne()
8-
{
9-
$this->assertEmbed(
10-
'http://he-who-photographs-rather-ok.tumblr.com/post/165326273724',
11-
[
12-
'url' => 'http://he-who-photographs-rather-ok.tumblr.com/post/165326273724',
13-
'authorName' => 'He-who-photographs-rather-OK',
14-
'authorUrl' => 'http://he-who-photographs-rather-ok.tumblr.com/',
15-
'type' => 'rich',
16-
]
17-
);
18-
}
19-
}
1+
<?php
2+
3+
namespace Embed\Tests;
4+
5+
class TumblrTest extends AbstractTestCase
6+
{
7+
public function testOne()
8+
{
9+
$this->assertEmbed(
10+
'http://he-who-photographs-rather-ok.tumblr.com/post/165326273724',
11+
[
12+
'url' => 'http://he-who-photographs-rather-ok.tumblr.com/post/165326273724',
13+
'authorName' => 'He-who-photographs-rather-OK',
14+
'authorUrl' => 'http://he-who-photographs-rather-ok.tumblr.com/',
15+
'type' => 'rich',
16+
]
17+
);
18+
}
19+
}

0 commit comments

Comments
 (0)