Skip to content

Commit

Permalink
Rename new methods to clarify their intention
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Hoffmann committed Apr 27, 2017
1 parent 934c76c commit b1379f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/Error/Debugger.php
Expand Up @@ -655,7 +655,7 @@ protected static function _object($var, $depth, $indent)
*
* @return string Returns the current format when getting.
*/
public static function getOutputAs()
public static function getOutputFormat()
{
return Debugger::getInstance()->_outputFormat;
}
Expand All @@ -667,7 +667,7 @@ public static function getOutputAs()
* @return void
* @throws \InvalidArgumentException When choosing a format that doesn't exist.
*/
public static function setOutputAs($format)
public static function setOutputFormat($format)
{
$self = Debugger::getInstance();

Expand All @@ -680,7 +680,7 @@ public static function setOutputAs($format)
/**
* Get/Set the output format for Debugger error rendering.
*
* @deprecated 3.5.0 Use getOutputAs()/setOutputAs() instead.
* @deprecated 3.5.0 Use getOutputFormat()/setOutputFormat() instead.
* @param string|null $format The format you want errors to be output as.
* Leave null to get the current format.
* @return string|null Returns null when setting. Returns the current format when getting.
Expand Down
10 changes: 5 additions & 5 deletions tests/TestCase/Error/DebuggerTest.php
Expand Up @@ -154,14 +154,14 @@ public function testOutputAsException()
}

/**
* Test that getOutputAs/setOutputAs works.
* Test that getOutputFormat/setOutputFormat works.
*
* @return void
*/
public function testGetSetOutputAs()
public function testGetSetOutputFormat()
{
Debugger::setOutputAs('html');
$this->assertEquals('html', Debugger::getOutputAs());
Debugger::setOutputFormat('html');
$this->assertEquals('html', Debugger::getOutputFormat());
}

/**
Expand All @@ -172,7 +172,7 @@ public function testGetSetOutputAs()
*/
public function testSetOutputAsException()
{
Debugger::setOutputAs('Invalid junk');
Debugger::setOutputFormat('Invalid junk');
}

/**
Expand Down

0 comments on commit b1379f6

Please sign in to comment.