Skip to content

Commit 6010269

Browse files
committed
#657 upgraded laminas/laminas-code and removed redundant conditional checks caused by upstream type refinement
1 parent 0f9509e commit 6010269

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
],
2121
"require": {
2222
"php": "~7.4.1 || ~8.0.0",
23-
"laminas/laminas-code": "4.0.x-dev#131153f1b93d3415462c74385e13d3d5588bd72e",
23+
"laminas/laminas-code": "4.0.x-dev#3ebacd7b63bf9c9a13cf2443aa8c46f0221ff3c0",
2424
"composer-runtime-api": "^2.0.0",
2525
"webimpress/safe-writer": "^2.0.1"
2626
},

composer.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ProxyManager/GeneratorStrategy/EvaluatingGeneratorStrategy.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
use Laminas\Code\Generator\ClassGenerator;
88
use Webimpress\SafeWriter\FileWriter;
99

10-
use function assert;
1110
use function ini_get;
12-
use function is_string;
1311
use function unlink;
1412

1513
/**
@@ -38,7 +36,6 @@ public function __construct()
3836
public function generate(ClassGenerator $classGenerator): string
3937
{
4038
$code = $classGenerator->generate();
41-
assert(is_string($code));
4239

4340
// @codeCoverageIgnoreStart
4441
if (! $this->canEval) {

src/ProxyManager/GeneratorStrategy/FileWriterGeneratorStrategy.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
use Webimpress\SafeWriter\Exception\ExceptionInterface as FileWriterException;
1212
use Webimpress\SafeWriter\FileWriter;
1313

14-
use function assert;
15-
use function is_string;
1614
use function restore_error_handler;
1715
use function set_error_handler;
1816

@@ -43,9 +41,8 @@ public function __construct(FileLocatorInterface $fileLocator)
4341
public function generate(ClassGenerator $classGenerator): string
4442
{
4543
$generatedCode = $classGenerator->generate();
46-
assert(is_string($generatedCode));
47-
$className = $classGenerator->getNamespaceName() . '\\' . $classGenerator->getName();
48-
$fileName = $this->fileLocator->getProxyFileName($className);
44+
$className = $classGenerator->getNamespaceName() . '\\' . $classGenerator->getName();
45+
$fileName = $this->fileLocator->getProxyFileName($className);
4946

5047
set_error_handler($this->emptyErrorHandler);
5148

0 commit comments

Comments
 (0)