Skip to content
Snippets Groups Projects
Unverified Commit fb3593f8 authored by Yassine Doghri's avatar Yassine Doghri
Browse files

refactor: remove all empty declarations + add missing type declarations

update composer dependencies
parent 93e605b4
No related branches found
No related tags found
No related merge requests found
Showing
with 163 additions and 349 deletions
......@@ -10,32 +10,21 @@ class ActivityPub extends ActivityPubBase
* --------------------------------------------------------------------
* ActivityPub Objects
* --------------------------------------------------------------------
* @var string
*/
public $actorObject = PodcastActor::class;
/**
* @var string
*/
public $noteObject = NoteObject::class;
public string $actorObject = PodcastActor::class;
public string $noteObject = NoteObject::class;
/**
* --------------------------------------------------------------------
* Default avatar and cover images
* --------------------------------------------------------------------
* @var string
*/
public $defaultAvatarImagePath = 'assets/images/castopod-avatar-default.jpg';
/**
* @var string
*/
public $defaultAvatarImageMimetype = 'image/jpeg';
public string $defaultAvatarImagePath = 'assets/images/castopod-avatar-default.jpg';
/**
* @var string
*/
public $defaultCoverImagePath = 'assets/images/castopod-cover-default.jpg';
/**
* @var string
*/
public $defaultCoverImageMimetype = 'image/jpeg';
public string $defaultAvatarImageMimetype = 'image/jpeg';
public string $defaultCoverImagePath = 'assets/images/castopod-cover-default.jpg';
public string $defaultCoverImageMimetype = 'image/jpeg';
}
......@@ -10,9 +10,8 @@ class Analytics extends AnalyticsBase
* --------------------------------------------------------------------
* Route filters options
* --------------------------------------------------------------------
* @var array<string, string>
*/
public $routeFilters = [
public array $routeFilters = [
'analytics-full-data' => 'permission:podcasts-view,podcast-view',
'analytics-data' => 'permission:podcasts-view,podcast-view',
'analytics-filtered-data' => 'permission:podcasts-view,podcast-view',
......
......@@ -22,9 +22,8 @@ class App extends BaseConfig
* explicitly and never rely on auto-guessing, especially in production
* environments.
*
* @var string
*/
public $baseURL = 'http://localhost:8080/';
public string $baseURL = 'http://localhost:8080/';
/**
* --------------------------------------------------------------------------
......@@ -36,9 +35,8 @@ class App extends BaseConfig
*
* http://cdn.example.com/
*
* @var string
*/
public $mediaBaseURL = 'http://127.0.0.2:8080/';
public string $mediaBaseURL = 'http://127.0.0.2:8080/';
/**
* --------------------------------------------------------------------------
......@@ -49,9 +47,8 @@ class App extends BaseConfig
* something else. If you are using mod_rewrite to remove the page set this
* variable so that it is blank.
*
* @var string
*/
public $indexPage = '';
public string $indexPage = '';
/**
* --------------------------------------------------------------------------
......@@ -68,9 +65,8 @@ class App extends BaseConfig
*
* WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
*
* @var string
*/
public $uriProtocol = 'REQUEST_URI';
public string $uriProtocol = 'REQUEST_URI';
/**
* --------------------------------------------------------------------------
......@@ -82,9 +78,8 @@ class App extends BaseConfig
* strings (like currency markers, numbers, etc), that your program
* should run under for this request.
*
* @var string
*/
public $defaultLocale = 'en';
public string $defaultLocale = 'en';
/**
* --------------------------------------------------------------------------
......@@ -95,10 +90,8 @@ class App extends BaseConfig
* language to use based on the value of the Accept-Language header.
*
* If false, no automatic detection will be performed.
*
* @var boolean
*/
public $negotiateLocale = true;
public bool $negotiateLocale = true;
/**
* --------------------------------------------------------------------------
......@@ -111,7 +104,7 @@ class App extends BaseConfig
*
* @var string[]
*/
public $supportedLocales = ['en', 'fr'];
public array $supportedLocales = ['en', 'fr'];
/**
* --------------------------------------------------------------------------
......@@ -121,9 +114,8 @@ class App extends BaseConfig
* The default timezone that will be used in your application to display
* dates with the date helper, and can be retrieved through app_timezone()
*
* @var string
*/
public $appTimezone = 'UTC';
public string $appTimezone = 'UTC';
/**
* --------------------------------------------------------------------------
......@@ -135,9 +127,8 @@ class App extends BaseConfig
*
* @see http://php.net/htmlspecialchars for a list of supported charsets.
*
* @var string
*/
public $charset = 'UTF-8';
public string $charset = 'UTF-8';
/**
* --------------------------------------------------------------------------
......@@ -149,9 +140,8 @@ class App extends BaseConfig
* secure, the user will be redirected to a secure version of the page
* and the HTTP Strict Transport Security header will be set.
*
* @var boolean
*/
public $forceGlobalSecureRequests = true;
public bool $forceGlobalSecureRequests = true;
/**
* --------------------------------------------------------------------------
......@@ -164,9 +154,8 @@ class App extends BaseConfig
* - `CodeIgniter\Session\Handlers\MemcachedHandler`
* - `CodeIgniter\Session\Handlers\RedisHandler`
*
* @var string
*/
public $sessionDriver = FileHandler::class;
public string $sessionDriver = FileHandler::class;
/**
* --------------------------------------------------------------------------
......@@ -175,9 +164,8 @@ class App extends BaseConfig
*
* The session cookie name, must contain only [0-9a-z_-] characters
*
* @var string
*/
public $sessionCookieName = 'ci_session';
public string $sessionCookieName = 'ci_session';
/**
* --------------------------------------------------------------------------
......@@ -187,9 +175,8 @@ class App extends BaseConfig
* The number of SECONDS you want the session to last.
* Setting to 0 (zero) means expire when the browser is closed.
*
* @var integer
*/
public $sessionExpiration = 7200;
public int $sessionExpiration = 7200;
/**
* --------------------------------------------------------------------------
......@@ -206,9 +193,8 @@ class App extends BaseConfig
*
* IMPORTANT: You are REQUIRED to set a valid save path!
*
* @var string
*/
public $sessionSavePath = WRITEPATH . 'session';
public string $sessionSavePath = WRITEPATH . 'session';
/**
* --------------------------------------------------------------------------
......@@ -220,9 +206,8 @@ class App extends BaseConfig
* WARNING: If you're using the database driver, don't forget to update
* your session table's PRIMARY KEY when changing this setting.
*
* @var boolean
*/
public $sessionMatchIP = false;
public bool $sessionMatchIP = false;
/**
* --------------------------------------------------------------------------
......@@ -231,9 +216,8 @@ class App extends BaseConfig
*
* How many seconds between CI regenerating the session ID.
*
* @var integer
*/
public $sessionTimeToUpdate = 300;
public int $sessionTimeToUpdate = 300;
/**
* --------------------------------------------------------------------------
......@@ -244,9 +228,8 @@ class App extends BaseConfig
* when auto-regenerating the session ID. When set to FALSE, the data
* will be later deleted by the garbage collector.
*
* @var boolean
*/
public $sessionRegenerateDestroy = false;
public bool $sessionRegenerateDestroy = false;
/**
* --------------------------------------------------------------------------
......@@ -259,7 +242,7 @@ class App extends BaseConfig
*
* @deprecated use Config\Cookie::$prefix property instead.
*/
public $cookiePrefix = '';
public string $cookiePrefix = '';
/**
* --------------------------------------------------------------------------
......@@ -272,7 +255,7 @@ class App extends BaseConfig
*
* @deprecated use Config\Cookie::$domain property instead.
*/
public $cookieDomain = '';
public string $cookieDomain = '';
/**
* --------------------------------------------------------------------------
......@@ -285,7 +268,7 @@ class App extends BaseConfig
*
* @deprecated use Config\Cookie::$path property instead.
*/
public $cookiePath = '/';
public string $cookiePath = '/';
/**
* --------------------------------------------------------------------------
......@@ -294,11 +277,11 @@ class App extends BaseConfig
*
* Cookie will only be set if a secure HTTPS connection exists.
*
* @var boolean
* @var bool
*
* @deprecated use Config\Cookie::$secure property instead.
*/
public $cookieSecure = false;
public bool $cookieSecure = false;
/**
* --------------------------------------------------------------------------
......@@ -311,7 +294,7 @@ class App extends BaseConfig
*
* @deprecated use Config\Cookie::$httponly property instead.
*/
public $cookieHTTPOnly = true;
public bool $cookieHTTPOnly = true;
/**
* --------------------------------------------------------------------------
......@@ -337,7 +320,7 @@ class App extends BaseConfig
*
* @deprecated use Config\Cookie::$samesite property instead.
*/
public $cookieSameSite = 'Lax';
public string $cookieSameSite = 'Lax';
/**
* --------------------------------------------------------------------------
......@@ -357,7 +340,7 @@ class App extends BaseConfig
*
* @var string|string[]
*/
public $proxyIPs = '';
public string|array $proxyIPs = '';
/**
* --------------------------------------------------------------------------
......@@ -367,10 +350,8 @@ class App extends BaseConfig
* The token name.
*
* @deprecated Use `Config\Security` $tokenName property instead of using this property.
*
* @var string
*/
public $CSRFTokenName = 'csrf_test_name';
public string $CSRFTokenName = 'csrf_test_name';
/**
* --------------------------------------------------------------------------
......@@ -380,10 +361,8 @@ class App extends BaseConfig
* The header name.
*
* @deprecated Use `Config\Security` $headerName property instead of using this property.
*
* @var string
*/
public $CSRFHeaderName = 'X-CSRF-TOKEN';
public string $CSRFHeaderName = 'X-CSRF-TOKEN';
/**
* --------------------------------------------------------------------------
......@@ -393,10 +372,8 @@ class App extends BaseConfig
* The cookie name.
*
* @deprecated Use `Config\Security` $cookieName property instead of using this property.
*
* @var string
*/
public $CSRFCookieName = 'csrf_cookie_name';
public string $CSRFCookieName = 'csrf_cookie_name';
/**
* --------------------------------------------------------------------------
......@@ -406,10 +383,8 @@ class App extends BaseConfig
* The number in seconds the token should expire.
*
* @deprecated Use `Config\Security` $expire property instead of using this property.
*
* @var integer
*/
public $CSRFExpire = 7200;
public int $CSRFExpire = 7200;
/**
* --------------------------------------------------------------------------
......@@ -419,10 +394,8 @@ class App extends BaseConfig
* Regenerate token on every submission?
*
* @deprecated Use `Config\Security` $regenerate property instead of using this property.
*
* @var boolean
*/
public $CSRFRegenerate = true;
public bool $CSRFRegenerate = true;
/**
* --------------------------------------------------------------------------
......@@ -432,10 +405,8 @@ class App extends BaseConfig
* Redirect to previous page with error on failure?
*
* @deprecated Use `Config\Security` $redirect property instead of using this property.
*
* @var boolean
*/
public $CSRFRedirect = true;
public bool $CSRFRedirect = true;
/**
* --------------------------------------------------------------------------
......@@ -453,10 +424,8 @@ class App extends BaseConfig
* @see https://portswigger.net/web-security/csrf/samesite-cookies
*
* @deprecated Use `Config\Security` $samesite property instead of using this property.
*
* @var string
*/
public $CSRFSameSite = 'Lax';
public string $CSRFSameSite = 'Lax';
/**
* --------------------------------------------------------------------------
......@@ -473,48 +442,38 @@ class App extends BaseConfig
*
* @see http://www.html5rocks.com/en/tutorials/security/content-security-policy/
* @see http://www.w3.org/TR/CSP/
*
* @var boolean
*/
public $CSPEnabled = false;
public bool $CSPEnabled = false;
/**
* --------------------------------------------------------------------------
* Media root folder
* --------------------------------------------------------------------------
* Defines the root folder for media files storage
*
* @var string
*/
public $mediaRoot = 'media';
public string $mediaRoot = 'media';
/**
* --------------------------------------------------------------------------
* Admin gateway
* --------------------------------------------------------------------------
* Defines a base route for all admin pages
*
* @var string
*/
public $adminGateway = 'cp-admin';
public string $adminGateway = 'cp-admin';
/**
* --------------------------------------------------------------------------
* Auth gateway
* --------------------------------------------------------------------------
* Defines a base route for all authentication related pages
*
* @var string
*/
public $authGateway = 'cp-auth';
public string $authGateway = 'cp-auth';
/**
* --------------------------------------------------------------------------
* Install gateway
* --------------------------------------------------------------------------
* Defines a base route for instance installation
*
* @var string
*/
public $installGateway = 'cp-install';
public string $installGateway = 'cp-install';
}
......@@ -20,9 +20,8 @@ class Cache extends BaseConfig
* The name of the preferred handler that should be used. If for some reason
* it is not available, the $backupHandler will be used in its place.
*
* @var string
*/
public $handler = 'file';
public string $handler = 'file';
/**
* --------------------------------------------------------------------------
......@@ -33,9 +32,8 @@ class Cache extends BaseConfig
* unreachable. Often, 'file' is used here since the filesystem is
* always available, though that's not always practical for the app.
*
* @var string
*/
public $backupHandler = 'dummy';
public string $backupHandler = 'dummy';
/**
* --------------------------------------------------------------------------
......@@ -45,11 +43,9 @@ class Cache extends BaseConfig
* The path to where cache files should be stored, if using a file-based
* system.
*
* @var string
*
* @deprecated Use the driver-specific variant under $file
*/
public $storePath = WRITEPATH . 'cache/';
public string $storePath = WRITEPATH . 'cache/';
/**
* --------------------------------------------------------------------------
......@@ -68,7 +64,7 @@ class Cache extends BaseConfig
*
* @var boolean|string[]
*/
public $cacheQueryString = false;
public bool|array $cacheQueryString = false;
/**
* --------------------------------------------------------------------------
......@@ -78,9 +74,8 @@ class Cache extends BaseConfig
* This string is added to all cache item names to help avoid collisions
* if you run multiple applications with the same cache engine.
*
* @var string
*/
public $prefix = '';
public string $prefix = '';
/**
* --------------------------------------------------------------------------
......@@ -91,7 +86,7 @@ class Cache extends BaseConfig
*
* @var array<string, string|int|null>
*/
public $file = [
public array $file = [
'storePath' => WRITEPATH . 'cache/',
'mode' => 0640,
];
......@@ -107,7 +102,7 @@ class Cache extends BaseConfig
*
* @var array<string, string|int|boolean>
*/
public $memcached = [
public array $memcached = [
'host' => '127.0.0.1',
'port' => 11211,
'weight' => 1,
......@@ -123,7 +118,7 @@ class Cache extends BaseConfig
*
* @var array<string, string|int|null>
*/
public $redis = [
public array $redis = [
'host' => '127.0.0.1',
'password' => null,
'port' => 6379,
......@@ -141,7 +136,7 @@ class Cache extends BaseConfig
*
* @var array<string, string>
*/
public $validHandlers = [
public array $validHandlers = [
'dummy' => DummyHandler::class,
'file' => FileHandler::class,
'memcached' => MemcachedHandler::class,
......
......@@ -22,9 +22,8 @@ class ContentSecurityPolicy extends BaseConfig
/**
* Default CSP report context
*
* @var boolean
*/
public $reportOnly = false;
public bool $reportOnly = false;
/**
* Specifies a URL where a browser will send reports
......@@ -32,16 +31,15 @@ class ContentSecurityPolicy extends BaseConfig
*
* @var string|null
*/
public $reportURI;
public ?string $reportURI = null;
/**
* Instructs user agents to rewrite URL schemes, changing
* HTTP to HTTPS. This directive is for websites with
* large numbers of old URLs that need to be rewritten.
*
* @var boolean
*/
public $upgradeInsecureRequests = false;
public bool $upgradeInsecureRequests = false;
//-------------------------------------------------------------------------
// Sources allowed
......@@ -53,28 +51,28 @@ class ContentSecurityPolicy extends BaseConfig
*
* @var string|string[]|null
*/
public $defaultSrc;
public string|array|null $defaultSrc;
/**
* Lists allowed scripts' URLs.
*
* @var string|string[]
*/
public $scriptSrc = 'self';
public string|array $scriptSrc = 'self';
/**
* Lists allowed stylesheets' URLs.
*
* @var string|string[]
*/
public $styleSrc = 'self';
public string|array $styleSrc = 'self';
/**
* Defines the origins from which images can be loaded.
*
* @var string|string[]
*/
public $imageSrc = 'self';
public string|array $imageSrc = 'self';
/**
* Restricts the URLs that can appear in a page's `<base>` element.
......@@ -83,14 +81,14 @@ class ContentSecurityPolicy extends BaseConfig
*
* @var string|string[]|null
*/
public $baseURI;
public string|array|null $baseURI;
/**
* Lists the URLs for workers and embedded frame contents
*
* @var string|string[]
*/
public $childSrc = 'self';
public string|array $childSrc = 'self';
/**
* Limits the origins that you can connect to (via XHR,
......@@ -98,21 +96,21 @@ class ContentSecurityPolicy extends BaseConfig
*
* @var string|string[]
*/
public $connectSrc = 'self';
public string|array $connectSrc = 'self';
/**
* Specifies the origins that can serve web fonts.
*
* @var string|string[]
*/
public $fontSrc;
public string|array $fontSrc;
/**
* Lists valid endpoints for submission from `<form>` tags.
*
* @var string|string[]
*/
public $formAction = 'self';
public string|array $formAction = 'self';
/**
* Specifies the sources that can embed the current page.
......@@ -122,38 +120,38 @@ class ContentSecurityPolicy extends BaseConfig
*
* @var string|string[]|null
*/
public $frameAncestors;
public string|array|null $frameAncestors;
/**
* Restricts the origins allowed to deliver video and audio.
*
* @var string|string[]|null
*/
public $mediaSrc;
public string|array|null $mediaSrc;
/**
* Allows control over Flash and other plugins.
*
* @var string|string[]
*/
public $objectSrc = 'self';
public string|array $objectSrc = 'self';
/**
* @var string|string[]|null
*/
public $manifestSrc;
public string|array|null $manifestSrc;
/**
* Limits the kinds of plugins a page may invoke.
*
* @var string|string[]|null
*/
public $pluginTypes;
public string|array|null $pluginTypes;
/**
* List of actions allowed.
*
* @var string|string[]|null
*/
public $sandbox;
public string|array|null $sandbox;
}
......@@ -14,9 +14,8 @@ class Cookie extends BaseConfig
*
* Set a cookie name prefix if you need to avoid collisions.
*
* @var string
*/
public $prefix = '';
public string $prefix = '';
/**
* --------------------------------------------------------------------------
......@@ -27,9 +26,8 @@ class Cookie extends BaseConfig
* cookie will not have the `Expires` attribute and will behave as a session
* cookie.
*
* @var DateTimeInterface|integer|string
*/
public $expires = 0;
public DateTimeInterface|int|string $expires = 0;
/**
* --------------------------------------------------------------------------
......@@ -38,9 +36,8 @@ class Cookie extends BaseConfig
*
* Typically will be a forward slash.
*
* @var string
*/
public $path = '/';
public string $path = '/';
/**
* --------------------------------------------------------------------------
......@@ -49,9 +46,8 @@ class Cookie extends BaseConfig
*
* Set to `.your-domain.com` for site-wide cookies.
*
* @var string
*/
public $domain = '';
public string $domain = '';
/**
* --------------------------------------------------------------------------
......@@ -60,9 +56,8 @@ class Cookie extends BaseConfig
*
* Cookie will only be set if a secure HTTPS connection exists.
*
* @var boolean
*/
public $secure = false;
public bool $secure = false;
/**
* --------------------------------------------------------------------------
......@@ -71,9 +66,8 @@ class Cookie extends BaseConfig
*
* Cookie will only be accessible via HTTP(S) (no JavaScript).
*
* @var boolean
*/
public $httponly = true;
public bool $httponly = true;
/**
* --------------------------------------------------------------------------
......@@ -95,9 +89,8 @@ class Cookie extends BaseConfig
* (empty string) means default SameSite attribute set by browsers (`Lax`)
* will be set on cookies. If set to `None`, `$secure` must also be set.
*
* @var string
*/
public $samesite = 'Lax';
public string $samesite = 'Lax';
/**
* --------------------------------------------------------------------------
......@@ -110,10 +103,8 @@ class Cookie extends BaseConfig
* If this is set to `true`, cookie names should be compliant of RFC 2616's
* list of allowed characters.
*
* @var boolean
*
* @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#attributes
* @see https://tools.ietf.org/html/rfc2616#section-2.2
*/
public $raw = false;
public bool $raw = false;
}
......@@ -50,6 +50,8 @@ class Database extends Config
* This database connection is used when
* running PHPUnit database tests.
*
* @noRector StringClassNameToClassConstantRector
*
* @var array<string, string|bool|int|array>
*/
public array $tests = [
......@@ -58,7 +60,6 @@ class Database extends Config
'username' => '',
'password' => '',
'database' => ':memory:',
/** @noRector StringClassNameToClassConstantRector */
'DBDriver' => 'SQLite3',
'DBPrefix' => 'db_', // Needed to ensure we're working correctly with prefixes live. DO NOT REMOVE FOR CI DEVS
'pConnect' => false,
......
......@@ -9,7 +9,7 @@ class DocTypes
*
* @var array<string, string>
*/
public $list = [
public array $list = [
'xhtml11' =>
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
'xhtml1-strict' =>
......
......@@ -6,165 +6,135 @@ use CodeIgniter\Config\BaseConfig;
class Email extends BaseConfig
{
/**
* @var string
*/
public $fromEmail;
public string $fromEmail;
/**
* @var string
*/
public $fromName;
public string $fromName;
/**
* @var string
*/
public $recipients;
public string $recipients;
/**
* The "user agent"
*
* @var string
*/
public $userAgent = 'CodeIgniter';
public string $userAgent = 'CodeIgniter';
/**
* The mail sending protocol: mail, sendmail, smtp
*
* @var string
*/
public $protocol = 'mail';
public string $protocol = 'mail';
/**
* The server path to Sendmail.
*
* @var string
*/
public $mailPath = '/usr/sbin/sendmail';
public string $mailPath = '/usr/sbin/sendmail';
/**
* SMTP Server Address
*
* @var string
*/
public $SMTPHost;
public string $SMTPHost;
/**
* SMTP Username
*
* @var string
*/
public $SMTPUser;
public string $SMTPUser;
/**
* SMTP Password
*
* @var string
*/
public $SMTPPass;
public string $SMTPPass;
/**
* SMTP Port
*
* @var integer
*/
public $SMTPPort = 25;
public int $SMTPPort = 25;
/**
* SMTP Timeout (in seconds)
*
* @var integer
*/
public $SMTPTimeout = 5;
public int $SMTPTimeout = 5;
/**
* Enable persistent SMTP connections
*
* @var boolean
*/
public $SMTPKeepAlive = false;
public bool $SMTPKeepAlive = false;
/**
* SMTP Encryption. Either tls or ssl
*
* @var string
*/
public $SMTPCrypto = 'tls';
public string $SMTPCrypto = 'tls';
/**
* Enable word-wrap
*
* @var boolean
*/
public $wordWrap = true;
public bool $wordWrap = true;
/**
* Character count to wrap at
*
* @var integer
*/
public $wrapChars = 76;
public int $wrapChars = 76;
/**
* Type of mail, either 'text' or 'html'
*
* @var string
*/
public $mailType = 'text';
public string $mailType = 'text';
/**
* Character set (utf-8, iso-8859-1, etc.)
*
* @var string
*/
public $charset = 'UTF-8';
public string $charset = 'UTF-8';
/**
* Whether to validate the email address
*
* @var boolean
*/
public $validate = false;
public bool $validate = false;
/**
* Email Priority. 1 = highest. 5 = lowest. 3 = normal
*
* @var integer
*/
public $priority = 3;
public int $priority = 3;
/**
* Newline character. (Use “\r\n” to comply with RFC 822)
*
* @var string
*/
public $CRLF = "\r\n";
public string $CRLF = "\r\n";
/**
* Newline character. (Use “\r\n” to comply with RFC 822)
*
* @var string
*/
public $newline = "\r\n";
public string $newline = "\r\n";
/**
* Enable BCC Batch Mode.
*
* @var boolean
*/
public $BCCBatchMode = false;
public bool $BCCBatchMode = false;
/**
* Number of emails in each BCC batch
*
* @var integer
*/
public $BCCBatchSize = 200;
public int $BCCBatchSize = 200;
/**
* Enable notify message from server
*
* @var boolean
*/
public $DSN = false;
public bool $DSN = false;
}
......@@ -21,9 +21,8 @@ class Encryption extends BaseConfig
* You need to ensure it is long enough for the cipher and mode you plan to use.
* See the user guide for more info.
*
* @var string
*/
public $key = '';
public string $key = '';
/**
* --------------------------------------------------------------------------
......@@ -36,9 +35,8 @@ class Encryption extends BaseConfig
* - OpenSSL
* - Sodium
*
* @var string
*/
public $driver = 'OpenSSL';
public string $driver = 'OpenSSL';
/**
* --------------------------------------------------------------------------
......@@ -50,9 +48,8 @@ class Encryption extends BaseConfig
*
* See the user guide for more information on padding.
*
* @var integer
*/
public $blockSize = 16;
public int $blockSize = 16;
/**
* --------------------------------------------------------------------------
......@@ -61,7 +58,6 @@ class Encryption extends BaseConfig
*
* HMAC digest to use, e.g. 'SHA512' or 'SHA256'. Default value is 'SHA512'.
*
* @var string
*/
public $digest = 'SHA512';
public string $digest = 'SHA512';
}
......@@ -18,9 +18,8 @@ class Exceptions extends BaseConfig
*
* Default: true
*
* @var boolean
*/
public $log = true;
public bool $log = true;
/**
* --------------------------------------------------------------------------
......@@ -31,7 +30,7 @@ class Exceptions extends BaseConfig
*
* @var int[]
*/
public $ignoreCodes = [404];
public array $ignoreCodes = [404];
/**
* --------------------------------------------------------------------------
......@@ -42,7 +41,6 @@ class Exceptions extends BaseConfig
*
* Default: APPPATH.'Views/errors'
*
* @var string
*/
public $errorViewPath = APPPATH . 'Views/errors';
public string $errorViewPath = APPPATH . 'Views/errors';
}
......@@ -19,7 +19,7 @@ class Filters extends BaseConfig
*
* @var array<string, string>
*/
public $aliases = [
public array $aliases = [
'csrf' => CSRF::class,
'toolbar' => DebugToolbar::class,
'honeypot' => Honeypot::class,
......@@ -35,7 +35,7 @@ class Filters extends BaseConfig
*
* @var array<string, string[]>
*/
public $globals = [
public array $globals = [
'before' => [
// 'honeypot',
// 'csrf',
......@@ -55,7 +55,7 @@ class Filters extends BaseConfig
*
* @var array<string, string[]>
*/
public $methods = [];
public array $methods = [];
/**
* List of filter aliases that should run on any
......@@ -66,7 +66,7 @@ class Filters extends BaseConfig
*
* @var array<string, array<string, string[]>>
*/
public $filters = [];
public array $filters = [];
public function __construct()
{
......
......@@ -24,7 +24,7 @@ class Format extends BaseConfig
*
* @var string[]
*/
public $supportedResponseFormats = [
public array $supportedResponseFormats = [
'application/json',
'application/xml', // machine-readable XML
'text/xml', // human-readable XML
......@@ -41,7 +41,7 @@ class Format extends BaseConfig
*
* @var array<string, string>
*/
public $formatters = [
public array $formatters = [
'application/json' => JSONFormatter::class,
'application/xml' => XMLFormatter::class,
'text/xml' => XMLFormatter::class,
......@@ -57,7 +57,7 @@ class Format extends BaseConfig
*
* @var array<string, int>
*/
public $formatterOptions = [
public array $formatterOptions = [
'application/json' => JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES,
'application/xml' => 0,
'text/xml' => 0,
......
......@@ -25,7 +25,7 @@ class Generators extends BaseConfig
*
* @var array<string, string>
*/
public $views = [
public array $views = [
'make:command' =>
'CodeIgniter\Commands\Generators\Views\command.tpl.php',
'make:controller' =>
......
......@@ -9,35 +9,30 @@ class Honeypot extends BaseConfig
/**
* Makes Honeypot visible or not to human
*
* @var boolean
*/
public $hidden = true;
public bool $hidden = true;
/**
* Honeypot Label Content
*
* @var string
*/
public $label = 'Fill This Field';
public string $label = 'Fill This Field';
/**
* Honeypot Field Name
*
* @var string
*/
public $name = 'honeypot';
public string $name = 'honeypot';
/**
* Honeypot HTML Template
*
* @var string
*/
public $template = '<label>{label}</label><input type="text" name="{name}" value=""/>';
public string $template = '<label>{label}</label><input type="text" name="{name}" value=""/>';
/**
* Honeypot container
*
* @var string
*/
public $container = '<div style="display:none">{template}</div>';
public string $container = '<div style="display:none">{template}</div>';
}
......@@ -11,24 +11,22 @@ class Images extends BaseConfig
/**
* Default handler used if no other handler is specified.
*
* @var string
*/
public $defaultHandler = 'gd';
public string $defaultHandler = 'gd';
/**
* The path to the image library.
* Required for ImageMagick, GraphicsMagick, or NetPBM.
*
* @var string
*/
public $libraryPath = '/usr/local/bin/convert';
public string $libraryPath = '/usr/local/bin/convert';
/**
* The available handler classes.
*
* @var array<string, string>
*/
public $handlers = [
public array $handlers = [
'gd' => GDHandler::class,
'imagick' => ImageMagickHandler::class,
];
......@@ -41,34 +39,19 @@ class Images extends BaseConfig
| All uploaded images are of 1:1 ratio (width and height are the same).
*/
/**
* @var integer
*/
public $thumbnailSize = 150;
/**
* @var integer
*/
public $mediumSize = 320;
/**
* @var integer
*/
public $largeSize = 1024;
public int $thumbnailSize = 150;
public int $mediumSize = 320;
public int $largeSize = 1024;
/**
* Size of images linked in the rss feed (should be between 1400 and 3000)
*
* @var integer
*/
public $feedSize = 1400;
public int $feedSize = 1400;
/**
* Size for ID3 tag cover art (should be between 300 and 800)
*
* @var integer
*/
public $id3Size = 500;
public int $id3Size = 500;
/*
|--------------------------------------------------------------------------
......@@ -77,28 +60,13 @@ class Images extends BaseConfig
| The properties listed below set the name extensions for the resized images
*/
/**
* @var string
*/
public $thumbnailSuffix = '_thumbnail';
public string $thumbnailSuffix = '_thumbnail';
/**
* @var string
*/
public $mediumSuffix = '_medium';
public string $mediumSuffix = '_medium';
/**
* @var string
*/
public $largeSuffix = '_large';
public string $largeSuffix = '_large';
/**
* @var string
*/
public $feedSuffix = '_feed';
public string $feedSuffix = '_feed';
/**
* @var string
*/
public $id3Suffix = '_id3';
public string $id3Suffix = '_id3';
}
......@@ -26,52 +26,35 @@ class Kint extends BaseConfig
/**
* @var string[]
*/
public $plugins = [];
public array $plugins = [];
/**
* @var int
*/
public $maxDepth = 6;
public int $maxDepth = 6;
/**
* @var bool
*/
public $displayCalledFrom = true;
public bool $displayCalledFrom = true;
/**
* @var bool
*/
public $expanded = false;
public bool $expanded = false;
/*
|--------------------------------------------------------------------------
| RichRenderer Settings
|--------------------------------------------------------------------------
*/
/**
* @var string
*/
public $richTheme = 'aante-light.css';
/**
* @var bool
*/
public $richFolder = false;
public string $richTheme = 'aante-light.css';
/**
* @var int
*/
public $richSort = Renderer::SORT_FULL;
public bool $richFolder = false;
public int $richSort = Renderer::SORT_FULL;
/**
* @var string[]
*/
public $richObjectPlugins = [];
public array $richObjectPlugins = [];
/**
* @var string[]
*/
public $richTabPlugins = [];
public array $richTabPlugins = [];
/*
|--------------------------------------------------------------------------
......@@ -79,23 +62,11 @@ class Kint extends BaseConfig
|--------------------------------------------------------------------------
*/
/**
* @var bool
*/
public $cliColors = true;
public bool $cliColors = true;
/**
* @var bool
*/
public $cliForceUTF8 = false;
public bool $cliForceUTF8 = false;
/**
* @var bool
*/
public $cliDetectWidth = true;
public bool $cliDetectWidth = true;
/**
* @var int
*/
public $cliMinWidth = 40;
public int $cliMinWidth = 40;
}
......@@ -36,7 +36,7 @@ class Logger extends BaseConfig
* For a live site you'll usually enable Critical or higher (3) to be logged otherwise
* your log files will fill up very fast.
*
* @var integer|int[]
* @var int|int[]
*/
public int|array $threshold = 4;
......@@ -75,7 +75,7 @@ class Logger extends BaseConfig
* Handlers are executed in the order defined in this array, starting with
* the handler on top and continuing down.
*
* @var array<string, string|int|array<string, string>>
* @var array<string, mixed>
*/
public array $handlers = [
/*
......@@ -123,17 +123,5 @@ class Logger extends BaseConfig
*/
'path' => '',
],
/**
* The ChromeLoggerHandler requires the use of the Chrome web browser
* and the ChromeLogger extension. Uncomment this block to use it.
*/
// 'CodeIgniter\Log\Handlers\ChromeLoggerHandler' => [
// /*
// * The log levels that this handler will handle.
// */
// 'handles' => ['critical', 'alert', 'emergency', 'debug',
// 'error', 'info', 'notice', 'warning'],
// ]
];
}
......@@ -16,9 +16,8 @@ class Migrations extends BaseConfig
* You should enable migrations whenever you intend to do a schema migration
* and disable it back when you're done.
*
* @var boolean
*/
public $enabled = true;
public bool $enabled = true;
/**
* --------------------------------------------------------------------------
......@@ -31,9 +30,8 @@ class Migrations extends BaseConfig
* table to the $config['migration_version'] if they are not the same it
* will migrate up. This must be set.
*
* @var string
*/
public $table = 'migrations';
public string $table = 'migrations';
/**
* --------------------------------------------------------------------------
......@@ -49,7 +47,6 @@ class Migrations extends BaseConfig
* - Y-m-d-His_
* - Y_m_d_His_
*
* @var string
*/
public $timestampFormat = 'Y-m-d-His_';
public string $timestampFormat = 'Y-m-d-His_';
}
......@@ -20,7 +20,7 @@ class Pager extends BaseConfig
*
* @var array<string, string>
*/
public $templates = [
public array $templates = [
'default_full' => 'App\Views\pager\default_full',
'default_simple' => 'CodeIgniter\Pager\Views\default_simple',
'default_head' => 'CodeIgniter\Pager\Views\default_head',
......@@ -33,7 +33,6 @@ class Pager extends BaseConfig
*
* The default number of results shown in a single page.
*
* @var integer
*/
public $perPage = 20;
public int $perPage = 20;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment