Skip to content

Commit

Permalink
Code Sniffed!
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Lind committed Sep 7, 2015
1 parent f46535f commit 3afabb0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/JimLind/TiVo/Factory/ShowFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ public function createShowFromXml(SimpleXMLElement $xml)
*
* @return mixed[]
*/
protected function normalizeShowXml(SimpleXMLElement $xml) {
protected function normalizeShowXml(SimpleXMLElement $xml)
{
$urlList = $xml->xpath('tivo:Links/tivo:Content/tivo:Url');
$detailXml = $xml->xpath('tivo:Details');
$namespacedXml = $this->registerTiVoNamespace(reset($detailXml));
Expand Down
2 changes: 1 addition & 1 deletion src/JimLind/TiVo/XmlDownloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class XmlDownloader
*/
public function __construct($ip, $mak, ClientInterface $guzzle)
{
$this->uri = (new Uri)
$this->uri = (new Uri())
->withScheme('https')
->withHost($ip)
->withPath('TiVoConnect');
Expand Down
10 changes: 9 additions & 1 deletion tests/JimLind/TiVo/Characteristic/XmlTraitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ public function testEmptyXMLString()
/**
* Test XML output
*
* @param string $input Raw XML string
* @param string $expected Namespaced XML string
*
* @dataProvider testAfterRegisterProvider
*/
public function testAfterRegister($input, $expected)
Expand All @@ -81,6 +84,11 @@ public function testAfterRegister($input, $expected)
$this->assertEquals($expected, $actual);
}

/**
* Data provider for the after register test
*
* @return mixed[]
*/
public function testAfterRegisterProvider()
{
return [
Expand All @@ -91,7 +99,7 @@ public function testAfterRegisterProvider()
[
'<x><y /></x>',
"<?xml version=\"1.0\"?>\n<x xmlns=\"http://www.w3.org/2001/XMLSchema\"><y/></x>\n",
]
],
];
}
}
3 changes: 3 additions & 0 deletions tests/JimLind/TiVo/VideoDownloaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ public function testFilePathPassThroughOnDownload()
/**
* Test the timeout is passed through to Guzzle
*
* @param string $method Download method
* @param int $timeout Timeout value
*
* @dataProvider testGuzzleTimeoutProvider
*/
public function testGuzzleTimeout($method, $timeout)
Expand Down

0 comments on commit 3afabb0

Please sign in to comment.