Unverified Commit c72f4be6 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

refactor: add strict types declaration before each file and fix activitypub issues

fix some style issues
parent 76afc0cf
......@@ -7,10 +7,10 @@ or shared hosting, you can install it on most PHP-MySQL compatible web servers.
- [Install instructions](#install-instructions)
- [0. Pre-requisites](#0-pre-requisites)
- [1. Install Wizard](#1-install-wizard)
- [1-alt Manual configuration](#1-alt-manual-configuration)
- [(recommended) Install Wizard](#recommended-install-wizard)
- [(alternative) Manual configuration](#alternative-manual-configuration)
- [Web Server Requirements](#web-server-requirements)
- [PHP v8.0 or higher](#php-v73-or-higher)
- [PHP v8.0 or higher](#php-v80-or-higher)
- [MySQL compatible database](#mysql-compatible-database)
- [Privileges](#privileges)
- [(Optional) Other recommendations](#optional-other-recommendations)
......@@ -39,17 +39,20 @@ or shared hosting, you can install it on most PHP-MySQL compatible web servers.
> ⚠️ Social features will not work properly if you do not set the task. It is
> used to broadcast social activities to the fediverse.
### 1. Install Wizard
### (recommended) Install Wizard
1. Run the Castopod Host install script by going to the install wizard page
(`https://your_domain_name.com/cp-install`) in your favorite web browser.
2. Follow the instructions on your screen.
3. Start podcasting!
### 1-alt Manual configuration
> **Note:**
>
> The install script writes a `.env` file in the package root. If you cannot go
> through the install wizard, you can
> [create and update the `.env` file manually](#alternative-manual-configuration).
The install script writes a `.env` file in the package root. If you cannot go
through the install wizard, you can create and update the `.env` file yourself:
### (alternative) Manual configuration
1. Rename the `.env.example` file to `.env` and update the default values with
your own.
......
<?php
declare(strict_types=1);
namespace App\Authorization;
use Myth\Auth\Authorization\FlatAuthorization as MythAuthFlatAuthorization;
......@@ -26,7 +28,7 @@ class FlatAuthorization extends MythAuthFlatAuthorization
return false;
}
return $this->permissionModel->doesGroupHavePermission($groupId, $permissionId,);
return $this->permissionModel->doesGroupHavePermission($groupId, $permissionId);
}
/**
......
<?php
declare(strict_types=1);
namespace App\Authorization;
use Myth\Auth\Authorization\GroupModel as MythAuthGroupModel;
......
<?php
declare(strict_types=1);
namespace App\Authorization;
use Myth\Auth\Authorization\PermissionModel as MythAuthPermissionModel;
......
<?php
declare(strict_types=1);
/**
* The goal of this file is to allow developers a location where they can overwrite core procedural functions and
* replace them with their own. This file is loaded during the bootstrap process and is called during the frameworks
......
<?php
declare(strict_types=1);
namespace Config;
use ActivityPub\Config\ActivityPub as ActivityPubBase;
......
<?php
declare(strict_types=1);
namespace Config;
use Analytics\Config\Analytics as AnalyticsBase;
......
<?php
declare(strict_types=1);
namespace Config;
use CodeIgniter\Config\BaseConfig;
......
<?php
declare(strict_types=1);
namespace Config;
use Myth\Auth\Config\Auth as MythAuthConfig;
......
<?php
declare(strict_types=1);
namespace Config;
use CodeIgniter\Config\AutoloadConfig;
......
<?php
declare(strict_types=1);
/**
* --------------------------------------------------------------------------
* ERROR DISPLAY
......
<?php
declare(strict_types=1);
/**
* --------------------------------------------------------------------------
* ERROR DISPLAY
......@@ -8,7 +10,7 @@
* it and display a generic error message.
*/
ini_set('display_errors', '0');
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED,);
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
/**
* --------------------------------------------------------------------------
......
<?php
declare(strict_types=1);
/**
* --------------------------------------------------------------------------
* ERROR DISPLAY
......
<?php
declare(strict_types=1);
namespace Config;
use CodeIgniter\Cache\Handlers\DummyHandler;
......@@ -74,6 +76,19 @@ class Cache extends BaseConfig
*/
public string $prefix = '';
/**
* --------------------------------------------------------------------------
* Default TTL
* --------------------------------------------------------------------------
*
* The default number of seconds to save items when none is specified.
*
* WARNING: This is not used by framework handlers where 60 seconds is
* hard-coded, but may be useful to projects and modules. This will replace
* the hard-coded value in a future release.
*/
public int $ttl = 60;
/**
* --------------------------------------------------------------------------
* File settings
......
<?php
declare(strict_types=1);
/*
| --------------------------------------------------------------------
| Castopod Version
......
<?php
declare(strict_types=1);
namespace Config;
use CodeIgniter\Config\BaseConfig;
......
<?php
declare(strict_types=1);
namespace Config;
use CodeIgniter\Config\BaseConfig;
......
<?php
declare(strict_types=1);
namespace Config;
use CodeIgniter\Database\Config;
......
<?php
declare(strict_types=1);
namespace Config;
class DocTypes
......
<?php
declare(strict_types=1);
namespace Config;
use CodeIgniter\Config\BaseConfig;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment