Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
sreichel committed Dec 12, 2024
1 parent 0d36c26 commit 5ab215e
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 21 deletions.
8 changes: 4 additions & 4 deletions src/N98/Magento/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ class Application extends BaseApplication
*/
protected $autoloader;

protected ?Config $config;
protected ?Config $config = null;

/**
* @see Application::setConfigurationLoader
*/
private ?ConfigurationLoader $configurationLoader;
private ?ConfigurationLoader $configurationLoader = null;

protected ?string $_magentoRootFolder;
protected ?string $_magentoRootFolder = null;

protected bool $_magentoEnterprise = false;

Expand All @@ -89,7 +89,7 @@ class Application extends BaseApplication

protected bool $_magerunStopFileFound = false;

protected string $_magerunStopFileFolder;
protected ?string $_magerunStopFileFolder = null;

protected bool $_magerunUseDeveloperMode;

Expand Down
2 changes: 1 addition & 1 deletion src/N98/Magento/Application/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Config

private array $partialConfig = [];

private ?ConfigurationLoader $configurationLoader;
private ?ConfigurationLoader $configurationLoader = null;

private array $initConfig;

Expand Down
2 changes: 1 addition & 1 deletion src/N98/Magento/Application/ConfigLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class ConfigLocator
{
private string $customConfigFilename;

private string $magentoRootFolder;
private ?string $magentoRootFolder;

public function __construct(string $configFilename, string $magentoRootFolder)
{
Expand Down
14 changes: 7 additions & 7 deletions src/N98/Magento/Application/ConfigurationLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,32 +32,32 @@ class ConfigurationLoader
*/
protected array $_initialConfig;

protected ?array $_configArray;
protected ?array $_configArray = null;

/**
* Cache
*/
protected ?array $_distConfig;
protected ?array $_distConfig = null;

/**
* Cache
*/
protected ?array $_pluginConfig;
protected ?array $_pluginConfig = null;

/**
* Cache
*/
protected ?array $_systemConfig;
protected ?array $_systemConfig = null;

/**
* Cache
*/
protected ?array $_userConfig;
protected ?array $_userConfig = null;

/**
* Cache
*/
protected ?array $_projectConfig;
protected ?array $_projectConfig = null;

protected string $_customConfigFilename = 'n98-magerun.yaml';

Expand Down Expand Up @@ -88,7 +88,7 @@ public function getPartialConfig(bool $loadExternalConfig = true): array
return $config;
}

public function loadStageTwo(string $magentoRootFolder, bool $loadExternalConfig = true, string $magerunStopFileFolder = ''): void
public function loadStageTwo(string $magentoRootFolder, bool $loadExternalConfig = true, ?string $magerunStopFileFolder = ''): void
{
$config = $this->_initialConfig;
$config = $this->loadDistConfig($config);
Expand Down
7 changes: 3 additions & 4 deletions src/N98/MagerunBootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
class MagerunBootstrap
{
/**
* @return Magento\Application
* @throws ErrorException
*/
public static function createApplication(?ClassLoader $classLoader = null)
public static function createApplication(?ClassLoader $classLoader = null): Application
{
if (!$classLoader instanceof ClassLoader) {
$classLoader = self::getLoader();
Expand All @@ -33,7 +32,7 @@ public static function createApplication(?ClassLoader $classLoader = null)
/**
* @throws ErrorException
*/
public static function getLoader(): string
public static function getLoader(): ClassLoader
{
$projectBasedir = __DIR__ . '/../..';
if (!($loader = self::includeIfExists($projectBasedir . '/vendor/autoload.php'))
Expand All @@ -49,7 +48,7 @@ public static function getLoader(): string
return $loader;
}

public static function includeIfExists(string $file): ?string
public static function includeIfExists(string $file): ?ClassLoader
{
if (file_exists($file)) {
return include $file;
Expand Down
8 changes: 4 additions & 4 deletions src/N98/Util/Console/Helper/MagentoHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
*/
class MagentoHelper extends AbstractHelper
{
protected string $_magentoRootFolder;
protected ?string $_magentoRootFolder = null;

protected int $_magentoMajorVersion = 1;

protected bool $_magentoEnterprise = false;

protected bool $_magerunStopFileFound = false;

protected string $_magerunStopFileFolder;
protected ?string $_magerunStopFileFolder = null;

/**
* @var InputInterface|ArgvInput
Expand Down Expand Up @@ -96,7 +96,7 @@ public function detect(string $folder, array $subFolders = []): bool
return false;
}

public function getRootFolder(): string
public function getRootFolder(): ?string
{
return $this->_magentoRootFolder;
}
Expand All @@ -121,7 +121,7 @@ public function isMagerunStopFileFound(): bool
return $this->_magerunStopFileFound;
}

public function getMagerunStopFileFolder(): string
public function getMagerunStopFileFolder(): ?string
{
return $this->_magerunStopFileFolder;
}
Expand Down

0 comments on commit 5ab215e

Please sign in to comment.