Rename class props to match ctor param
This commit is contained in:
parent
202eae5136
commit
6dac44d67f
|
@ -14,8 +14,6 @@ class FaqController extends BaseController
|
|||
{
|
||||
use HasUserNotifications;
|
||||
|
||||
protected Redirector $redirect;
|
||||
|
||||
/** @var array<string> */
|
||||
protected array $permissions = [
|
||||
'faq.view',
|
||||
|
@ -25,10 +23,9 @@ class FaqController extends BaseController
|
|||
public function __construct(
|
||||
protected LoggerInterface $log,
|
||||
protected Faq $faq,
|
||||
Redirector $redirector,
|
||||
protected Redirector $redirect,
|
||||
protected Response $response
|
||||
) {
|
||||
$this->redirect = $redirector;
|
||||
}
|
||||
|
||||
public function edit(Request $request): Response
|
||||
|
|
|
@ -15,8 +15,6 @@ class NewsController extends BaseController
|
|||
{
|
||||
use HasUserNotifications;
|
||||
|
||||
protected Redirector $redirect;
|
||||
|
||||
/** @var array<string> */
|
||||
protected array $permissions = [
|
||||
'admin_news',
|
||||
|
@ -26,10 +24,9 @@ class NewsController extends BaseController
|
|||
protected Authenticator $auth,
|
||||
protected LoggerInterface $log,
|
||||
protected News $news,
|
||||
Redirector $redirector,
|
||||
protected Redirector $redirect,
|
||||
protected Response $response
|
||||
) {
|
||||
$this->redirect = $redirector;
|
||||
}
|
||||
|
||||
public function edit(Request $request): Response
|
||||
|
|
|
@ -16,8 +16,6 @@ class QuestionsController extends BaseController
|
|||
{
|
||||
use HasUserNotifications;
|
||||
|
||||
protected Redirector $redirect;
|
||||
|
||||
/** @var array<string> */
|
||||
protected array $permissions = [
|
||||
'question.add',
|
||||
|
@ -28,10 +26,9 @@ class QuestionsController extends BaseController
|
|||
protected Authenticator $auth,
|
||||
protected LoggerInterface $log,
|
||||
protected Question $question,
|
||||
Redirector $redirector,
|
||||
protected Redirector $redirect,
|
||||
protected Response $response
|
||||
) {
|
||||
$this->redirect = $redirector;
|
||||
}
|
||||
|
||||
public function index(): Response
|
||||
|
|
|
@ -16,8 +16,6 @@ class UserShirtController extends BaseController
|
|||
{
|
||||
use HasUserNotifications;
|
||||
|
||||
protected Redirector $redirect;
|
||||
|
||||
/** @var array<string, string> */
|
||||
protected array $permissions = [
|
||||
'editShirt' => 'user.edit.shirt',
|
||||
|
@ -28,11 +26,10 @@ class UserShirtController extends BaseController
|
|||
protected Authenticator $auth,
|
||||
protected Config $config,
|
||||
protected LoggerInterface $log,
|
||||
Redirector $redirector,
|
||||
protected Redirector $redirect,
|
||||
protected Response $response,
|
||||
protected User $user
|
||||
) {
|
||||
$this->redirect = $redirector;
|
||||
}
|
||||
|
||||
public function editShirt(Request $request): Response
|
||||
|
|
|
@ -19,8 +19,6 @@ class UserWorkLogController extends BaseController
|
|||
{
|
||||
use HasUserNotifications;
|
||||
|
||||
protected Redirector $redirect;
|
||||
|
||||
/** @var array<string> */
|
||||
protected array $permissions = [
|
||||
'admin_user_worklog',
|
||||
|
@ -31,11 +29,10 @@ class UserWorkLogController extends BaseController
|
|||
protected Config $config,
|
||||
protected LoggerInterface $log,
|
||||
protected Worklog $worklog,
|
||||
Redirector $redirector,
|
||||
protected Redirector $redirect,
|
||||
protected Response $response,
|
||||
protected User $user
|
||||
) {
|
||||
$this->redirect = $redirector;
|
||||
}
|
||||
|
||||
public function editWorklog(Request $request): Response
|
||||
|
|
|
@ -16,8 +16,6 @@ class NewsController extends BaseController
|
|||
{
|
||||
use HasUserNotifications;
|
||||
|
||||
protected Redirector $redirect;
|
||||
|
||||
/** @var array<string, string> */
|
||||
protected array $permissions = [
|
||||
'news',
|
||||
|
@ -32,11 +30,10 @@ class NewsController extends BaseController
|
|||
protected Config $config,
|
||||
protected LoggerInterface $log,
|
||||
protected News $news,
|
||||
Redirector $redirector,
|
||||
protected Redirector $redirect,
|
||||
protected Response $response,
|
||||
protected Request $request
|
||||
) {
|
||||
$this->redirect = $redirector;
|
||||
}
|
||||
|
||||
public function index(): Response
|
||||
|
@ -153,6 +150,9 @@ class NewsController extends BaseController
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $data
|
||||
*/
|
||||
protected function renderView(string $page, array $data): Response
|
||||
{
|
||||
$data += $this->getNotifications();
|
||||
|
|
|
@ -31,7 +31,7 @@ class OAuthController extends BaseController
|
|||
protected Config $config,
|
||||
protected LoggerInterface $log,
|
||||
protected OAuth $oauth,
|
||||
protected Redirector $redirector,
|
||||
protected Redirector $redirect,
|
||||
protected Session $session,
|
||||
protected UrlGenerator $url
|
||||
) {
|
||||
|
@ -59,7 +59,7 @@ class OAuthController extends BaseController
|
|||
);
|
||||
$this->session->set('oauth2_state', $provider->getState());
|
||||
|
||||
return $this->redirector->to($authorizationUrl);
|
||||
return $this->redirect->to($authorizationUrl);
|
||||
}
|
||||
|
||||
if (
|
||||
|
@ -188,7 +188,7 @@ class OAuthController extends BaseController
|
|||
$this->log->info('Disconnected OAuth from {provider}', ['provider' => $providerName]);
|
||||
$this->addNotification('oauth.disconnected');
|
||||
|
||||
return $this->redirector->back();
|
||||
return $this->redirect->back();
|
||||
}
|
||||
|
||||
protected function getProvider(string $name): AbstractProvider
|
||||
|
@ -326,6 +326,6 @@ class OAuthController extends BaseController
|
|||
$this->session->set('oauth2_enable_password', $config['enable_password']);
|
||||
$this->session->set('oauth2_allow_registration', $config['allow_registration']);
|
||||
|
||||
return $this->redirector->to('/register');
|
||||
return $this->redirect->to('/register');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,8 +15,6 @@ class SettingsController extends BaseController
|
|||
use HasUserNotifications;
|
||||
use ChecksArrivalsAndDepartures;
|
||||
|
||||
protected Redirector $redirect;
|
||||
|
||||
/** @var string[] */
|
||||
protected array $permissions = [
|
||||
'user_settings',
|
||||
|
@ -26,10 +24,9 @@ class SettingsController extends BaseController
|
|||
protected Authenticator $auth,
|
||||
protected Config $config,
|
||||
protected LoggerInterface $log,
|
||||
Redirector $redirector,
|
||||
protected Redirector $redirect,
|
||||
protected Response $response
|
||||
) {
|
||||
$this->redirect = $redirector;
|
||||
}
|
||||
|
||||
public function profile(): Response
|
||||
|
|
|
@ -6,13 +6,10 @@ use Illuminate\Database\Schema\Builder as SchemaBuilder;
|
|||
|
||||
abstract class Migration
|
||||
{
|
||||
protected SchemaBuilder $schema;
|
||||
|
||||
/**
|
||||
* Migration constructor.
|
||||
*/
|
||||
public function __construct(SchemaBuilder $schemaBuilder)
|
||||
public function __construct(protected SchemaBuilder $schema)
|
||||
{
|
||||
$this->schema = $schemaBuilder;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue