Skip to content

Commit 4c12f0d

Browse files
Add return types - batch 2/n
1 parent 9b2bc43 commit 4c12f0d

File tree

8 files changed

+62
-126
lines changed

8 files changed

+62
-126
lines changed

AbstractUriElement.php

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,8 @@ public function __construct(\DOMElement $node, string $currentUri = null, ?strin
5555

5656
/**
5757
* Gets the node associated with this link.
58-
*
59-
* @return \DOMElement
6058
*/
61-
public function getNode()
59+
public function getNode(): \DOMElement
6260
{
6361
return $this->node;
6462
}
@@ -68,7 +66,7 @@ public function getNode()
6866
*
6967
* @return string The method
7068
*/
71-
public function getMethod()
69+
public function getMethod(): string
7270
{
7371
return $this->method ?? 'GET';
7472
}
@@ -78,26 +76,22 @@ public function getMethod()
7876
*
7977
* @return string The URI
8078
*/
81-
public function getUri()
79+
public function getUri(): string
8280
{
8381
return UriResolver::resolve($this->getRawUri(), $this->currentUri);
8482
}
8583

8684
/**
8785
* Returns raw URI data.
88-
*
89-
* @return string
9086
*/
91-
abstract protected function getRawUri();
87+
abstract protected function getRawUri(): string;
9288

9389
/**
9490
* Returns the canonicalized URI path (see RFC 3986, section 5.2.4).
9591
*
9692
* @param string $path URI path
97-
*
98-
* @return string
9993
*/
100-
protected function canonicalizePath(string $path)
94+
protected function canonicalizePath(string $path): string
10195
{
10296
if ('' === $path || '/' === $path) {
10397
return $path;

0 commit comments

Comments
 (0)