Skip to content

Commit 570741c

Browse files
committed
Avoid PHP/8.2 warnings
1 parent 2a1980e commit 570741c

File tree

8 files changed

+24
-5
lines changed

8 files changed

+24
-5
lines changed

src/WebApp/Auth/UserDatabaseAuthenticator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
*/
1313
class UserDatabaseAuthenticator extends AbstractAuthenticator {
1414

15+
protected $dao;
16+
1517
public function __construct(Application $app, $config = NULL) {
1618
parent::__construct($app, $config);
1719
}

src/WebApp/Auth/UserRoleAuthorizator.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
*/
1111
class UserRoleAuthorizator extends AbstractAuthorizator {
1212

13+
protected $roles;
14+
protected $grantResults;
15+
protected $subroles;
16+
1317
public function __construct(Application $app, $config = NULL) {
1418
parent::__construct($app, $config);
1519
if (isset($this->config['roles'])) {
@@ -38,23 +42,23 @@ public function authorize($user, $required) {
3842

3943
// From here on we need a user object
4044
if ($user != NULL) {
41-
if (!isset($this->grantResult[$required.'-'.$user->uid])) {
45+
if (!isset($this->grantResults[$required.'-'.$user->uid])) {
4246
// Least privilege: any user
4347
if ($required == UserRole::ROLE_USER) {
44-
$this->grantResult[$required.'-'.$user->uid] = TRUE;
48+
$this->grantResults[$required.'-'.$user->uid] = TRUE;
4549
} else {
4650
$roles = $user->getRoles();
4751

4852
// Superadmins are always authorized
4953
if (in_array(UserRole::ROLE_SUPERADMIN, $roles)) {
50-
$this->grantResult[$required.'-'.$user->uid] = TRUE;
54+
$this->grantResults[$required.'-'.$user->uid] = TRUE;
5155
} else {
5256
// Search the specific role
53-
$this->grantResult[$required.'-'.$user->uid] = $this->isGranted($required, $roles);
57+
$this->grantResults[$required.'-'.$user->uid] = $this->isGranted($required, $roles);
5458
}
5559
}
5660
}
57-
return $this->grantResult[$required.'-'.$user->uid];
61+
return $this->grantResults[$required.'-'.$user->uid];
5862
}
5963
return FALSE;
6064
}

src/WebApp/BootstrapTheme/HorizontalForm/FormGroupRenderer.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
class FormGroupRenderer extends \WebApp\Renderer {
66

7+
protected $builder;
8+
protected $elementRenderer;
9+
710
public function __construct($theme, $component, $builder, $elementRenderer) {
811
parent::__construct($theme, $component);
912
$this->builder = $builder;

src/WebApp/BootstrapTheme/HorizontalForm/HorizontalFormRendererBuilder.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
class HorizontalFormRendererBuilder extends \WebApp\Builder\AbstractRendererBuilder {
66

77
protected $form;
8+
protected $labelSizes;
9+
protected $componentSizes;
810

911
public function __construct($theme, $form) {
1012
parent::__construct($theme);

src/WebApp/DataModel/User.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class User implements \WebApp\Auth\Principal {
1818
public $roles;
1919
public $status;
2020
public $data;
21+
public $_roles;
2122

2223
public function __construct() {
2324
if (is_string($this->created_on)) $this->created_on = new \TgUtils\Date($this->created_on, WFW_TIMEZONE);

src/WebApp/DefaultTheme/ContainerRenderer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
class ContainerRenderer extends \WebApp\Renderer {
66

7+
public $tagName;
8+
79
public function __construct($theme, $component, $tagName = NULL) {
810
parent::__construct($theme, $component);
911
$this->tagName = $tagName;

src/WebApp/Error/ErrorPage.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
class ErrorPage extends \WebApp\Page {
66

7+
public $errorCode;
8+
public $errorText;
9+
public $throwable;
10+
711
public function __construct($app, $errorCode, $errorText, $throwable = NULL) {
812
parent::__construct($app);
913
$this->errorCode = $errorCode;

src/WebApp/Router.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class Router {
1212
protected $request;
1313
protected $languages;
1414
protected $defaultLanguage;
15+
protected $app;
1516

1617
public function __construct($app, $config = NULL) {
1718
$this->app = $app;

0 commit comments

Comments
 (0)