Skip to content

Commit 5e4ad92

Browse files
committed
cleanup based on feedback
1 parent dca282f commit 5e4ad92

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/Flex.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060
*/
6161
class Flex implements PluginInterface, EventSubscriberInterface
6262
{
63-
public static $storedOperations = null;
63+
public static $storedOperations = [];
64+
6465
/**
6566
* @var Composer
6667
*/
@@ -129,11 +130,9 @@ class_exists(__NAMESPACE__.str_replace('/', '\\', substr($file, \strlen(__DIR__)
129130

130131
// if Flex is being upgraded, the original operations from the original Flex
131132
// instance are stored in the static property, so we can reuse them now.
132-
if (property_exists(self::class, 'storedOperations')) {
133-
if (null !== self::$storedOperations) {
134-
$this->operations = self::$storedOperations;
135-
self::$storedOperations = null;
136-
}
133+
if (property_exists(self::class, 'storedOperations') && self::$storedOperations) {
134+
$this->operations = self::$storedOperations;
135+
self::$storedOperations = [];
137136
}
138137

139138
$symfonyRequire = preg_replace('/\.x$/', '.x-dev', getenv('SYMFONY_REQUIRE') ?: ($composer->getPackage()->getExtra()['symfony']['require'] ?? ''));

0 commit comments

Comments
 (0)