Skip to content

Commit 3dc74b4

Browse files
committed
Make source files compatible with PHP 7.1+
1 parent e67f49a commit 3dc74b4

12 files changed

+73
-28
lines changed

src/AnalyserResult.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ class AnalyserResult
3131
{
3232

3333
/** @var \CodeLts\CliTools\Error[] */
34-
private array $unorderedErrors;
34+
private $unorderedErrors;
3535

3636
/** @var \CodeLts\CliTools\Error[] */
37-
private array $errors;
37+
private $errors;
3838

3939
/** @var string[] */
40-
private array $internalErrors;
40+
private $internalErrors;
4141

4242
/**
4343
* @param \CodeLts\CliTools\Error[] $errors

src/AnalysisResult.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,25 @@ class AnalysisResult
3333
{
3434

3535
/** @var \CodeLts\CliTools\Error[] sorted by their file name, line number and message */
36-
private array $fileSpecificErrors;
36+
private $fileSpecificErrors;
3737

3838
/** @var string[] */
39-
private array $notFileSpecificErrors;
39+
private $notFileSpecificErrors;
4040

4141
/** @var string[] */
42-
private array $internalErrors;
42+
private $internalErrors;
4343

4444
/** @var string[] */
45-
private array $warnings;
45+
private $warnings;
4646

47-
private bool $defaultLevelUsed;
47+
/** @var bool */
48+
private $defaultLevelUsed;
4849

49-
private ?string $projectConfigFile;
50+
/** @var string|null */
51+
private $projectConfigFile;
5052

51-
private bool $savedResultCache;
53+
/** @var bool */
54+
private $savedResultCache;
5255

5356
/**
5457
* @param \CodeLts\CliTools\Error[] $fileSpecificErrors

src/ErrorFormatter/GithubErrorFormatter.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ class GithubErrorFormatter implements ErrorFormatter
4343
*/
4444
private $relativePathHelper;
4545

46-
private TableErrorFormatter $tableErrorformatter;
46+
/**
47+
* @var TableErrorFormatter
48+
*/
49+
private $tableErrorformatter;
4750

4851
public function __construct(
4952
RelativePathHelper $relativePathHelper,

src/ErrorFormatter/TableErrorFormatter.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,15 @@
3535
class TableErrorFormatter implements ErrorFormatter
3636
{
3737

38-
private RelativePathHelper $relativePathHelper;
39-
40-
private bool $showTipsOfTheDay;
38+
/**
39+
* @var RelativePathHelper
40+
*/
41+
private $relativePathHelper;
42+
43+
/**
44+
* @var bool
45+
*/
46+
private $showTipsOfTheDay;
4147

4248
public function __construct(
4349
RelativePathHelper $relativePathHelper,

src/ErrorFormatter/TeamcityErrorFormatter.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@
3737
class TeamcityErrorFormatter implements ErrorFormatter
3838
{
3939

40-
private RelativePathHelper $relativePathHelper;
40+
/**
41+
* @var RelativePathHelper
42+
*/
43+
private $relativePathHelper;
4144

4245
public function __construct(RelativePathHelper $relativePathHelper)
4346
{

src/ErrorsConsoleStyle.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,14 @@ class ErrorsConsoleStyle extends \Symfony\Component\Console\Style\SymfonyStyle
3737

3838
public const OPTION_NO_PROGRESS = 'no-progress';
3939

40-
private bool $showProgress;
40+
/** @var bool */
41+
private $showProgress;
4142

42-
private \Symfony\Component\Console\Helper\ProgressBar $progressBar;
43+
/** @var ProgressBar */
44+
private $progressBar;
4345

44-
private ?bool $isCiDetected = null;
46+
/** @var bool|null */
47+
private $isCiDetected = null;
4548

4649
public function __construct(InputInterface $input, OutputInterface $output)
4750
{

src/File/FuzzyRelativePathHelper.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,20 @@
3030
class FuzzyRelativePathHelper implements RelativePathHelper
3131
{
3232

33-
private RelativePathHelper $fallbackRelativePathHelper;
33+
/**
34+
* @var RelativePathHelper
35+
*/
36+
private $fallbackRelativePathHelper;
3437

35-
private string $directorySeparator;
38+
/**
39+
* @var string
40+
*/
41+
private $directorySeparator;
3642

37-
private ?string $pathToTrim = null;
43+
/**
44+
* @var string|null
45+
*/
46+
private $pathToTrim = null;
3847

3948
/**
4049
* @param RelativePathHelper $fallbackRelativePathHelper

src/File/ParentDirectoryRelativePathHelper.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@
3333
class ParentDirectoryRelativePathHelper implements RelativePathHelper
3434
{
3535

36-
private string $parentDirectory;
36+
/**
37+
* @var string
38+
*/
39+
private $parentDirectory;
3740

3841
public function __construct(string $parentDirectory)
3942
{

src/File/PathNotFoundException.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030
class PathNotFoundException extends \Exception
3131
{
3232

33-
private string $path;
33+
/**
34+
* @var string
35+
*/
36+
private $path;
3437

3538
public function __construct(string $path)
3639
{

src/File/SimpleRelativePathHelper.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030
class SimpleRelativePathHelper implements RelativePathHelper
3131
{
3232

33-
private string $currentWorkingDirectory;
33+
/**
34+
* @var string
35+
*/
36+
private $currentWorkingDirectory;
3437

3538
public function __construct(string $currentWorkingDirectory)
3639
{

0 commit comments

Comments
 (0)