Skip to content

Commit

Permalink
Declare type for class constants
Browse files Browse the repository at this point in the history
  • Loading branch information
Chi-teck committed May 8, 2024
1 parent 0acf136 commit d53bb04
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/Application.php
Expand Up @@ -43,24 +43,24 @@ final class Application extends BaseApplication implements EventDispatcherInterf
/**
* Path to DCG root directory.
*/
public const ROOT = __DIR__ . '/..';
public const string ROOT = __DIR__ . '/..';

Check failure on line 46 in src/Application.php

View workflow job for this annotation

GitHub Actions / tests (8.3, 11.x, prefer-lowest)

ParseError

src/Application.php:46:23: ParseError: Syntax error, unexpected T_STRING, expecting '=' on line 46 (see https://psalm.dev/173)

/**
* DCG version.
*
* @deprecated Use \DrupalCodeGenerator\Application->getVersion() instead.
*/
public const VERSION = 'unknown';
public const string VERSION = 'unknown';

Check failure on line 53 in src/Application.php

View workflow job for this annotation

GitHub Actions / tests (8.3, 11.x, prefer-lowest)

ParseError

src/Application.php:53:23: ParseError: Syntax error, unexpected T_STRING, expecting '=' on line 53 (see https://psalm.dev/173)

/**
* DCG API version.
*/
public const API = 3;
public const int API = 3;

Check failure on line 58 in src/Application.php

View workflow job for this annotation

GitHub Actions / tests (8.3, 11.x, prefer-lowest)

ParseError

src/Application.php:58:20: ParseError: Syntax error, unexpected T_STRING, expecting '=' on line 58 (see https://psalm.dev/173)

/**
* Path to templates directory.
*/
public const TEMPLATE_PATH = self::ROOT . '/templates';
public const string TEMPLATE_PATH = self::ROOT . '/templates';

Check failure on line 63 in src/Application.php

View workflow job for this annotation

GitHub Actions / tests (8.3, 11.x, prefer-lowest)

ParseError

src/Application.php:63:23: ParseError: Syntax error, unexpected T_STRING, expecting '=' on line 63 (see https://psalm.dev/173)

/**
* {@selfdoc}
Expand Down
2 changes: 1 addition & 1 deletion src/Logger/ConsoleLogger.php
Expand Up @@ -18,7 +18,7 @@ final class ConsoleLogger extends AbstractLogger {
/**
* Verbosity level map.
*/
private const VERBOSITY_LEVEL_MAP = [
private const array VERBOSITY_LEVEL_MAP = [
LogLevel::EMERGENCY => OutputInterface::VERBOSITY_NORMAL,
LogLevel::ALERT => OutputInterface::VERBOSITY_NORMAL,
LogLevel::CRITICAL => OutputInterface::VERBOSITY_NORMAL,
Expand Down

0 comments on commit d53bb04

Please sign in to comment.