Skip to content

Commit

Permalink
Update for PHP 8.3 and Phalcon 5.8
Browse files Browse the repository at this point in the history
  • Loading branch information
jorikfon committed Oct 7, 2024
1 parent fc6efa1 commit ae831f6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
37 changes: 18 additions & 19 deletions src/Modules/Config/ConfigClass.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/*
* MikoPBX - free phone system for small business
* Copyright © 2017-2023 Alexey Portnov and Nikolay Beketov
Expand Down Expand Up @@ -41,10 +42,10 @@
* @package MikoPBX\Modules\Config
*/
abstract class ConfigClass extends AsteriskConfigClass implements
SystemConfigInterface,
RestAPIConfigInterface,
WebUIConfigInterface,
AsteriskConfigInterface
SystemConfigInterface,
RestAPIConfigInterface,
WebUIConfigInterface,
AsteriskConfigInterface
{
// The module hook applying priority
protected int $priority = 10000;
Expand Down Expand Up @@ -98,7 +99,7 @@ abstract class ConfigClass extends AsteriskConfigClass implements
public function __construct()
{

parent::__construct();
parent::__construct();

// Get child class parameters and define module Dir and UniqueID
$reflector = new ReflectionClassAlias(static::class);
Expand Down Expand Up @@ -126,7 +127,7 @@ public function __construct()
* @param string $methodName
* @return int
*/
public function getMethodPriority(string $methodName=''):int
public function getMethodPriority(string $methodName = ''): int
{
return $this->priority;
}
Expand Down Expand Up @@ -196,7 +197,7 @@ public function moduleRestAPICallback(array $request): PBXApiResult
*
* @return void
*/
public function modelsEventChangeData(mixed $data): void
public function modelsEventChangeData($data): void
{
}

Expand Down Expand Up @@ -354,7 +355,7 @@ public function onAfterACLPrepared(AclList $aclList): void
*
* @return void
*/
public function onBeforeHeaderMenuShow(array &$menuItems):void
public function onBeforeHeaderMenuShow(array &$menuItems): void
{
}

Expand All @@ -366,7 +367,7 @@ public function onBeforeHeaderMenuShow(array &$menuItems):void
*
* @return void
*/
public function onAfterRoutesPrepared(Router $router):void
public function onAfterRoutesPrepared(Router $router): void
{
}

Expand All @@ -379,7 +380,7 @@ public function onAfterRoutesPrepared(Router $router):void
*
* @return void
*/
public function onAfterAssetsPrepared(Manager $assets, Dispatcher $dispatcher):void
public function onAfterAssetsPrepared(Manager $assets, Dispatcher $dispatcher): void
{
}

Expand All @@ -393,7 +394,7 @@ public function onAfterAssetsPrepared(Manager $assets, Dispatcher $dispatcher):v
*
* @return string the volt partial file path without extension.
*/
public function onVoltBlockCompile(string $controller, string $blockName, View $view):string
public function onVoltBlockCompile(string $controller, string $blockName, View $view): string
{
return '';
}
Expand All @@ -408,7 +409,7 @@ public function onVoltBlockCompile(string $controller, string $blockName, View $
*
* @return void
*/
public function onBeforeFormInitialize(Form $form, mixed $entity, mixed $options):void
public function onBeforeFormInitialize(Form $form, $entity, $options): void
{
}

Expand All @@ -420,7 +421,7 @@ public function onBeforeFormInitialize(Form $form, mixed $entity, mixed $options
*
* @return void
*/
public function onBeforeExecuteRoute(Dispatcher $dispatcher):void
public function onBeforeExecuteRoute(Dispatcher $dispatcher): void
{
}

Expand All @@ -432,7 +433,7 @@ public function onBeforeExecuteRoute(Dispatcher $dispatcher):void
*
* @return void
*/
public function onAfterExecuteRoute(Dispatcher $dispatcher):void
public function onAfterExecuteRoute(Dispatcher $dispatcher): void
{
}

Expand All @@ -458,9 +459,8 @@ public function applyACLFiltersToCDRQuery(/** @scrutinizer ignore-unused */ arra
*
* @return void
*/
public function onBeforeExecuteRestAPIRoute(Micro $app):void
public function onBeforeExecuteRestAPIRoute(Micro $app): void
{

}

/**
Expand All @@ -471,8 +471,7 @@ public function onBeforeExecuteRestAPIRoute(Micro $app):void
*
* @return void
*/
public function onAfterExecuteRestAPIRoute(Micro $app):void
public function onAfterExecuteRestAPIRoute(Micro $app): void
{

}
}
}
2 changes: 1 addition & 1 deletion src/Modules/Config/SystemConfigInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public function createNginxLocations(): string;
*
* @return void
*/
public function modelsEventChangeData(mixed $data): void;
public function modelsEventChangeData($data): void;

/**
* This method is called in the WorkerModelsEvents after the models changing process is finished.
Expand Down
2 changes: 1 addition & 1 deletion src/Modules/Config/WebUIConfigInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function onVoltBlockCompile(string $controller, string $blockName, View $
*
* @return void
*/
public function onBeforeFormInitialize(Form $form, mixed $entity, mixed $options): void;
public function onBeforeFormInitialize(Form $form, $entity, $options): void;

/**
* Called from BaseController before executing a route.
Expand Down

0 comments on commit ae831f6

Please sign in to comment.