Skip to content

Commit

Permalink
Nearing 1.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
bkdotcom committed Nov 25, 2014
1 parent 17ec293 commit f524082
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Debug.php
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ protected function translateCfgKeys($mixed)
break;
}
}
if (count($path==1)) {
if (count($path)==1) {
array_unshift($path, 'debug');
}
$mixed = implode('/', $path);
Expand Down
13 changes: 12 additions & 1 deletion ErrorHandler.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php
/**
* Stand-alone, general-purpose error handler
*
* @package PHPDebugConsole
* @author Brad Kent <[email protected]>
* @license http://opensource.org/licenses/MIT MIT
* @version v1.2
*/

namespace bdk\Debug;

Expand All @@ -16,7 +24,10 @@
}

/**
* Error handling methods
* Stand-Alone general-purpose error handler class that supports fatal errors
*
* Able to register multiple onError "callback" functions
* Can email an error report on error and throttles said email so does not excessively send email
*/
class ErrorHandler
{
Expand Down
16 changes: 13 additions & 3 deletions Output.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php
/**
* Output log as html or to FirePHP
*
* @package PHPDebugConsole
* @author Brad Kent <[email protected]>
* @license http://opensource.org/licenses/MIT MIT
* @version v1.2
*/

namespace bdk\Debug;

Expand All @@ -23,8 +31,8 @@ public function __construct($cfg = array(), &$data = array())
$this->debug = Debug::getInstance();
$this->cfg = array(
'css' => '', // additional "override" css
'filepathCss' => dirname(__FILE__).'/Debug.css',
'filepathScript' => dirname(__FILE__).'/Debug.jquery.min.js',
'filepathCss' => dirname(__FILE__).'/css/Debug.css',
'filepathScript' => dirname(__FILE__).'/js/Debug.jquery.min.js',
'firephpInc' => dirname(__FILE__).'/FirePHP.class.php',
'firephpOptions' => array(
'useNativeJsonEncode' => true,
Expand Down Expand Up @@ -452,7 +460,9 @@ protected function outputHtml()
}
$lastError = $this->debug->errorHandler->get('lastError');
if ($lastError && $lastError['category'] === 'fatal') {
foreach (array('type','category','hash','firstOccur','suppressed','inConsole','stats','vars') as $k) {
$keysKeep = array('typeStr','message','file','line');
$keysRemove = array_diff(array_keys($lastError), $keysKeep);
foreach ($keysRemove as $k) {
unset($lastError[$k]);
}
array_unshift($this->data['log'], array('error error-fatal',$lastError));
Expand Down
10 changes: 9 additions & 1 deletion Utilities.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<?php
/**
* General-purpose utilities
*
* @package PHPDebugConsole
* @author Brad Kent <[email protected]>
* @license http://opensource.org/licenses/MIT MIT
* @version v1.2
*/

namespace bdk\Debug;

Expand Down Expand Up @@ -197,7 +205,7 @@ public function isRecursive($mixed, $key = null)
* @return mixed false, or path to reference
* @internal
*/
public function isRecursiveIteration(&$array, $unique = null, $path = array())
protected function isRecursiveIteration(&$array, $unique = null, $path = array())
{
if ($unique === null) {
$unique = new \stdclass();
Expand Down
10 changes: 9 additions & 1 deletion VarDump.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
<?php
/**
* Methods used to display and format values
*
* @package PHPDebugConsole
* @author Brad Kent <[email protected]>
* @license http://opensource.org/licenses/MIT MIT
* @version v1.2
*/

namespace bdk\Debug;

/**
* VarDump: Methods concerning the display and formatting of values
* VarDump: Methods used to display and format values
*/
class VarDump
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Debug_Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function setUp()
*/
public function tearDown()
{
unset($GLOBALS['debugClassData']);
unset($this->debug);
}

/**
Expand Down

0 comments on commit f524082

Please sign in to comment.