Skip to content

Commit 745dd36

Browse files
committed
ContainerRepresentation: Always show contents size in label
1 parent f25d306 commit 745dd36

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

build/kint.phar

-93 Bytes
Binary file not shown.

src/Value/Representation/ContainerRepresentation.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ public function getContents(): array
5858

5959
public function getLabel(): string
6060
{
61-
if (\count($this->contents) > 1) {
62-
return parent::getLabel().' ('.\count($this->contents).')';
63-
}
64-
65-
return parent::getLabel();
61+
return parent::getLabel().' ('.\count($this->contents).')';
6662
}
6763
}

tests/Value/Representation/ContainerRepresentationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function testGetLabel()
7070
{
7171
$v = new FixedWidthValue(new BaseContext('$v'), 1);
7272
$r = new ContainerRepresentation('My Label', [$v]);
73-
$this->assertSame('My Label', $r->getLabel());
73+
$this->assertSame('My Label (1)', $r->getLabel());
7474

7575
$v = new FixedWidthValue(new BaseContext('$v'), 1);
7676
$r = new ContainerRepresentation('My Label', [$v, $v]);

0 commit comments

Comments
 (0)