Skip to content

Commit

Permalink
cleanup based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed May 30, 2023
1 parent dca282f commit 5e4ad92
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/Flex.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
*/
class Flex implements PluginInterface, EventSubscriberInterface
{
public static $storedOperations = null;
public static $storedOperations = [];

/**
* @var Composer
*/
Expand Down Expand Up @@ -129,11 +130,9 @@ class_exists(__NAMESPACE__.str_replace('/', '\\', substr($file, \strlen(__DIR__)

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

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

0 comments on commit 5e4ad92

Please sign in to comment.