mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-01 14:38:47 +02:00
N°8796 - Add PHP code style validation in iTop and extensions - format whole code base
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* @copyright Copyright (C) 2010-2024 Combodo SAS
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
@@ -26,7 +27,7 @@ class AjaxPage extends WebPage implements iTabbedPage
|
||||
protected $m_oTabs;
|
||||
private $m_sMenu; // If set, then the menu will be updated
|
||||
|
||||
const DEFAULT_PAGE_TEMPLATE_REL_PATH = 'pages/backoffice/ajaxpage/layout';
|
||||
public const DEFAULT_PAGE_TEMPLATE_REL_PATH = 'pages/backoffice/ajaxpage/layout';
|
||||
/** @var string */
|
||||
private $sPromiseId;
|
||||
|
||||
@@ -42,7 +43,7 @@ class AjaxPage extends WebPage implements iTabbedPage
|
||||
* @param string $s_title Not used
|
||||
* @param bool $bOutputExtraResources if true will output also JS & CSS resources
|
||||
*/
|
||||
function __construct($s_title)
|
||||
public function __construct($s_title)
|
||||
{
|
||||
$oKpi = new ExecutionKPI();
|
||||
$sPrintable = utils::ReadParam('printable', '0');
|
||||
@@ -303,7 +304,7 @@ class AjaxPage extends WebPage implements iTabbedPage
|
||||
|
||||
if (!empty($sCurrentTabContainer) && !empty($sCurrentTab)) {
|
||||
$iOffset = $this->m_oTabs->GetCurrentTabLength();
|
||||
return array('tc' => $sCurrentTabContainer, 'tab' => $sCurrentTab, 'offset' => $iOffset);
|
||||
return ['tc' => $sCurrentTabContainer, 'tab' => $sCurrentTab, 'offset' => $iOffset];
|
||||
} else {
|
||||
return parent::start_capture();
|
||||
}
|
||||
@@ -344,12 +345,12 @@ class AjaxPage extends WebPage implements iTabbedPage
|
||||
{
|
||||
assert(false);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public static function FilterXSS($sHTML)
|
||||
{
|
||||
return str_ireplace(array('<script', '</script>'), array('<!-- <removed-script', '</removed-script> -->'), $sHTML);
|
||||
return str_ireplace(['<script', '</script>'], ['<!-- <removed-script', '</removed-script> -->'], $sHTML);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user