Skip to content

Commit

Permalink
Merge pull request #967 from nextcloud/enh/noid/php8-syntax
Browse files Browse the repository at this point in the history
Use Php 8 syntax
  • Loading branch information
juliusknorr authored Nov 4, 2024
2 parents 315320b + e6c97c7 commit e57dce5
Show file tree
Hide file tree
Showing 28 changed files with 204 additions and 549 deletions.
98 changes: 49 additions & 49 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions lib/Command/DeleteProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,12 @@
use Symfony\Component\Console\Question\ConfirmationQuestion;

class DeleteProvider extends Base {
private $providerMapper;
/**
* @var ProviderService
*/
private $providerService;

public function __construct(ProviderMapper $providerMapper, ProviderService $providerService) {
public function __construct(
private ProviderMapper $providerMapper,
private ProviderService $providerService,
) {
parent::__construct();
$this->providerMapper = $providerMapper;
$this->providerService = $providerService;
}

protected function configure() {
Expand Down
16 changes: 3 additions & 13 deletions lib/Command/UpsertProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@

class UpsertProvider extends Base {

/** @var ProviderService */
private $providerService;
/** @var ProviderMapper */
private $providerMapper;
/** @var ICrypto */
private $crypto;

private const EXTRA_OPTIONS = [
'unique-uid' => [
'shortcut' => null, 'mode' => InputOption::VALUE_OPTIONAL, 'default' => null, 'setting_key' => ProviderService::SETTING_UNIQUE_UID,
Expand Down Expand Up @@ -152,14 +145,11 @@ class UpsertProvider extends Base {
];

public function __construct(
ProviderService $providerService,
ProviderMapper $providerMapper,
ICrypto $crypto,
private ProviderService $providerService,
private ProviderMapper $providerMapper,
private ICrypto $crypto,
) {
parent::__construct();
$this->providerService = $providerService;
$this->providerMapper = $providerMapper;
$this->crypto = $crypto;
}

protected function configure() {
Expand Down
12 changes: 4 additions & 8 deletions lib/Controller/BaseOidcController.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,11 @@

class BaseOidcController extends Controller {

/**
* @var IConfig
*/
private $config;

public function __construct(IRequest $request,
IConfig $config) {
public function __construct(
IRequest $request,
private IConfig $config,
) {
parent::__construct(Application::APP_ID, $request);
$this->config = $config;
}

/**
Expand Down
Loading

0 comments on commit e57dce5

Please sign in to comment.