Skip to content

Commit

Permalink
remove HierarchicalPath::getDecoded
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Sep 19, 2016
1 parent 1f31733 commit 3bc19d2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 21 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

All Notable changes to `League\Uri` will be documented in this file

## Next - 2016-XX-XX
## Next - 2016-09-XX

### Added

- `Component::getContent` returns the raw encoded representation of a component
- `Component::withContent` to create a new instance from a given raw encoded content
- `getDecoded` method to access the decoded content for the following classes:
- `HierarchicalPath`
- `User`
- `Pass`
- `Fragment`
Expand Down
12 changes: 1 addition & 11 deletions src/Components/HierarchicalPath.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,23 +178,13 @@ public function getSegment($offset, $default = null)
* @inheritdoc
*/
public function getContent()
{
return $this->encodePath($this->getDecoded());
}

/**
* Return the decoded string representation of the component
*
* @return string
*/
public function getDecoded()
{
$front_delimiter = '';
if ($this->isAbsolute === self::IS_ABSOLUTE) {
$front_delimiter = static::$separator;
}

return $front_delimiter.implode(static::$separator, $this->data);
return $this->encodePath($front_delimiter.implode(static::$separator, $this->data));
}

/**
Expand Down
8 changes: 0 additions & 8 deletions test/Components/HierarchicalPathTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -501,14 +501,6 @@ public function getExtensionProvider()
];
}

/**
* @dataProvider geValueProvider
*/
public function testGetValue($str, $expected)
{
$this->assertSame($expected, (new Path($str))->getDecoded());
}

public function geValueProvider()
{
return [
Expand Down

0 comments on commit 3bc19d2

Please sign in to comment.