fix formatting

This commit is contained in:
Dennis Eichhorn 2021-07-04 18:25:57 +02:00
parent 580460dc11
commit f44d1c7983
9 changed files with 18 additions and 9 deletions

View File

@ -406,7 +406,8 @@ class PermissionAbstract implements \JsonSerializable
int $type = null,
int $element = null,
int $component = null
) : bool {
) : bool
{
return $permission === PermissionType::NONE ||
(($unit === null || $this->unit === null || $this->unit === $unit)
&& ($app === null || $this->app === null || $this->app === $app)

View File

@ -153,7 +153,8 @@ trait PermissionHandlingTrait
int $type = null,
int $element = null,
int $component = null
) : bool {
) : bool
{
$app = $app !== null ? \strtolower($app) : $app;
foreach ($this->permissions as $p) {

View File

@ -39,7 +39,8 @@ final class AStar implements PathFinderInterface
int $endX, int $endY,
Grid $grid,
int $heuristic, int $movement
) : Path {
) : Path
{
/** @var null|AStarNode $startNode */
$startNode = $grid->getNode($startX, $startY);
/** @var null|AStarNode $endNode */

View File

@ -39,7 +39,8 @@ final class JumpPointSearch implements PathFinderInterface
int $endX, int $endY,
Grid $grid,
int $heuristic, int $movement
) : Path {
) : Path
{
/** @var null|JumpPointNode $startNode */
$startNode = $grid->getNode($startX, $startY);
/** @var null|JumpPointNode $endNode */

View File

@ -143,7 +143,8 @@ final class Metrics
float $marketingCosts,
float $discountRate,
float $retentionRate
) : float {
) : float
{
return $customers * ($revenue - $cogs) * ((1 + $discountRate) / (1 + $discountRate - $retentionRate))
- $customers * $marketingCosts * ((1 + $discountRate) / (1 + $discountRate - $retentionRate))
- $customers * $acquistionCost;

View File

@ -236,7 +236,8 @@ class Smtp
string $password,
string $authtype = '',
mixed $oauth = null
) : bool {
) : bool
{
if (empty($this->serverCaps)) {
return false;
}

View File

@ -84,7 +84,8 @@ final class SocketRouter implements RouterInterface
mixed $destination,
array $validation = [],
string $dataPattern = ''
) : void {
) : void
{
if (!isset($this->routes[$route])) {
$this->routes[$route] = [];
}

View File

@ -91,7 +91,8 @@ final class WebRouter implements RouterInterface
int $verb = RouteVerb::GET,
bool $csrf = false, array $validation = [],
string $dataPattern = ''
) : void {
) : void
{
if (!isset($this->routes[$route])) {
$this->routes[$route] = [];
}

View File

@ -284,7 +284,8 @@ class Graph
array &$parent,
int &$index,
array &$bridges
) : void {
) : void
{
$id = $node->getId();
$visited[$id] = true;