Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/Type/Generic/TemplateBenevolentUnionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace PHPStan\Type\Generic;

use PHPStan\Type\BenevolentUnionType;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;

/** @api */
Expand Down Expand Up @@ -51,9 +50,6 @@ public function withTypes(array $types): self
public function filterTypes(callable $filterCb): Type
{
$result = parent::filterTypes($filterCb);
if ($result instanceof NeverType) {
return $result;
}
if (!$result instanceof TemplateType) {
return TemplateTypeFactory::create(
$this->getScope(),
Expand Down
4 changes: 0 additions & 4 deletions src/Type/Generic/TemplateUnionType.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace PHPStan\Type\Generic;

use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;

Expand Down Expand Up @@ -38,9 +37,6 @@ public function __construct(
public function filterTypes(callable $filterCb): Type
{
$result = parent::filterTypes($filterCb);
if ($result instanceof NeverType) {
return $result;
}
if (!$result instanceof TemplateType) {
return TemplateTypeFactory::create(
$this->getScope(),
Expand Down
Loading