summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-14 09:56:27 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-14 09:56:27 +0100
commitf8a1163dd190ecd2db88513a2dbb6138d67573f9 (patch)
treeb10049a919bd69f82244dc82b2ca38b507e2c191 /includes
parentff94347235de0c063f19521bbb35a6725a687a8e (diff)
downloadprotector-f8a1163dd190ecd2db88513a2dbb6138d67573f9.tar.gz
protector-f8a1163dd190ecd2db88513a2dbb6138d67573f9.tar.bz2
protector-f8a1163dd190ecd2db88513a2dbb6138d67573f9.zip
php-cs-fixer tidies to php8.5 standards
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'includes')
-rwxr-xr-xincludes/bit_setup_inc.php4
-rwxr-xr-xincludes/classes/LibertyProtector.php30
2 files changed, 17 insertions, 17 deletions
diff --git a/includes/bit_setup_inc.php b/includes/bit_setup_inc.php
index f7c7051..bc69316 100755
--- a/includes/bit_setup_inc.php
+++ b/includes/bit_setup_inc.php
@@ -12,9 +12,9 @@ $pRegisterHash = [
define( 'PROTECTOR_PKG_NAME', $pRegisterHash['package_name'] );
define( 'PROTECTOR_PKG_URL', BIT_ROOT_URL . basename( $pRegisterHash['package_path'] ) . '/' );
define( 'PROTECTOR_PKG_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/' );
-define( 'PROTECTOR_PKG_INCLUDE_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/includes/');
+define( 'PROTECTOR_PKG_INCLUDE_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/includes/');
define( 'PROTECTOR_PKG_CLASS_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/includes/classes/');
-define( 'PROTECTOR_PKG_ADMIN_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/admin/');
+define( 'PROTECTOR_PKG_ADMIN_PATH', BIT_ROOT_PATH . basename( $pRegisterHash['package_path'] ) . '/admin/');
$gBitSystem->registerPackage( $pRegisterHash );
diff --git a/includes/classes/LibertyProtector.php b/includes/classes/LibertyProtector.php
index de19e00..823f375 100755
--- a/includes/classes/LibertyProtector.php
+++ b/includes/classes/LibertyProtector.php
@@ -20,19 +20,19 @@ namespace Bitweaver\Liberty;
class LibertyProtector extends LibertyBase {
/**
- * During initialisation, be sure to call our base constructors
+ * During initialisation, be sure to call our base constructors
**/
public function __construct( $pContentId=0 ) {
$this->mContentId = $pContentId ;
parent::__construct();
}
- /**
- * Update the liberty_content_role_map table with corrected role_id(s).
- *
- * In -1 for anonymouse is not stored, switching content to anonymouse will clear array
- *
- * @param object $pParamHash
+ /**
+ * Update the liberty_content_role_map table with corrected role_id(s).
+ *
+ * In -1 for anonymouse is not stored, switching content to anonymouse will clear array
+ *
+ * @param object $pParamHash
*/
public function storeProtection( &$pParamHash ) {
global $gBitSystem;
@@ -51,10 +51,10 @@ class LibertyProtector extends LibertyBase {
return \count( $this->mErrors ) == 0;
}
- /**
- * Delete entry(ies) from liberty_content_role_map table with content_id.
- *
- * @var object $pContent
+ /**
+ * Delete entry(ies) from liberty_content_role_map table with content_id.
+ *
+ * @var object $pContent
*/
public function expunge(): bool {
if( \Bitweaver\BitBase::verifyId( $this->mContentId ) ) {
@@ -63,10 +63,10 @@ class LibertyProtector extends LibertyBase {
return true;
}
- /**
- * @param integer $ContentId
+ /**
+ * @param integer $ContentId
* @return array liberty_content_role_map for selected content_id
- * Ret -1 for anonymouse if alternatives are not stored
+ * Ret -1 for anonymouse if alternatives are not stored
**/
public function getProtectionList( $ContentId = 0 ) {
global $gBitSystem;
@@ -222,7 +222,7 @@ function protector_content_edit( $pContent, $pFunctionParam ) {
if ( isset( $pContent->mInfo['parent_id'] ) ) {
$serviceHash['protector']['role'] = $gProtector->getProtectionList( $pContent->mInfo['parent_id'] );
}
- }
+ }
if ( isset( $serviceHash['protector']['role'] ) ) { $prot = array_keys( $serviceHash['protector']['role'] ); }
$serviceHash['protector']['role_id'] = empty( $prot[0] ) ? -1 : $prot[0];
$gBitSmarty->assign( 'serviceHash', $serviceHash );