activate bleeding edge phpstan rules (#2898)

This commit is contained in:
Kevin Papst
2021-11-02 13:33:21 +01:00
committed by GitHub
parent 36c08b0dea
commit 1b35356f81
32 changed files with 73 additions and 142 deletions

View File

@@ -35,19 +35,14 @@ final class InstallCommand extends Command
public const ERROR_DATABASE = 8;
public const ERROR_MIGRATIONS = 32;
/**
* @var string
*/
private $rootDir;
/**
* @var Connection
*/
private $connection;
public function __construct(string $projectDirectory, Connection $connection)
public function __construct(Connection $connection)
{
parent::__construct();
$this->rootDir = $projectDirectory;
$this->connection = $connection;
}

View File

@@ -117,12 +117,6 @@ final class KimaiImporterCommand extends Command
* @var Customer[]
*/
private $customers = [];
/**
* Instance specific mappings of customer IDs to cache IDs
*
* @var string[]
*/
private $customerIds = [];
/**
* Old Project ID => new Project()
* Global across all instances.
@@ -130,12 +124,6 @@ final class KimaiImporterCommand extends Command
* @var Project[]
*/
private $projects = [];
/**
* Instance specific mappings of project IDs to cache IDs
*
* @var string[]
*/
private $projectIds = [];
/**
* id => [projectId => Activity]
* @var array<Activity[]>
@@ -151,13 +139,6 @@ final class KimaiImporterCommand extends Command
* @var array
*/
private $oldActivities = [];
/**
* If true, unknown Activities will be created globally.
* Default behavior: create project specific activities
*
* @var bool
*/
private $unknownAsGlobal = false;
private $options = [];
@@ -316,8 +297,6 @@ final class KimaiImporterCommand extends Command
$this->teamIds = [];
$this->userIds = [];
$this->customerIds = [];
$this->projectIds = [];
$this->oldActivities = [];
if (!$options['merge-customer']) {
@@ -986,7 +965,6 @@ final class KimaiImporterCommand extends Command
private function setCustomerCache(array $oldCustomer, Customer $customer): void
{
//$this->customerIds[$this->dbPrefix . $oldCustomer['customerID']] = $oldCustomer['customerID'];
$this->customers[$oldCustomer['customerID']] = $customer;
}

View File

@@ -29,19 +29,14 @@ final class UpdateCommand extends Command
public const ERROR_DATABASE = 8;
public const ERROR_MIGRATIONS = 32;
/**
* @var string
*/
private $rootDir;
/**
* @var Connection
*/
private $connection;
public function __construct(string $projectDirectory, Connection $connection)
public function __construct(Connection $connection)
{
parent::__construct();
$this->rootDir = $projectDirectory;
$this->connection = $connection;
}