renamed getPreviouses() to getAllPrevious
This commit is contained in:
parent
5591f34c01
commit
fd97c0caca
@ -19,11 +19,11 @@
|
|||||||
<strong>{{ status_code }}</strong> {{ status_text }} - {{ exception.class|abbr_class }}
|
<strong>{{ status_code }}</strong> {{ status_text }} - {{ exception.class|abbr_class }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% set previous_count = exception.previouses|length %}
|
{% set previous_count = exception.allPrevious|length %}
|
||||||
{% if previous_count %}
|
{% if previous_count|length %}
|
||||||
<div class="linked"><span><strong>{{ previous_count }}</strong> linked Exception{{ previous_count > 1 ? 's' : '' }}:</span>
|
<div class="linked"><span><strong>{{ previous_count }}</strong> linked Exception{{ previous_count > 1 ? 's' : '' }}:</span>
|
||||||
<ul>
|
<ul>
|
||||||
{% for i, previous in exception.previouses %}
|
{% for i, previous in exception.allPrevious %}
|
||||||
<li>
|
<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>
|
{{ 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>
|
</li>
|
||||||
|
@ -47,7 +47,7 @@ class FlattenException
|
|||||||
public function toArray()
|
public function toArray()
|
||||||
{
|
{
|
||||||
$exceptions = array();
|
$exceptions = array();
|
||||||
foreach (array_merge(array($this), $this->getPreviouses()) as $exception) {
|
foreach (array_merge(array($this), $this->getAllPrevious()) as $exception) {
|
||||||
$exceptions[] = array(
|
$exceptions[] = array(
|
||||||
'message' => $exception->getMessage(),
|
'message' => $exception->getMessage(),
|
||||||
'class' => $exception->getClass(),
|
'class' => $exception->getClass(),
|
||||||
@ -118,7 +118,7 @@ class FlattenException
|
|||||||
$this->previous = $previous;
|
$this->previous = $previous;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPreviouses()
|
public function getAllPrevious()
|
||||||
{
|
{
|
||||||
$exceptions = array();
|
$exceptions = array();
|
||||||
$e = $this;
|
$e = $this;
|
||||||
|
@ -42,7 +42,7 @@ class FlattenExceptionTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
$this->assertSame($flattened2,$flattened->getPrevious());
|
$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),
|
array(new \Exception('test', 123), 500),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user