Skip to content

Commit

Permalink
PHP 7.4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek committed Oct 28, 2020
1 parent 665f603 commit d81cb0c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 20 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
],
"require": {
"php": ">=7.1.0",
"php": ">=7.4.0",
"nette/utils": "^3.0",
"nette/security": "^3.0",
"nette/di": "^3.0",
Expand Down
16 changes: 7 additions & 9 deletions src/AdminBar.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,23 @@ final class AdminBar
public const MODE_AUTODETECT = null;

/** @var int size of reserved memory */
public static $reservedMemorySize = 500000;
public static int $reservedMemorySize = 500000;

/** @var bool */
private static $enabled = false;
private static bool $enabled = false;

/** @var string|null reserved memory; also prevents double rendering */
private static $reserved;
private static ?string $reserved;

/** @var User|null */
private static $user;
private static ?User $user;

/** @var Panel[] */
private static $panels = [];
private static array $panels = [];

/** @var true[] (type => true) */
private static $panelTypes = [];
private static array $panelTypes = [];

/** @var MenuLink[]|null[] */
private static $menuLinks = [];
private static array $menuLinks = [];


/**
Expand Down
7 changes: 2 additions & 5 deletions src/BasicPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@

final class BasicPanel implements Panel
{
private Localization $localization;

/** @var Localization */
private $localization;

/** @var User */
private $user;
private User $user;


public function __construct(Localization $localization, User $user)
Expand Down
7 changes: 2 additions & 5 deletions src/MenuLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,9 @@

final class MenuLink
{
private string $label;

/** @var string */
private $label;

/** @var string */
private $url;
private string $url;


public function __construct(string $label, string $url)
Expand Down

0 comments on commit d81cb0c

Please sign in to comment.