Skip to content

Commit

Permalink
Declare constant types
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Dec 7, 2024
1 parent 105fae8 commit 9f4fda1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/CodeCoverage.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
*/
final class CodeCoverage
{
private const UNCOVERED_FILES = 'UNCOVERED_FILES';
private const string UNCOVERED_FILES = 'UNCOVERED_FILES';
private readonly Driver $driver;
private readonly Filter $filter;
private readonly Wizard $wizard;
Expand Down
10 changes: 5 additions & 5 deletions src/Driver/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,35 @@ abstract class Driver
*
* @see http://xdebug.org/docs/code_coverage
*/
public const LINE_NOT_EXECUTABLE = -2;
public const int LINE_NOT_EXECUTABLE = -2;

/**
* @var int
*
* @see http://xdebug.org/docs/code_coverage
*/
public const LINE_NOT_EXECUTED = -1;
public const int LINE_NOT_EXECUTED = -1;

/**
* @var int
*
* @see http://xdebug.org/docs/code_coverage
*/
public const LINE_EXECUTED = 1;
public const int LINE_EXECUTED = 1;

/**
* @var int
*
* @see http://xdebug.org/docs/code_coverage
*/
public const BRANCH_NOT_HIT = 0;
public const int BRANCH_NOT_HIT = 0;

/**
* @var int
*
* @see http://xdebug.org/docs/code_coverage
*/
public const BRANCH_HIT = 1;
public const int BRANCH_HIT = 1;
private bool $collectBranchAndPathCoverage = false;
private bool $detectDeadCode = false;

Expand Down
2 changes: 1 addition & 1 deletion src/Report/Html/Renderer/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ final class File extends Renderer
/**
* @var array<int,true>
*/
private const KEYWORD_TOKENS = [
private const array KEYWORD_TOKENS = [
T_ABSTRACT => true,
T_ARRAY => true,
T_AS => true,
Expand Down
10 changes: 5 additions & 5 deletions src/Report/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,27 @@ final class Text
/**
* @var string
*/
private const COLOR_GREEN = "\x1b[30;42m";
private const string COLOR_GREEN = "\x1b[30;42m";

/**
* @var string
*/
private const COLOR_YELLOW = "\x1b[30;43m";
private const string COLOR_YELLOW = "\x1b[30;43m";

/**
* @var string
*/
private const COLOR_RED = "\x1b[37;41m";
private const string COLOR_RED = "\x1b[37;41m";

/**
* @var string
*/
private const COLOR_HEADER = "\x1b[1;37;40m";
private const string COLOR_HEADER = "\x1b[1;37;40m";

/**
* @var string
*/
private const COLOR_RESET = "\x1b[0m";
private const string COLOR_RESET = "\x1b[0m";
private readonly Thresholds $thresholds;
private readonly bool $showUncoveredFiles;
private readonly bool $showOnlySummary;
Expand Down

0 comments on commit 9f4fda1

Please sign in to comment.