Skip to content

Commit 8c13837

Browse files
committed
php-cs-fixer
1 parent 5fdc3d9 commit 8c13837

File tree

9 files changed

+21
-20
lines changed

9 files changed

+21
-20
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
},
2424
"require-dev": {
2525
"guzzlehttp/guzzle": "5.x",
26-
"phpunit/phpunit": "*"
26+
"phpunit/phpunit": "*",
27+
"friendsofphp/php-cs-fixer": "^1.12"
2728
},
2829
"suggest": {
2930
"guzzlehttp/[email protected]": "To use Guzzle5 request resolver"

src/Adapters/Adapter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,9 +486,9 @@ public function getLinkedData()
486486

487487
/**
488488
* Get images info.
489-
*
489+
*
490490
* @param array $urls
491-
*
491+
*
492492
* @return array
493493
*/
494494
protected function imagesInfo($urls)

src/Adapters/AdapterInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function getRequest();
3636

3737
/**
3838
* Returns all images Requests.
39-
*
39+
*
4040
* @return array
4141
*/
4242
public function getImagesRequests();

src/ImageInfo/ImageInfoInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ interface ImageInfoInterface
99
{
1010
/**
1111
* Returns the headers.
12-
*
12+
*
1313
* @return array
1414
*/
1515
public function getHeaders();
1616

1717
/**
1818
* Returns the url.
19-
*
19+
*
2020
* @return string
2121
*/
2222
public function getUrl();
2323

2424
/**
2525
* Returns the image info.
26-
*
26+
*
2727
* @return array|false
2828
*/
2929
public function getInfo();

src/Providers/Html.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,15 @@ public function getImagesUrls()
142142
*/
143143
public function getWidth()
144144
{
145-
return (integer) $this->bag->get('video_width') ?: null;
145+
return (int) $this->bag->get('video_width') ?: null;
146146
}
147147

148148
/**
149149
* {@inheritdoc}
150150
*/
151151
public function getHeight()
152152
{
153-
return (integer) $this->bag->get('video_height') ?: null;
153+
return (int) $this->bag->get('video_height') ?: null;
154154
}
155155

156156
/**
@@ -352,9 +352,9 @@ protected function extractImages(\DOMElement $html)
352352

353353
/**
354354
* Check whether a image url is valid or not.
355-
*
355+
*
356356
* @param Url $url
357-
*
357+
*
358358
* return bool
359359
*/
360360
protected function imageIsValid(Url $url)

src/Request.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function getUrl()
8383

8484
/**
8585
* Returns the starting url.
86-
*
86+
*
8787
* @return Url
8888
*/
8989
public function getStartingUrl()
@@ -93,7 +93,7 @@ public function getStartingUrl()
9393

9494
/**
9595
* Creates and returns an Url clone.
96-
*
96+
*
9797
* @param string|null $url
9898
*
9999
* @return Url
@@ -137,7 +137,7 @@ public function match($patterns)
137137

138138
/**
139139
* Return ClassName for domain.
140-
*
140+
*
141141
* Domains started with numbers will get N prepended to their class name.
142142
*
143143
* @return string
@@ -184,7 +184,7 @@ public function getHeaders()
184184

185185
/**
186186
* Get a header.
187-
*
187+
*
188188
* @param string $name
189189
*
190190
* @return string|null

src/Url.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public function getDirectoryPosition($position)
212212
/**
213213
* Returns a clone with other directory in a specific position.
214214
*
215-
* @param int|null $key The position of the subdirectory (0 based index).
215+
* @param int|null $key The position of the subdirectory (0 based index)
216216
* @param string $value The new value
217217
*
218218
* @return Url
@@ -427,7 +427,7 @@ protected function buildUrl()
427427
}
428428

429429
$user = isset($this->info['user']) ? $this->info['user'] : '';
430-
$pass = isset($this->info['pass']) ? ':'.$this->info['pass'] : '';
430+
$pass = isset($this->info['pass']) ? ':'.$this->info['pass'] : '';
431431
if ($user || $pass) {
432432
$url .= $user.$pass.'@';
433433
}

tests/MeetUpTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ public function testOne()
99
[
1010
'title' => 'Docker, from zero to hero with Carlos Sánchez',
1111
'description' => "Inauguramos las charlas de SetPay con uno de los temas más de moda en 2014, Docker.\n\n Docker es una herramienta para que desarrolladores y administradores de sistemas construyan, desplieguen y ejecute",
12-
'imageWidth' => 567,
13-
'imageHeight' => 392,
12+
'imageWidth' => 1260,
13+
'imageHeight' => 1260,
1414
'type' => 'rich',
1515
]
1616
);

tests/WikipediaTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class WikipediaTest extends TestCaseBase
44
{
55
public function testOne()
66
{
7-
$description = <<<EOT
7+
$description = <<<'EOT'
88
Albert Einstein (/ˈaɪnstaɪn/; German: [ˈalbɛɐ̯t ˈaɪnʃtaɪn]; 14 March 1879 – 18 April 1955) was a German-born theoretical physicist. He developed the general theory of relativity, one of the two pillars of modern physics (alongside quantum mechanics). Einstein's work is also known for its influence on the philosophy of science. Einstein is best known in popular culture for his mass–energy equivalence formula E = mc2 (which has been dubbed "the world's most famous equation"). He received the 1921 Nobel Prize in Physics for his "services to theoretical physics", in particular his discovery of the law of the photoelectric effect, a pivotal step in the evolution of quantum theory. Near the beginning of his career, Einstein thought that Newtonian mechanics was no longer enough to reconcile the laws of classical mechanics with the laws of the electromagnetic field. This led to the development of his special theory of relativity. He realized, however, that the principle of relativity could also be extended to gravitational fields...
99
EOT;
1010

0 commit comments

Comments
 (0)