Merge remote branch 'lsmith77/getAllPrevious'
* lsmith77/getAllPrevious: renamed getPreviouses() to getAllPrevious
This commit is contained in:
commit
b906cb59b8
@ -19,11 +19,11 @@
|
||||
<strong>{{ status_code }}</strong> {{ status_text }} - {{ exception.class|abbr_class }}
|
||||
</div>
|
||||
|
||||
{% set previous_count = exception.previouses|length %}
|
||||
{% if previous_count %}
|
||||
{% set previous_count = exception.allPrevious|length %}
|
||||
{% if previous_count|length %}
|
||||
<div class="linked"><span><strong>{{ previous_count }}</strong> linked Exception{{ previous_count > 1 ? 's' : '' }}:</span>
|
||||
<ul>
|
||||
{% for i, previous in exception.previouses %}
|
||||
{% for i, previous in exception.allPrevious %}
|
||||
<li>
|
||||
{{ previous.class|abbr_class }} <a href="#traces_link_{{ i + 1 }}" onclick="toggle('traces_{{ i + 1 }}', 'traces'); switchIcons('icon_traces_{{ i + 1 }}_open', 'icon_traces_{{ i + 1 }}_close');">»</a>
|
||||
</li>
|
||||
|
@ -47,7 +47,7 @@ class FlattenException
|
||||
public function toArray()
|
||||
{
|
||||
$exceptions = array();
|
||||
foreach (array_merge(array($this), $this->getPreviouses()) as $exception) {
|
||||
foreach (array_merge(array($this), $this->getAllPrevious()) as $exception) {
|
||||
$exceptions[] = array(
|
||||
'message' => $exception->getMessage(),
|
||||
'class' => $exception->getClass(),
|
||||
@ -118,7 +118,7 @@ class FlattenException
|
||||
$this->previous = $previous;
|
||||
}
|
||||
|
||||
public function getPreviouses()
|
||||
public function getAllPrevious()
|
||||
{
|
||||
$exceptions = array();
|
||||
$e = $this;
|
||||
|
@ -42,7 +42,7 @@ class FlattenExceptionTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertSame($flattened2,$flattened->getPrevious());
|
||||
|
||||
$this->assertSame(array($flattened2),$flattened->getPreviouses());
|
||||
$this->assertSame(array($flattened2),$flattened->getAllPrevious());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -71,4 +71,4 @@ class FlattenExceptionTest extends \PHPUnit_Framework_TestCase
|
||||
array(new \Exception('test', 123), 500),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user