diff --git a/system/src/Grav/Common/Assets.php b/system/src/Grav/Common/Assets.php index 06804a4bb..e36a485da 100644 --- a/system/src/Grav/Common/Assets.php +++ b/system/src/Grav/Common/Assets.php @@ -37,29 +37,31 @@ class Assets extends PropertyObject /** @const Regex to match JavaScript files */ const JS_REGEX = '/.\.js$/i'; + /** @var string */ protected $assets_dir; + /** @var string */ protected $assets_url; + /** @var array */ protected $assets_css = []; + /** @var array */ protected $assets_js = []; // Config Options + /** @var bool */ protected $css_pipeline; - protected $css_pipeline_include_externals; - protected $css_pipeline_before_excludes; + /** @var bool */ protected $js_pipeline; - protected $js_pipeline_include_externals; - protected $js_pipeline_before_excludes; + /** @var array */ protected $pipeline_options = []; - - protected $fetch_command; - protected $autoload; + /** @var bool */ protected $enable_asset_timestamp; + /** @var array|null */ protected $collections; + /** @var string */ protected $timestamp; - /** * Initialization called in the Grav lifecycle to initialize the Assets with appropriate configuration */ diff --git a/system/src/Grav/Common/Assets/BaseAsset.php b/system/src/Grav/Common/Assets/BaseAsset.php index f7d2cd767..a9805e119 100644 --- a/system/src/Grav/Common/Assets/BaseAsset.php +++ b/system/src/Grav/Common/Assets/BaseAsset.php @@ -25,25 +25,29 @@ abstract class BaseAsset extends PropertyObject /** @const Regex to match CSS import content */ protected const CSS_IMPORT_REGEX = '{@import(.*?);}'; + /** @var string */ protected $asset; - protected $asset_type; - protected $order; - protected $group; + /** @var string */ protected $position; + /** @var int */ protected $priority; + /** @var array */ protected $attributes = []; - + /** @var string */ protected $timestamp; + /** @var int|false */ protected $modified; + /** @var bool */ protected $remote; + /** @var string */ protected $query = ''; // Private Bits - private $base_url; - private $fetch_command; + /** @var bool */ private $css_rewrite = false; + /** @var bool */ private $css_minify = false; abstract function render(); diff --git a/system/src/Grav/Common/Assets/Pipeline.php b/system/src/Grav/Common/Assets/Pipeline.php index 0470aeecc..0933d18e3 100644 --- a/system/src/Grav/Common/Assets/Pipeline.php +++ b/system/src/Grav/Common/Assets/Pipeline.php @@ -35,19 +35,24 @@ class Pipeline extends PropertyObject protected const FIRST_FORWARDSLASH_REGEX = '{^\/{1}\w}'; - protected $css_minify; - protected $css_minify_windows; - protected $css_rewrite; + /** @var bool */ + protected $css_minify = false; + /** @var bool */ + protected $css_rewrite = false; + /** @var bool */ + protected $js_minify = false; - protected $js_minify; - protected $js_minify_windows; - - protected $base_url; + /** @var string */ protected $assets_dir; + /** @var string */ protected $assets_url; + /** @var string */ protected $timestamp; + /** @var array */ protected $attributes; - protected $query; + /** @var string */ + protected $query = ''; + /** @var string */ protected $asset; /** diff --git a/system/src/Grav/Common/Assets/Traits/AssetUtilsTrait.php b/system/src/Grav/Common/Assets/Traits/AssetUtilsTrait.php index 78df625b3..ae01a3b64 100644 --- a/system/src/Grav/Common/Assets/Traits/AssetUtilsTrait.php +++ b/system/src/Grav/Common/Assets/Traits/AssetUtilsTrait.php @@ -69,6 +69,7 @@ trait AssetUtilsTrait $link = ROOT_DIR . $relative_path; } + // TODO: looks like this is not being used. $file = $this->fetch_command instanceof \Closure ? @$this->fetch_command->__invoke($link) : @file_get_contents($link); // No file found, skip it... diff --git a/system/src/Grav/Common/Backup/Backups.php b/system/src/Grav/Common/Backup/Backups.php index 267b77152..4c9704046 100644 --- a/system/src/Grav/Common/Backup/Backups.php +++ b/system/src/Grav/Common/Backup/Backups.php @@ -27,9 +27,11 @@ class Backups protected const BACKUP_DATE_FORMAT = 'YmdHis'; + /** @var string */ protected static $backup_dir; - protected static $backups = null; + /** @var array|null */ + protected static $backups; public function init() { diff --git a/system/src/Grav/Common/Browser.php b/system/src/Grav/Common/Browser.php index f48fd34ba..dfd5be338 100644 --- a/system/src/Grav/Common/Browser.php +++ b/system/src/Grav/Common/Browser.php @@ -14,6 +14,7 @@ namespace Grav\Common; */ class Browser { + /** @var string[] */ protected $useragent = []; /** @@ -135,7 +136,7 @@ class Browser return true; } - + /** * Determine if “Do Not Track” is set by browser * @see https://www.w3.org/TR/tracking-dnt/ diff --git a/system/src/Grav/Common/Cache.php b/system/src/Grav/Common/Cache.php index ab08c28da..cd82b77a8 100644 --- a/system/src/Grav/Common/Cache.php +++ b/system/src/Grav/Common/Cache.php @@ -29,36 +29,34 @@ use Symfony\Component\EventDispatcher\EventDispatcher; */ class Cache extends Getters { - /** - * @var string Cache key. - */ + /** @var string Cache key. */ protected $key; + /** @var int */ protected $lifetime; + + /** @var int */ protected $now; /** @var Config $config */ protected $config; - /** - * @var DoctrineCache\CacheProvider - */ + /** @var DoctrineCache\CacheProvider */ protected $driver; - /** - * @var CacheInterface - */ + /** @var CacheInterface */ protected $simpleCache; + /** @var string */ protected $driver_name; + /** @var string */ protected $driver_setting; - /** - * @var bool - */ + /** @var bool */ protected $enabled; + /** @var string */ protected $cache_dir; protected static $standard_remove = [ diff --git a/system/src/Grav/Common/Config/CompiledBase.php b/system/src/Grav/Common/Config/CompiledBase.php index a2cc3a511..5fd25a393 100644 --- a/system/src/Grav/Common/Config/CompiledBase.php +++ b/system/src/Grav/Common/Config/CompiledBase.php @@ -13,44 +13,28 @@ use RocketTheme\Toolbox\File\PhpFile; abstract class CompiledBase { - /** - * @var int Version number for the compiled file. - */ + /** @var int Version number for the compiled file. */ public $version = 1; - /** - * @var string Filename (base name) of the compiled configuration. - */ + /** @var string Filename (base name) of the compiled configuration. */ public $name; - /** - * @var string|bool Configuration checksum. - */ + /** @var string|bool Configuration checksum. */ public $checksum; - /** - * @var int Timestamp of compiled configuration - */ + /** @var int Timestamp of compiled configuration */ public $timestamp; - /** - * @var string Cache folder to be used. - */ + /** @var string Cache folder to be used. */ protected $cacheFolder; - /** - * @var array List of files to load. - */ + /** @var array List of files to load. */ protected $files; - /** - * @var string - */ + /** @var string */ protected $path; - /** - * @var mixed Configuration object. - */ + /** @var mixed Configuration object. */ protected $object; /** diff --git a/system/src/Grav/Common/Config/CompiledConfig.php b/system/src/Grav/Common/Config/CompiledConfig.php index 1c92edd9a..f20bc2c3d 100644 --- a/system/src/Grav/Common/Config/CompiledConfig.php +++ b/system/src/Grav/Common/Config/CompiledConfig.php @@ -13,14 +13,10 @@ use Grav\Common\File\CompiledYamlFile; class CompiledConfig extends CompiledBase { - /** - * @var callable Blueprints loader. - */ + /** @var callable Blueprints loader. */ protected $callable; - /** - * @var bool - */ + /** @var bool */ protected $withDefaults; public function __construct($cacheFolder, array $files, $path) diff --git a/system/src/Grav/Common/Config/Config.php b/system/src/Grav/Common/Config/Config.php index 7b808463b..d63aa814f 100644 --- a/system/src/Grav/Common/Config/Config.php +++ b/system/src/Grav/Common/Config/Config.php @@ -17,6 +17,7 @@ use Grav\Common\Utils; class Config extends Data { + /** @var string */ public $environment; /** @var string */ diff --git a/system/src/Grav/Common/Config/ConfigFileFinder.php b/system/src/Grav/Common/Config/ConfigFileFinder.php index 1e7adca59..1de87d1eb 100644 --- a/system/src/Grav/Common/Config/ConfigFileFinder.php +++ b/system/src/Grav/Common/Config/ConfigFileFinder.php @@ -13,6 +13,7 @@ use Grav\Common\Filesystem\Folder; class ConfigFileFinder { + /** @var string */ protected $base = ''; /** diff --git a/system/src/Grav/Common/Config/Languages.php b/system/src/Grav/Common/Config/Languages.php index 9c76dc562..08a0cc677 100644 --- a/system/src/Grav/Common/Config/Languages.php +++ b/system/src/Grav/Common/Config/Languages.php @@ -14,19 +14,13 @@ use Grav\Common\Utils; class Languages extends Data { - /** - * @var string|null - */ + /** @var string|null */ protected $checksum; - /** - * @var string|null - */ + /** @var string|null */ protected $modified; - /** - * @var string|null - */ + /** @var string|null */ protected $timestamp; diff --git a/system/src/Grav/Common/Config/Setup.php b/system/src/Grav/Common/Config/Setup.php index 6a4d336bb..1e373899d 100644 --- a/system/src/Grav/Common/Config/Setup.php +++ b/system/src/Grav/Common/Config/Setup.php @@ -32,6 +32,7 @@ class Setup extends Data */ public static $environment; + /** @var array */ protected $streams = [ 'system' => [ 'type' => 'ReadOnlyStream', diff --git a/system/src/Grav/Common/Data/Blueprint.php b/system/src/Grav/Common/Data/Blueprint.php index 6d74f52d5..6a2ff2c09 100644 --- a/system/src/Grav/Common/Data/Blueprint.php +++ b/system/src/Grav/Common/Data/Blueprint.php @@ -32,6 +32,7 @@ class Blueprint extends BlueprintForm /** @var array|null */ protected $defaults; + /** @var array */ protected $handlers = []; public function __clone() diff --git a/system/src/Grav/Common/Data/BlueprintSchema.php b/system/src/Grav/Common/Data/BlueprintSchema.php index bd81d0f5c..0b058f42d 100644 --- a/system/src/Grav/Common/Data/BlueprintSchema.php +++ b/system/src/Grav/Common/Data/BlueprintSchema.php @@ -18,6 +18,7 @@ class BlueprintSchema extends BlueprintSchemaBase implements ExportInterface { use Export; + /** @var array */ protected $ignoreFormKeys = [ 'title' => true, 'help' => true, diff --git a/system/src/Grav/Common/Data/ValidationException.php b/system/src/Grav/Common/Data/ValidationException.php index 4cf805e57..430f45728 100644 --- a/system/src/Grav/Common/Data/ValidationException.php +++ b/system/src/Grav/Common/Data/ValidationException.php @@ -13,6 +13,7 @@ use Grav\Common\Grav; class ValidationException extends \RuntimeException { + /** @var array */ protected $messages = []; public function setMessages(array $messages = []) diff --git a/system/src/Grav/Common/Debugger.php b/system/src/Grav/Common/Debugger.php index 08ea914ff..8161c3688 100644 --- a/system/src/Grav/Common/Debugger.php +++ b/system/src/Grav/Common/Debugger.php @@ -62,6 +62,7 @@ class Debugger /** @var bool */ protected $enabled = false; + /** @var bool */ protected $initialized = false; /** @var array */ diff --git a/system/src/Grav/Common/Errors/BareHandler.php b/system/src/Grav/Common/Errors/BareHandler.php index 49595c98f..22f97191b 100644 --- a/system/src/Grav/Common/Errors/BareHandler.php +++ b/system/src/Grav/Common/Errors/BareHandler.php @@ -13,7 +13,6 @@ use Whoops\Handler\Handler; class BareHandler extends Handler { - /** * @return int|null */ diff --git a/system/src/Grav/Common/Errors/SimplePageHandler.php b/system/src/Grav/Common/Errors/SimplePageHandler.php index b5ca4d5fa..976bd9b79 100644 --- a/system/src/Grav/Common/Errors/SimplePageHandler.php +++ b/system/src/Grav/Common/Errors/SimplePageHandler.php @@ -15,8 +15,10 @@ use Whoops\Util\TemplateHelper; class SimplePageHandler extends Handler { - private $searchPaths = array(); - private $resourceCache = array(); + /** @var array */ + private $searchPaths = []; + /** @var array */ + private $resourceCache = []; public function __construct() { diff --git a/system/src/Grav/Common/Errors/SystemFacade.php b/system/src/Grav/Common/Errors/SystemFacade.php index 02ef0cf8c..c51531092 100644 --- a/system/src/Grav/Common/Errors/SystemFacade.php +++ b/system/src/Grav/Common/Errors/SystemFacade.php @@ -11,6 +11,7 @@ namespace Grav\Common\Errors; class SystemFacade extends \Whoops\Util\SystemFacade { + /** @var callable */ protected $whoopsShutdownHandler; /** diff --git a/system/src/Grav/Common/Filesystem/Archiver.php b/system/src/Grav/Common/Filesystem/Archiver.php index 58e4a421a..c4c9d84d2 100644 --- a/system/src/Grav/Common/Filesystem/Archiver.php +++ b/system/src/Grav/Common/Filesystem/Archiver.php @@ -13,11 +13,13 @@ use Grav\Common\Utils; abstract class Archiver { + /** @var array */ protected $options = [ 'exclude_files' => ['.DS_Store'], 'exclude_paths' => [] ]; + /** @var string */ protected $archive_file; public static function create($compression) diff --git a/system/src/Grav/Common/Filesystem/RecursiveDirectoryFilterIterator.php b/system/src/Grav/Common/Filesystem/RecursiveDirectoryFilterIterator.php index c662fc466..23ed21c05 100644 --- a/system/src/Grav/Common/Filesystem/RecursiveDirectoryFilterIterator.php +++ b/system/src/Grav/Common/Filesystem/RecursiveDirectoryFilterIterator.php @@ -11,8 +11,11 @@ namespace Grav\Common\Filesystem; class RecursiveDirectoryFilterIterator extends \RecursiveFilterIterator { + /** @var string */ protected static $root; + /** @var array */ protected static $ignore_folders; + /** @var array */ protected static $ignore_files; /** diff --git a/system/src/Grav/Common/Filesystem/RecursiveFolderFilterIterator.php b/system/src/Grav/Common/Filesystem/RecursiveFolderFilterIterator.php index eb493db6a..cf2ecfbac 100644 --- a/system/src/Grav/Common/Filesystem/RecursiveFolderFilterIterator.php +++ b/system/src/Grav/Common/Filesystem/RecursiveFolderFilterIterator.php @@ -13,6 +13,7 @@ use Grav\Common\Grav; class RecursiveFolderFilterIterator extends \RecursiveFilterIterator { + /** @var array */ protected static $ignore_folders; /** diff --git a/system/src/Grav/Common/Flex/Pages/PageCollection.php b/system/src/Grav/Common/Flex/Pages/PageCollection.php index 9a61749c2..e03d272e8 100644 --- a/system/src/Grav/Common/Flex/Pages/PageCollection.php +++ b/system/src/Grav/Common/Flex/Pages/PageCollection.php @@ -33,6 +33,7 @@ use Grav\Framework\Flex\Pages\FlexPageCollection; */ class PageCollection extends FlexPageCollection implements PageCollectionInterface { + /** @var array|null */ protected $_params; /** diff --git a/system/src/Grav/Common/Flex/Pages/PageIndex.php b/system/src/Grav/Common/Flex/Pages/PageIndex.php index 9c9a5c032..c1fc5354c 100644 --- a/system/src/Grav/Common/Flex/Pages/PageIndex.php +++ b/system/src/Grav/Common/Flex/Pages/PageIndex.php @@ -32,6 +32,7 @@ class PageIndex extends FlexPageIndex /** @var PageObject|array */ protected $_root; + /** @var array|null */ protected $_params; /** diff --git a/system/src/Grav/Common/Flex/Pages/PageObject.php b/system/src/Grav/Common/Flex/Pages/PageObject.php index 8e83aea4c..e997d80a5 100644 --- a/system/src/Grav/Common/Flex/Pages/PageObject.php +++ b/system/src/Grav/Common/Flex/Pages/PageObject.php @@ -50,6 +50,7 @@ class PageObject extends FlexPageObject /** @var string File format, eg. 'md' */ protected $format; + /** @var bool */ private $_initialized = false; /** diff --git a/system/src/Grav/Common/Flex/Pages/PageStorage.php b/system/src/Grav/Common/Flex/Pages/PageStorage.php index 73294b627..25b8ad1e0 100644 --- a/system/src/Grav/Common/Flex/Pages/PageStorage.php +++ b/system/src/Grav/Common/Flex/Pages/PageStorage.php @@ -24,14 +24,22 @@ use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator; */ class PageStorage extends FolderStorage { - protected $ignore_files; - protected $ignore_folders; + /** @var bool */ protected $ignore_hidden; + /** @var array */ + protected $ignore_files; + /** @var array */ + protected $ignore_folders; + /** @var bool */ protected $include_default_lang_file_extension; + /** @var bool */ protected $recurse; + /** @var string */ protected $base_path; + /** @var int */ protected $flags; + /** @var string */ protected $regex; protected function initOptions(array $options): void diff --git a/system/src/Grav/Common/Flex/Users/UserObject.php b/system/src/Grav/Common/Flex/Users/UserObject.php index ea45602f0..c9906f533 100644 --- a/system/src/Grav/Common/Flex/Users/UserObject.php +++ b/system/src/Grav/Common/Flex/Users/UserObject.php @@ -68,6 +68,7 @@ class UserObject extends FlexObject implements UserInterface, MediaManipulationI use FlexAuthorizeTrait; use UserTrait; + /** @var array|null */ protected $_uploads_original; /** @var FileInterface|null */ diff --git a/system/src/Grav/Common/GPM/Common/AbstractPackageCollection.php b/system/src/Grav/Common/GPM/Common/AbstractPackageCollection.php index bc4ecab9d..49084818b 100644 --- a/system/src/Grav/Common/GPM/Common/AbstractPackageCollection.php +++ b/system/src/Grav/Common/GPM/Common/AbstractPackageCollection.php @@ -13,6 +13,7 @@ use Grav\Common\Iterator; abstract class AbstractPackageCollection extends Iterator { + /** @var string */ protected $type; public function toJson() diff --git a/system/src/Grav/Common/GPM/Common/CachedCollection.php b/system/src/Grav/Common/GPM/Common/CachedCollection.php index a6fca4db0..0f87c8cb5 100644 --- a/system/src/Grav/Common/GPM/Common/CachedCollection.php +++ b/system/src/Grav/Common/GPM/Common/CachedCollection.php @@ -13,7 +13,8 @@ use Grav\Common\Iterator; class CachedCollection extends Iterator { - protected static $cache; + /** @var array */ + protected static $cache = []; public function __construct($items) { diff --git a/system/src/Grav/Common/GPM/Common/Package.php b/system/src/Grav/Common/GPM/Common/Package.php index 1c7f9cbb8..40d1a860b 100644 --- a/system/src/Grav/Common/GPM/Common/Package.php +++ b/system/src/Grav/Common/GPM/Common/Package.php @@ -16,9 +16,7 @@ use Grav\Common\Data\Data; */ class Package { - /** - * @var Data - */ + /** @var Data */ protected $data; public function __construct(Data $package, $type = null) diff --git a/system/src/Grav/Common/GPM/GPM.php b/system/src/Grav/Common/GPM/GPM.php index ae571198d..2efae6208 100644 --- a/system/src/Grav/Common/GPM/GPM.php +++ b/system/src/Grav/Common/GPM/GPM.php @@ -18,29 +18,19 @@ use RocketTheme\Toolbox\File\YamlFile; class GPM extends Iterator { - /** - * Local installed Packages - * @var Local\Packages - */ + /** @var Local\Packages Local installed Packages */ private $installed; - /** - * Remote available Packages - * @var Remote\Packages - */ + /** @var Remote\Packages Remote available Packages */ private $repository; - /** - * @var Remote\GravCore - */ + /** @var Remote\GravCore */ public $grav; - /** - * Internal cache - * @var array - */ + /** @var array Internal cache */ protected $cache; + /** @var array */ protected $install_paths = [ 'plugins' => 'user/plugins/%name%', 'themes' => 'user/themes/%name%', diff --git a/system/src/Grav/Common/GPM/Installer.php b/system/src/Grav/Common/GPM/Installer.php index fb1bdb19e..a9ece9940 100644 --- a/system/src/Grav/Common/GPM/Installer.php +++ b/system/src/Grav/Common/GPM/Installer.php @@ -33,31 +33,19 @@ class Installer /** @const Invalid source file */ public const INVALID_SOURCE = 128; - /** - * Destination folder on which validation checks are applied - * @var string - */ + /** @var string Destination folder on which validation checks are applied */ protected static $target; - /** - * @var int|string Error code or string - */ + /** @var int|string Error code or string */ protected static $error = 0; - /** - * @var int Zip Error Code - */ + /** @var int Zip Error Code */ protected static $error_zip = 0; - /** - * @var string Post install message - */ + /** @var string Post install message */ protected static $message = ''; - /** - * Default options for the install - * @var array - */ + /** @var array Default options for the install */ protected static $options = [ 'overwrite' => true, 'ignore_symlinks' => true, diff --git a/system/src/Grav/Common/GPM/Licenses.php b/system/src/Grav/Common/GPM/Licenses.php index 171743a46..737ad181a 100644 --- a/system/src/Grav/Common/GPM/Licenses.php +++ b/system/src/Grav/Common/GPM/Licenses.php @@ -11,6 +11,7 @@ namespace Grav\Common\GPM; use Grav\Common\File\CompiledYamlFile; use Grav\Common\Grav; +use RocketTheme\Toolbox\File\FileInterface; /** * Class Licenses @@ -19,17 +20,11 @@ use Grav\Common\Grav; */ class Licenses { - - /** - * Regex to validate the format of a License - * - * @var string - */ + /** @var string Regex to validate the format of a License */ protected static $regex = '^(?:[A-F0-9]{8}-){3}(?:[A-F0-9]{8}){1}$'; - + /** @var FileInterface */ protected static $file; - /** * Returns the license for a Premium package * @@ -107,7 +102,7 @@ class Licenses /** * Get the License File object * - * @return \RocketTheme\Toolbox\File\FileInterface + * @return FileInterface */ public static function getLicenseFile() { diff --git a/system/src/Grav/Common/GPM/Local/Package.php b/system/src/Grav/Common/GPM/Local/Package.php index ff797a78c..b6b341291 100644 --- a/system/src/Grav/Common/GPM/Local/Package.php +++ b/system/src/Grav/Common/GPM/Local/Package.php @@ -14,6 +14,7 @@ use Grav\Common\GPM\Common\Package as BasePackage; class Package extends BasePackage { + /** @var array */ protected $settings; public function __construct(Data $package, $package_type = null) @@ -31,7 +32,7 @@ class Package extends BasePackage } /** - * @return mixed + * @return bool */ public function isEnabled() { diff --git a/system/src/Grav/Common/GPM/Local/Plugins.php b/system/src/Grav/Common/GPM/Local/Plugins.php index 19adfb88e..390a1cfdf 100644 --- a/system/src/Grav/Common/GPM/Local/Plugins.php +++ b/system/src/Grav/Common/GPM/Local/Plugins.php @@ -13,9 +13,7 @@ use Grav\Common\Grav; class Plugins extends AbstractPackageCollection { - /** - * @var string - */ + /** @var string */ protected $type = 'plugins'; /** diff --git a/system/src/Grav/Common/GPM/Local/Themes.php b/system/src/Grav/Common/GPM/Local/Themes.php index 8607e6b7f..441df364d 100644 --- a/system/src/Grav/Common/GPM/Local/Themes.php +++ b/system/src/Grav/Common/GPM/Local/Themes.php @@ -13,9 +13,7 @@ use Grav\Common\Grav; class Themes extends AbstractPackageCollection { - /** - * @var string - */ + /** @var string */ protected $type = 'themes'; /** diff --git a/system/src/Grav/Common/GPM/Remote/AbstractPackageCollection.php b/system/src/Grav/Common/GPM/Remote/AbstractPackageCollection.php index 429c5b1dc..df1527ed4 100644 --- a/system/src/Grav/Common/GPM/Remote/AbstractPackageCollection.php +++ b/system/src/Grav/Common/GPM/Remote/AbstractPackageCollection.php @@ -16,20 +16,16 @@ use \Doctrine\Common\Cache\FilesystemCache; class AbstractPackageCollection extends BaseCollection { - /** - * The cached data previously fetched - * @var string - */ + /** @var string The cached data previously fetched */ protected $raw; - /** - * The lifetime to store the entry in seconds - * @var int - */ + /** @var int The lifetime to store the entry in seconds */ private $lifetime = 86400; + /** @var string */ protected $repository; + /** @var FilesystemCache */ protected $cache; /** diff --git a/system/src/Grav/Common/GPM/Remote/GravCore.php b/system/src/Grav/Common/GPM/Remote/GravCore.php index 3840b4a61..774ae0751 100644 --- a/system/src/Grav/Common/GPM/Remote/GravCore.php +++ b/system/src/Grav/Common/GPM/Remote/GravCore.php @@ -14,12 +14,16 @@ use \Doctrine\Common\Cache\FilesystemCache; class GravCore extends AbstractPackageCollection { + /** @var string */ protected $repository = 'https://getgrav.org/downloads/grav.json'; + /** @var array */ private $data; - + /** @var string */ private $version; + /** @var string */ private $date; + /** @var string|null */ private $min_php; /** diff --git a/system/src/Grav/Common/GPM/Remote/Plugins.php b/system/src/Grav/Common/GPM/Remote/Plugins.php index 1d905e378..b4ee3c0e0 100644 --- a/system/src/Grav/Common/GPM/Remote/Plugins.php +++ b/system/src/Grav/Common/GPM/Remote/Plugins.php @@ -11,11 +11,9 @@ namespace Grav\Common\GPM\Remote; class Plugins extends AbstractPackageCollection { - /** - * @var string - */ + /** @var string */ protected $type = 'plugins'; - + /** @var string */ protected $repository = 'https://getgrav.org/downloads/plugins.json'; /** diff --git a/system/src/Grav/Common/GPM/Remote/Themes.php b/system/src/Grav/Common/GPM/Remote/Themes.php index 8024b40c6..080030013 100644 --- a/system/src/Grav/Common/GPM/Remote/Themes.php +++ b/system/src/Grav/Common/GPM/Remote/Themes.php @@ -11,11 +11,9 @@ namespace Grav\Common\GPM\Remote; class Themes extends AbstractPackageCollection { - /** - * @var string - */ + /** @var string */ protected $type = 'themes'; - + /** @var string */ protected $repository = 'https://getgrav.org/downloads/themes.json'; /** diff --git a/system/src/Grav/Common/GPM/Response.php b/system/src/Grav/Common/GPM/Response.php index 2cce7d32f..8818b0bda 100644 --- a/system/src/Grav/Common/GPM/Response.php +++ b/system/src/Grav/Common/GPM/Response.php @@ -14,25 +14,13 @@ use Grav\Common\Grav; class Response { - /** - * The callback for the progress - * - * @var callable Either a function or callback in array notation - */ + /** @var callable The callback for the progress, either a function or callback in array notation */ public static $callback = null; - /** - * Which method to use for HTTP calls, can be 'curl', 'fopen' or 'auto'. Auto is default and fopen is the preferred method - * - * @var string - */ + /** @var string Which method to use for HTTP calls, can be 'curl', 'fopen' or 'auto'. Auto is default and fopen is the preferred method */ private static $method = 'auto'; - /** - * Default parameters for `curl` and `fopen` - * - * @var array - */ + /** @var array Default parameters for `curl` and `fopen` */ private static $defaults = [ 'curl' => [ diff --git a/system/src/Grav/Common/GPM/Upgrader.php b/system/src/Grav/Common/GPM/Upgrader.php index 71221ba2f..b041941c1 100644 --- a/system/src/Grav/Common/GPM/Upgrader.php +++ b/system/src/Grav/Common/GPM/Upgrader.php @@ -18,13 +18,10 @@ use Grav\Common\GPM\Remote\GravCore; */ class Upgrader { - /** - * Remote details about latest Grav version - * - * @var GravCore - */ + /** @var GravCore Remote details about latest Grav version */ private $remote; + /** @var string|null */ private $min_php; /** diff --git a/system/src/Grav/Common/Getters.php b/system/src/Grav/Common/Getters.php index e69116e15..26255f6e4 100644 --- a/system/src/Grav/Common/Getters.php +++ b/system/src/Grav/Common/Getters.php @@ -11,11 +11,7 @@ namespace Grav\Common; abstract class Getters implements \ArrayAccess, \Countable { - /** - * Define variable used in getters. - * - * @var string - */ + /** @var string Define variable used in getters. */ protected $gettersVariable = null; /** diff --git a/system/src/Grav/Common/Grav.php b/system/src/Grav/Common/Grav.php index b92d395db..24b8112e7 100644 --- a/system/src/Grav/Common/Grav.php +++ b/system/src/Grav/Common/Grav.php @@ -46,14 +46,10 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; */ class Grav extends Container { - /** - * @var string Processed output for the page. - */ + /** @var string Processed output for the page. */ public $output; - /** - * @var static|null The singleton instance - */ + /** @var static|null The singleton instance */ protected static $instance; /** @@ -105,6 +101,7 @@ class Grav extends Container 'renderProcessor', ]; + /** @var array */ protected $initialized = []; /** diff --git a/system/src/Grav/Common/GravTrait.php b/system/src/Grav/Common/GravTrait.php index a82c23a9e..5c7105b6b 100644 --- a/system/src/Grav/Common/GravTrait.php +++ b/system/src/Grav/Common/GravTrait.php @@ -14,6 +14,7 @@ namespace Grav\Common; */ trait GravTrait { + /** @var Grav */ protected static $grav; /** diff --git a/system/src/Grav/Common/Helpers/Base32.php b/system/src/Grav/Common/Helpers/Base32.php index c0828c059..81b78572c 100644 --- a/system/src/Grav/Common/Helpers/Base32.php +++ b/system/src/Grav/Common/Helpers/Base32.php @@ -11,7 +11,9 @@ namespace Grav\Common\Helpers; class Base32 { + /** @var string */ protected static $base32Chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'; + /** @var array */ protected static $base32Lookup = [ 0xFF,0xFF,0x1A,0x1B,0x1C,0x1D,0x1E,0x1F, // '0', '1', '2', '3', '4', '5', '6', '7' 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, // '8', '9', ':', ';', '<', '=', '>', '?' diff --git a/system/src/Grav/Common/Helpers/Exif.php b/system/src/Grav/Common/Helpers/Exif.php index 15aff6677..66087be19 100644 --- a/system/src/Grav/Common/Helpers/Exif.php +++ b/system/src/Grav/Common/Helpers/Exif.php @@ -10,9 +10,11 @@ namespace Grav\Common\Helpers; use Grav\Common\Grav; +use PHPExif\Reader\Reader; class Exif { + /** @var Reader */ public $reader; /** @@ -30,6 +32,9 @@ class Exif } } + /** + * @return Reader + */ public function getReader() { if ($this->reader) { diff --git a/system/src/Grav/Common/Helpers/LogViewer.php b/system/src/Grav/Common/Helpers/LogViewer.php index db9a4fc9e..33f1c58a3 100644 --- a/system/src/Grav/Common/Helpers/LogViewer.php +++ b/system/src/Grav/Common/Helpers/LogViewer.php @@ -11,6 +11,7 @@ namespace Grav\Common\Helpers; class LogViewer { + /** @var string */ protected $pattern = '/\[(?P.*)\] (?P\w+).(?P\w+): (?P.*[^ ]+) (?P[^ ]+) (?P[^ ]+)/'; /** diff --git a/system/src/Grav/Common/Helpers/Truncator.php b/system/src/Grav/Common/Helpers/Truncator.php index dcb940b2b..e27efe9f9 100644 --- a/system/src/Grav/Common/Helpers/Truncator.php +++ b/system/src/Grav/Common/Helpers/Truncator.php @@ -28,7 +28,6 @@ use DOMLettersIterator; class Truncator { - /** * Safely truncates HTML by a given number of words. * @param string $html Input HTML. diff --git a/system/src/Grav/Common/Inflector.php b/system/src/Grav/Common/Inflector.php index 5643a1f57..a1caa082d 100644 --- a/system/src/Grav/Common/Inflector.php +++ b/system/src/Grav/Common/Inflector.php @@ -17,10 +17,15 @@ use Grav\Common\Language\Language; class Inflector { + /** @var array */ protected static $plural; + /** @var array */ protected static $singular; + /** @var array */ protected static $uncountable; + /** @var array */ protected static $irregular; + /** @var array */ protected static $ordinals; public static function init() diff --git a/system/src/Grav/Common/Iterator.php b/system/src/Grav/Common/Iterator.php index 4e1aa20e9..6b8980dbe 100644 --- a/system/src/Grav/Common/Iterator.php +++ b/system/src/Grav/Common/Iterator.php @@ -20,9 +20,7 @@ class Iterator implements \ArrayAccess, \Iterator, \Countable, \Serializable { use Constructor, ArrayAccessWithGetters, ArrayIterator, Countable, Serializable, Export; - /** - * @var array - */ + /** @var array */ protected $items = []; /** diff --git a/system/src/Grav/Common/Language/Language.php b/system/src/Grav/Common/Language/Language.php index 450929576..88d131c9c 100644 --- a/system/src/Grav/Common/Language/Language.php +++ b/system/src/Grav/Common/Language/Language.php @@ -19,21 +19,25 @@ class Language { /** @var Grav */ protected $grav; - /** @var Config */ protected $config; - + /** @var bool */ protected $enabled = true; - /** @var array */ protected $languages = []; + /** @var array */ protected $fallback_languages = []; + /** @var array */ protected $fallback_extensions = []; + /** @var array */ protected $page_extesions = []; + /** @var string */ protected $default; + /** @var string */ protected $active; - + /** @var array */ protected $http_accept_language; + /** @var bool */ protected $lang_in_url = false; /** diff --git a/system/src/Grav/Common/Language/LanguageCodes.php b/system/src/Grav/Common/Language/LanguageCodes.php index 0d320b6a2..3750e0652 100644 --- a/system/src/Grav/Common/Language/LanguageCodes.php +++ b/system/src/Grav/Common/Language/LanguageCodes.php @@ -11,6 +11,7 @@ namespace Grav\Common\Language; class LanguageCodes { + /** @var array */ protected static $codes = [ 'af' => [ 'name' => 'Afrikaans', 'nativeName' => 'Afrikaans' ], 'ak' => [ 'name' => 'Akan', 'nativeName' => 'Akan' ], // unverified native name diff --git a/system/src/Grav/Common/Markdown/ParsedownGravTrait.php b/system/src/Grav/Common/Markdown/ParsedownGravTrait.php index aa76cdf0c..4ae19d5f2 100644 --- a/system/src/Grav/Common/Markdown/ParsedownGravTrait.php +++ b/system/src/Grav/Common/Markdown/ParsedownGravTrait.php @@ -14,15 +14,18 @@ use Grav\Common\Page\Interfaces\PageInterface; trait ParsedownGravTrait { + /** @var array */ + public $completable_blocks = []; + /** @var array */ + public $continuable_blocks = []; + /** @var Excerpts */ protected $excerpts; - + /** @var array */ protected $special_chars; + /** @var string */ protected $twig_link_regex = '/\!*\[(?:.*)\]\((\{([\{%#])\s*(.*?)\s*(?:\2|\})\})\)/'; - public $completable_blocks = []; - public $continuable_blocks = []; - /** * Initialization function to setup key variables needed by the MarkdownGravLinkTrait * diff --git a/system/src/Grav/Common/Media/Traits/MediaTrait.php b/system/src/Grav/Common/Media/Traits/MediaTrait.php index a90672169..8fc169f25 100644 --- a/system/src/Grav/Common/Media/Traits/MediaTrait.php +++ b/system/src/Grav/Common/Media/Traits/MediaTrait.php @@ -18,7 +18,9 @@ use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator; trait MediaTrait { + /** @var MediaCollectionInterface|null */ protected $media; + /** @var bool */ protected $_loadMedia = true; /** diff --git a/system/src/Grav/Common/Page/Collection.php b/system/src/Grav/Common/Page/Collection.php index c5afaf7cb..f8eb703ae 100644 --- a/system/src/Grav/Common/Page/Collection.php +++ b/system/src/Grav/Common/Page/Collection.php @@ -17,14 +17,10 @@ use Grav\Common\Utils; class Collection extends Iterator implements PageCollectionInterface { - /** - * @var Pages - */ + /** @var Pages */ protected $pages; - /** - * @var array - */ + /** @var array */ protected $params; /** diff --git a/system/src/Grav/Common/Page/Header.php b/system/src/Grav/Common/Page/Header.php index c08113830..e4bbb0175 100644 --- a/system/src/Grav/Common/Page/Header.php +++ b/system/src/Grav/Common/Page/Header.php @@ -18,6 +18,7 @@ class Header implements \ArrayAccess, ExportInterface, \JsonSerializable { use NestedArrayAccessWithGetters, Constructor, Export; + /** @var array */ protected $items; public function jsonSerialize() diff --git a/system/src/Grav/Common/Page/Media.php b/system/src/Grav/Common/Page/Media.php index c3979b42b..a7f4a2c2a 100644 --- a/system/src/Grav/Common/Page/Media.php +++ b/system/src/Grav/Common/Page/Media.php @@ -19,8 +19,10 @@ use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator; class Media extends AbstractMedia { + /** @var GlobalMedia */ protected static $global; + /** @var array */ protected $standard_exif = ['FileSize', 'MimeType', 'height', 'width']; /** diff --git a/system/src/Grav/Common/Page/Medium/AbstractMedia.php b/system/src/Grav/Common/Page/Medium/AbstractMedia.php index ded875a2c..5705a0898 100644 --- a/system/src/Grav/Common/Page/Medium/AbstractMedia.php +++ b/system/src/Grav/Common/Page/Medium/AbstractMedia.php @@ -27,13 +27,19 @@ abstract class AbstractMedia implements ExportInterface, MediaCollectionInterfac use Iterator; use Export; + /** @var array */ protected $items = []; /** @var string */ protected $path; + /** @var array */ protected $images = []; + /** @var array */ protected $videos = []; + /** @var array */ protected $audios = []; + /** @var array */ protected $files = []; + /** @var array|null */ protected $media_order; /** diff --git a/system/src/Grav/Common/Page/Medium/ImageMedium.php b/system/src/Grav/Common/Page/Medium/ImageMedium.php index 4684c63b8..6f2798876 100644 --- a/system/src/Grav/Common/Page/Medium/ImageMedium.php +++ b/system/src/Grav/Common/Page/Medium/ImageMedium.php @@ -16,39 +16,25 @@ use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator; class ImageMedium extends Medium { - /** - * @var array - */ + /** @var array */ protected $thumbnailTypes = ['page', 'media', 'default']; - /** - * @var ImageFile|null - */ + /** @var ImageFile|null */ protected $image; - /** - * @var string - */ + /** @var string */ protected $format = 'guess'; - /** - * @var int - */ + /** @var int */ protected $quality; - /** - * @var int - */ + /** @var int */ protected $default_quality; - /** - * @var bool - */ + /** @var bool */ protected $debug_watermarked = false; - /** - * @var array - */ + /** @var array */ public static $magic_actions = [ 'resize', 'forceResize', 'cropResize', 'crop', 'zoomCrop', 'negate', 'brightness', 'contrast', 'grayscale', 'emboss', @@ -56,9 +42,7 @@ class ImageMedium extends Medium 'rotate', 'flip', 'fixOrientation', 'gaussianBlur' ]; - /** - * @var array - */ + /** @var array */ public static $magic_resize_actions = [ 'resize' => [0, 1], 'forceResize' => [0, 1], @@ -67,9 +51,7 @@ class ImageMedium extends Medium 'zoomCrop' => [0, 1] ]; - /** - * @var string - */ + /** @var string */ protected $sizes = '100vw'; /** diff --git a/system/src/Grav/Common/Page/Medium/Link.php b/system/src/Grav/Common/Page/Medium/Link.php index 18b011e68..995622ac1 100644 --- a/system/src/Grav/Common/Page/Medium/Link.php +++ b/system/src/Grav/Common/Page/Medium/Link.php @@ -13,10 +13,9 @@ class Link implements RenderableInterface { use ParsedownHtmlTrait; - /** - * @var array - */ + /** @var array */ protected $attributes = []; + /** @var Medium|null */ protected $source; /** diff --git a/system/src/Grav/Common/Page/Medium/Medium.php b/system/src/Grav/Common/Page/Medium/Medium.php index 41534fabd..23262ae74 100644 --- a/system/src/Grav/Common/Page/Medium/Medium.php +++ b/system/src/Grav/Common/Page/Medium/Medium.php @@ -26,48 +26,34 @@ class Medium extends Data implements RenderableInterface, MediaObjectInterface { use ParsedownHtmlTrait; - /** - * @var string - */ + /** @var string */ protected $mode = 'source'; - /** - * @var Medium|null - */ + /** @var Medium|null */ protected $_thumbnail; - /** - * @var array - */ + /** @var array */ protected $thumbnailTypes = ['page', 'default']; - protected $thumbnailType = null; + /** @var string|null */ + protected $thumbnailType; - /** - * @var Medium[] - */ + /** @var Medium[] */ protected $alternatives = []; - /** - * @var array - */ + /** @var array */ protected $attributes = []; - /** - * @var array - */ + /** @var array */ protected $styleAttributes = []; - /** - * @var array - */ + /** @var array */ protected $metadata = []; - /** - * @var array - */ + /** @var array */ protected $medium_querystring = []; + /** @var string */ protected $timestamp; /** diff --git a/system/src/Grav/Common/Page/Medium/ParsedownHtmlTrait.php b/system/src/Grav/Common/Page/Medium/ParsedownHtmlTrait.php index 4b4714069..31a2a861c 100644 --- a/system/src/Grav/Common/Page/Medium/ParsedownHtmlTrait.php +++ b/system/src/Grav/Common/Page/Medium/ParsedownHtmlTrait.php @@ -14,9 +14,7 @@ use Grav\Common\Page\Markdown\Excerpts; trait ParsedownHtmlTrait { - /** - * @var \Grav\Common\Markdown\Parsedown|null - */ + /** @var Parsedown|null */ protected $parsedown; /** diff --git a/system/src/Grav/Common/Page/Medium/ThumbnailImageMedium.php b/system/src/Grav/Common/Page/Medium/ThumbnailImageMedium.php index 535ade190..76ccb0ba4 100644 --- a/system/src/Grav/Common/Page/Medium/ThumbnailImageMedium.php +++ b/system/src/Grav/Common/Page/Medium/ThumbnailImageMedium.php @@ -11,14 +11,10 @@ namespace Grav\Common\Page\Medium; class ThumbnailImageMedium extends ImageMedium { - /** - * @var Medium|null - */ + /** @var Medium|null */ public $parent; - /** - * @var bool - */ + /** @var bool */ public $linked = false; /** diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index de690e86a..5f46d357a 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -37,74 +37,113 @@ class Page implements PageInterface use PageFormTrait; use MediaTrait; - /** - * @var string Filename. Leave as null if page is folder. - */ + /** @var string|null Filename. Leave as null if page is folder. */ protected $name; + /** @var string */ protected $folder; + /** @var string */ protected $path; + /** @var string */ protected $extension; + /** @var string */ protected $url_extension; - + /** @var string */ protected $id; + /** @var string */ protected $parent; + /** @var string */ protected $template; + /** @var int */ protected $expires; + /** @var string */ protected $cache_control; + /** @var bool */ protected $visible; + /** @var bool */ protected $published; + /** @var int */ protected $publish_date; + /** @var int|null */ protected $unpublish_date; + /** @var string */ protected $slug; + /** @var string */ protected $route; + /** @var string */ protected $raw_route; + /** @var string */ protected $url; + /** @var array */ protected $routes; + /** @var bool */ protected $routable; + /** @var int */ protected $modified; + /** @var string */ protected $redirect; + /** @var string */ protected $external_url; protected $items; /** @var object|null */ protected $header; + /** @var string */ protected $frontmatter; + /** @var string */ protected $language; + /** @var string */ protected $content; + /** @var array */ protected $content_meta; - protected $summary; + /** @var string */ + protected $summry; + /** @var string */ protected $raw_content; protected $pagination; protected $metadata; + /** @var string */ protected $title; + /** @var int */ protected $max_count; + /** @var string */ protected $menu; + /** @var int */ protected $date; + /** @var string */ protected $dateformat; + /** @var array */ protected $taxonomy; + /** @var string */ protected $order_by; + /** @var string */ protected $order_dir; + /** @var array */ protected $order_manual; protected $modular; protected $modular_twig; + /** @var array */ protected $process; + /** @var int */ protected $summary_size; + /** @var bool */ protected $markdown_extra; + /** @var bool */ protected $etag; + /** @var bool */ protected $last_modified; + /** @var string */ protected $home_route; + /** @var bool */ protected $hide_home_route; + /** @var bool */ protected $ssl; + /** @var string */ protected $template_format; + /** @var bool */ protected $debugger; - /** - * @var PageInterface|null Unmodified (original) version of the page. Used for copying and moving the page. - */ + /** @var PageInterface|null Unmodified (original) version of the page. Used for copying and moving the page. */ private $_original; - - /** - * @var string Action - */ + /** @var string Action */ private $_action; /** diff --git a/system/src/Grav/Common/Page/Traits/PageFormTrait.php b/system/src/Grav/Common/Page/Traits/PageFormTrait.php index ee31817c5..02f8d4fe5 100644 --- a/system/src/Grav/Common/Page/Traits/PageFormTrait.php +++ b/system/src/Grav/Common/Page/Traits/PageFormTrait.php @@ -7,6 +7,7 @@ use RocketTheme\Toolbox\Event\Event; trait PageFormTrait { + /** @var array|null */ private $_forms; /** diff --git a/system/src/Grav/Common/Page/Types.php b/system/src/Grav/Common/Page/Types.php index 03e3f6eb0..3dd185b67 100644 --- a/system/src/Grav/Common/Page/Types.php +++ b/system/src/Grav/Common/Page/Types.php @@ -22,7 +22,9 @@ class Types implements \ArrayAccess, \Iterator, \Countable { use ArrayAccess, Constructor, Iterator, Countable, Export; + /** @var array */ protected $items; + /** @var array */ protected $systemBlueprints; public function register($type, $blueprint = null) diff --git a/system/src/Grav/Common/Plugin.php b/system/src/Grav/Common/Plugin.php index 71879a72e..f891abab0 100644 --- a/system/src/Grav/Common/Plugin.php +++ b/system/src/Grav/Common/Plugin.php @@ -19,27 +19,22 @@ use Symfony\Component\EventDispatcher\EventDispatcher; class Plugin implements EventSubscriberInterface, \ArrayAccess { - /** - * @var string - */ + /** @var string */ public $name; - /** - * @var array - */ + /** @var array */ public $features = []; - /** - * @var Grav - */ + /** @var Grav */ protected $grav; - /** - * @var Config - */ + /** @var Config */ protected $config; + /** @var bool */ protected $active = true; + + /** @var Blueprint */ protected $blueprint; /** diff --git a/system/src/Grav/Common/Plugins.php b/system/src/Grav/Common/Plugins.php index 1b814c13c..dba5b7f5e 100644 --- a/system/src/Grav/Common/Plugins.php +++ b/system/src/Grav/Common/Plugins.php @@ -18,6 +18,7 @@ use Symfony\Component\EventDispatcher\EventDispatcher; class Plugins extends Iterator { + /** @var array */ public $formFieldTypes; public function __construct() diff --git a/system/src/Grav/Common/Processors/AssetsProcessor.php b/system/src/Grav/Common/Processors/AssetsProcessor.php index 5de4cb7d7..3e3e01cd7 100644 --- a/system/src/Grav/Common/Processors/AssetsProcessor.php +++ b/system/src/Grav/Common/Processors/AssetsProcessor.php @@ -15,7 +15,9 @@ use Psr\Http\Server\RequestHandlerInterface; class AssetsProcessor extends ProcessorBase { + /** @var string */ public $id = '_assets'; + /** @var string */ public $title = 'Assets'; public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface diff --git a/system/src/Grav/Common/Processors/BackupsProcessor.php b/system/src/Grav/Common/Processors/BackupsProcessor.php index 29418b204..24114a0c7 100644 --- a/system/src/Grav/Common/Processors/BackupsProcessor.php +++ b/system/src/Grav/Common/Processors/BackupsProcessor.php @@ -15,7 +15,9 @@ use Psr\Http\Server\RequestHandlerInterface; class BackupsProcessor extends ProcessorBase { + /** @var string */ public $id = '_backups'; + /** @var string */ public $title = 'Backups'; public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface diff --git a/system/src/Grav/Common/Processors/DebuggerAssetsProcessor.php b/system/src/Grav/Common/Processors/DebuggerAssetsProcessor.php index 3f6ad33fd..482d9e3d1 100644 --- a/system/src/Grav/Common/Processors/DebuggerAssetsProcessor.php +++ b/system/src/Grav/Common/Processors/DebuggerAssetsProcessor.php @@ -9,14 +9,15 @@ namespace Grav\Common\Processors; -use Grav\Framework\Psr7\Response; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Server\RequestHandlerInterface; class DebuggerAssetsProcessor extends ProcessorBase { + /** @var string */ public $id = 'debugger_assets'; + /** @var string */ public $title = 'Debugger Assets'; public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface diff --git a/system/src/Grav/Common/Processors/InitializeProcessor.php b/system/src/Grav/Common/Processors/InitializeProcessor.php index 3776efc3b..73ba78081 100644 --- a/system/src/Grav/Common/Processors/InitializeProcessor.php +++ b/system/src/Grav/Common/Processors/InitializeProcessor.php @@ -24,7 +24,9 @@ use Psr\Http\Server\RequestHandlerInterface; class InitializeProcessor extends ProcessorBase { + /** @var string */ public $id = '_init'; + /** @var string */ public $title = 'Initialize'; public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface diff --git a/system/src/Grav/Common/Processors/PagesProcessor.php b/system/src/Grav/Common/Processors/PagesProcessor.php index aec1602f6..7697aa5fa 100644 --- a/system/src/Grav/Common/Processors/PagesProcessor.php +++ b/system/src/Grav/Common/Processors/PagesProcessor.php @@ -17,7 +17,9 @@ use Psr\Http\Server\RequestHandlerInterface; class PagesProcessor extends ProcessorBase { + /** @var string */ public $id = 'pages'; + /** @var string */ public $title = 'Pages'; public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface diff --git a/system/src/Grav/Common/Processors/PluginsProcessor.php b/system/src/Grav/Common/Processors/PluginsProcessor.php index 046c29791..1689d2a72 100644 --- a/system/src/Grav/Common/Processors/PluginsProcessor.php +++ b/system/src/Grav/Common/Processors/PluginsProcessor.php @@ -15,7 +15,9 @@ use Psr\Http\Server\RequestHandlerInterface; class PluginsProcessor extends ProcessorBase { + /** @var string */ public $id = 'plugins'; + /** @var string */ public $title = 'Plugins'; public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface diff --git a/system/src/Grav/Common/Processors/ProcessorBase.php b/system/src/Grav/Common/Processors/ProcessorBase.php index fe015f4e4..42254fc2f 100644 --- a/system/src/Grav/Common/Processors/ProcessorBase.php +++ b/system/src/Grav/Common/Processors/ProcessorBase.php @@ -17,7 +17,9 @@ abstract class ProcessorBase implements ProcessorInterface /** @var Grav */ protected $container; + /** @var string */ public $id = 'processorbase'; + /** @var string */ public $title = 'ProcessorBase'; public function __construct(Grav $container) diff --git a/system/src/Grav/Common/Processors/RenderProcessor.php b/system/src/Grav/Common/Processors/RenderProcessor.php index 334a4de3b..2b0c907bc 100644 --- a/system/src/Grav/Common/Processors/RenderProcessor.php +++ b/system/src/Grav/Common/Processors/RenderProcessor.php @@ -17,7 +17,9 @@ use Psr\Http\Server\RequestHandlerInterface; class RenderProcessor extends ProcessorBase { + /** @var string */ public $id = 'render'; + /** @var string */ public $title = 'Render'; public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface diff --git a/system/src/Grav/Common/Processors/RequestProcessor.php b/system/src/Grav/Common/Processors/RequestProcessor.php index 0e164170a..775e57f33 100644 --- a/system/src/Grav/Common/Processors/RequestProcessor.php +++ b/system/src/Grav/Common/Processors/RequestProcessor.php @@ -17,7 +17,9 @@ use Psr\Http\Server\RequestHandlerInterface; class RequestProcessor extends ProcessorBase { + /** @var string */ public $id = 'request'; + /** @var string */ public $title = 'Request'; public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface diff --git a/system/src/Grav/Common/Processors/SchedulerProcessor.php b/system/src/Grav/Common/Processors/SchedulerProcessor.php index fb57f982a..e9a15e606 100644 --- a/system/src/Grav/Common/Processors/SchedulerProcessor.php +++ b/system/src/Grav/Common/Processors/SchedulerProcessor.php @@ -16,7 +16,9 @@ use Psr\Http\Server\RequestHandlerInterface; class SchedulerProcessor extends ProcessorBase { + /** @var string */ public $id = '_scheduler'; + /** @var string */ public $title = 'Scheduler'; public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface diff --git a/system/src/Grav/Common/Processors/TasksProcessor.php b/system/src/Grav/Common/Processors/TasksProcessor.php index 9c3e3c54a..75797400a 100644 --- a/system/src/Grav/Common/Processors/TasksProcessor.php +++ b/system/src/Grav/Common/Processors/TasksProcessor.php @@ -16,7 +16,9 @@ use Psr\Http\Server\RequestHandlerInterface; class TasksProcessor extends ProcessorBase { + /** @var string */ public $id = 'tasks'; + /** @var string */ public $title = 'Tasks'; public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface diff --git a/system/src/Grav/Common/Processors/ThemesProcessor.php b/system/src/Grav/Common/Processors/ThemesProcessor.php index da523dd05..f31396b56 100644 --- a/system/src/Grav/Common/Processors/ThemesProcessor.php +++ b/system/src/Grav/Common/Processors/ThemesProcessor.php @@ -15,7 +15,9 @@ use Psr\Http\Server\RequestHandlerInterface; class ThemesProcessor extends ProcessorBase { + /** @var string */ public $id = 'themes'; + /** @var string */ public $title = 'Themes'; public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface diff --git a/system/src/Grav/Common/Processors/TwigProcessor.php b/system/src/Grav/Common/Processors/TwigProcessor.php index 9cf7e4eaf..50c1668b3 100644 --- a/system/src/Grav/Common/Processors/TwigProcessor.php +++ b/system/src/Grav/Common/Processors/TwigProcessor.php @@ -15,7 +15,9 @@ use Psr\Http\Server\RequestHandlerInterface; class TwigProcessor extends ProcessorBase { + /** @var string */ public $id = 'twig'; + /** @var string */ public $title = 'Twig'; public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface diff --git a/system/src/Grav/Common/Scheduler/Job.php b/system/src/Grav/Common/Scheduler/Job.php index 70b1990e5..0574afacc 100644 --- a/system/src/Grav/Common/Scheduler/Job.php +++ b/system/src/Grav/Common/Scheduler/Job.php @@ -17,29 +17,51 @@ class Job { use IntervalTrait; + /** @var string */ private $id; - private $enabled = true; + /** @var bool */ + private $enabled; + /** @var callable|string */ private $command; + /** @var string */ private $at; + /** @var array */ private $args = []; + /** @var bool */ private $runInBackground = true; + /** @var \DateTime */ private $creationTime; + /** @var CronExpression */ private $executionTime; + /** @var string */ private $tempDir; + /** @var string */ private $lockFile; + /** @var bool */ private $truthTest = true; + /** @var string */ private $output; + /** @var int */ private $returnCode = 0; + /** @var array */ private $outputTo = []; + /** @var array */ private $emailTo = []; + /** @var array */ private $emailConfig = []; + /** @var callable|null */ private $before; + /** @var callable|null */ private $after; + /** @var callable */ private $whenOverlapping; + /** @var string */ private $outputMode; /** @var Process|null $process */ private $process; + /** @var bool */ private $successful = false; + /** @var string|null */ private $backlink; /** diff --git a/system/src/Grav/Common/Scheduler/Scheduler.php b/system/src/Grav/Common/Scheduler/Scheduler.php index 5b214face..f5555c019 100644 --- a/system/src/Grav/Common/Scheduler/Scheduler.php +++ b/system/src/Grav/Common/Scheduler/Scheduler.php @@ -18,11 +18,7 @@ use RocketTheme\Toolbox\File\YamlFile; class Scheduler { - /** - * The queued jobs. - * - * @var Job[] - */ + /** @var Job[] The queued jobs. */ private $jobs = []; /** @var Job[] */ @@ -36,8 +32,14 @@ class Scheduler /** @var Job[] */ private $jobs_run = []; + + /** @var array */ private $output_schedule = []; + + /** @var array */ private $config; + + /** @var string */ private $status_path; /** diff --git a/system/src/Grav/Common/Taxonomy.php b/system/src/Grav/Common/Taxonomy.php index 84ac2680b..6ffe695b9 100644 --- a/system/src/Grav/Common/Taxonomy.php +++ b/system/src/Grav/Common/Taxonomy.php @@ -32,7 +32,9 @@ use Grav\Common\Page\Interfaces\PageInterface; */ class Taxonomy { + /** @var array */ protected $taxonomy_map; + /** @var Grav */ protected $grav; /** diff --git a/system/src/Grav/Common/Themes.php b/system/src/Grav/Common/Themes.php index c37f17002..75aa58872 100644 --- a/system/src/Grav/Common/Themes.php +++ b/system/src/Grav/Common/Themes.php @@ -26,6 +26,7 @@ class Themes extends Iterator /** @var Config */ protected $config; + /** @var bool */ protected $inited = false; /** diff --git a/system/src/Grav/Common/Twig/Node/TwigNodeRender.php b/system/src/Grav/Common/Twig/Node/TwigNodeRender.php index d380cef2e..5d601ba81 100644 --- a/system/src/Grav/Common/Twig/Node/TwigNodeRender.php +++ b/system/src/Grav/Common/Twig/Node/TwigNodeRender.php @@ -16,6 +16,7 @@ use Twig\Node\NodeCaptureInterface; class TwigNodeRender extends Node implements NodeCaptureInterface { + /** @var string */ protected $tagName = 'render'; /** diff --git a/system/src/Grav/Common/Twig/Node/TwigNodeScript.php b/system/src/Grav/Common/Twig/Node/TwigNodeScript.php index 6285020a9..256f475fe 100644 --- a/system/src/Grav/Common/Twig/Node/TwigNodeScript.php +++ b/system/src/Grav/Common/Twig/Node/TwigNodeScript.php @@ -16,6 +16,7 @@ use Twig\Node\NodeCaptureInterface; class TwigNodeScript extends Node implements NodeCaptureInterface { + /** @var string */ protected $tagName = 'script'; /** diff --git a/system/src/Grav/Common/Twig/Node/TwigNodeStyle.php b/system/src/Grav/Common/Twig/Node/TwigNodeStyle.php index 39a351c0f..5faa547cd 100644 --- a/system/src/Grav/Common/Twig/Node/TwigNodeStyle.php +++ b/system/src/Grav/Common/Twig/Node/TwigNodeStyle.php @@ -16,6 +16,7 @@ use Twig\Node\NodeCaptureInterface; class TwigNodeStyle extends Node implements NodeCaptureInterface { + /** @var string */ protected $tagName = 'style'; /** diff --git a/system/src/Grav/Common/Twig/Twig.php b/system/src/Grav/Common/Twig/Twig.php index 301c5c414..1981f0801 100644 --- a/system/src/Grav/Common/Twig/Twig.php +++ b/system/src/Grav/Common/Twig/Twig.php @@ -23,54 +23,43 @@ use Twig\Environment; use Twig\Error\LoaderError; use Twig\Extension\CoreExtension; use Twig\Extension\DebugExtension; +use Twig\Extension\ProfilerExtension; use Twig\Extension\StringLoaderExtension; use Twig\Loader\ArrayLoader; use Twig\Loader\ChainLoader; use Twig\Loader\ExistsLoaderInterface; use Twig\Loader\FilesystemLoader; +use Twig\Profiler\Profile; use Twig\TwigFilter; use Twig\TwigFunction; class Twig { - /** - * @var Environment - */ + /** @var Environment */ public $twig; - /** - * @var array - */ + /** @var array */ public $twig_vars = []; - /** - * @var array - */ + /** @var array */ public $twig_paths; - /** - * @var string - */ + /** @var string */ public $template; - /** - * @var Grav - */ + /** @var Grav */ protected $grav; - /** - * @var FilesystemLoader - */ + /** @var FilesystemLoader */ protected $loader; - /** - * @var ArrayLoader - */ + /** @var ArrayLoader */ protected $loaderArray; - + /** @var bool */ protected $autoescape; + /** @var Profile */ protected $profile; /** diff --git a/system/src/Grav/Common/Twig/TwigClockworkDataSource.php b/system/src/Grav/Common/Twig/TwigClockworkDataSource.php index dc8397b36..8208afd57 100644 --- a/system/src/Grav/Common/Twig/TwigClockworkDataSource.php +++ b/system/src/Grav/Common/Twig/TwigClockworkDataSource.php @@ -16,9 +16,7 @@ use Grav\Common\Grav; class TwigClockworkDataSource extends DataSource { - /** - * Views data structure - */ + /** @var Timeline Views data structure */ protected $views; protected $root; diff --git a/system/src/Grav/Common/Twig/TwigProfileProcessor.php b/system/src/Grav/Common/Twig/TwigProfileProcessor.php index 96709fc07..110663195 100644 --- a/system/src/Grav/Common/Twig/TwigProfileProcessor.php +++ b/system/src/Grav/Common/Twig/TwigProfileProcessor.php @@ -15,6 +15,7 @@ use Clockwork\Request\Timeline; class TwigProfileProcessor { + /** @var float */ private $root; public function process(Profile $profile, Timeline $views, $counter = 0, $prefix = '', $sibling = false) diff --git a/system/src/Grav/Common/Twig/WriteCacheFileTrait.php b/system/src/Grav/Common/Twig/WriteCacheFileTrait.php index f87ff671e..40ac9a221 100644 --- a/system/src/Grav/Common/Twig/WriteCacheFileTrait.php +++ b/system/src/Grav/Common/Twig/WriteCacheFileTrait.php @@ -14,6 +14,7 @@ use Grav\Common\Grav; trait WriteCacheFileTrait { + /** @var bool */ protected static $umask; /** diff --git a/system/src/Grav/Common/Uri.php b/system/src/Grav/Common/Uri.php index b6a1893ae..d93edce31 100644 --- a/system/src/Grav/Common/Uri.php +++ b/system/src/Grav/Common/Uri.php @@ -28,31 +28,51 @@ class Uri /** @var \Grav\Framework\Route\Route|null */ protected static $currentRoute; + /** @var string */ public $url; // Uri parts. + /** @var string|null */ protected $scheme; + /** @var string|null */ protected $user; + /** @var string|null */ protected $password; + /** @var string|null */ protected $host; + /** @var int|null */ protected $port; + /** @var string */ protected $path; + /** @var string */ protected $query; + /** @var string|null */ protected $fragment; // Internal stuff. + /** @var string */ protected $base; + /** @var string|null */ protected $basename; + /** @var string */ protected $content_path; + /** @var string|null */ protected $extension; + /** @var string */ protected $env; + /** @var array */ protected $paths; + /** @var array */ protected $queries; + /** @var array */ protected $params; + /** @var string */ protected $root; + /** @var string */ protected $root_path; + /** @var string */ protected $uri; - protected $content_type; + /** @var array */ protected $post; /** @@ -350,7 +370,7 @@ class Uri /** * Return the Path * - * @return String The path of the URI + * @return string The path of the URI */ public function path() { @@ -1398,6 +1418,9 @@ class Uri return $rootPath; } + /** + * @return string + */ private function buildEnvironment() { // check for localhost variations diff --git a/system/src/Grav/Common/User/Access.php b/system/src/Grav/Common/User/Access.php index 44597fee6..2327f5ebf 100644 --- a/system/src/Grav/Common/User/Access.php +++ b/system/src/Grav/Common/User/Access.php @@ -13,6 +13,7 @@ use Grav\Common\Utils; class Access implements \JsonSerializable, \IteratorAggregate, \Countable { + /** @var array */ private $acl; public function __construct(array $acl = null) diff --git a/system/src/Grav/Common/User/DataUser/User.php b/system/src/Grav/Common/User/DataUser/User.php index fb822cf28..2953bd932 100644 --- a/system/src/Grav/Common/User/DataUser/User.php +++ b/system/src/Grav/Common/User/DataUser/User.php @@ -14,6 +14,7 @@ use Grav\Common\Data\Blueprints; use Grav\Common\Data\Data; use Grav\Common\File\CompiledYamlFile; use Grav\Common\Grav; +use Grav\Common\Media\Interfaces\MediaCollectionInterface; use Grav\Common\Page\Media; use Grav\Common\Page\Medium\Medium; use Grav\Common\Page\Medium\MediumFactory; @@ -25,6 +26,7 @@ class User extends Data implements UserInterface { use UserTrait; + /** @var MediaCollectionInterface */ protected $_media; /** diff --git a/system/src/Grav/Common/Utils.php b/system/src/Grav/Common/Utils.php index 0df0391aa..2d9a692e9 100644 --- a/system/src/Grav/Common/Utils.php +++ b/system/src/Grav/Common/Utils.php @@ -21,6 +21,7 @@ use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator; abstract class Utils { + /** @var array */ protected static $nonces = []; protected const ROOTURL_REGEX = '{^((?:http[s]?:\/\/[^\/]+)|(?:\/\/[^\/]+))(.*)}'; diff --git a/system/src/Grav/Console/Cli/PageSystemValidatorCommand.php b/system/src/Grav/Console/Cli/PageSystemValidatorCommand.php index 5bd0ef1b2..86912bdd1 100644 --- a/system/src/Grav/Console/Cli/PageSystemValidatorCommand.php +++ b/system/src/Grav/Console/Cli/PageSystemValidatorCommand.php @@ -20,6 +20,7 @@ use Symfony\Component\Console\Input\InputOption; class PageSystemValidatorCommand extends ConsoleCommand { + /** @var array */ protected $tests = [ // Content 'header' => [[]], diff --git a/system/src/Grav/Console/Cli/SandboxCommand.php b/system/src/Grav/Console/Cli/SandboxCommand.php index 8e7e5c157..91551a11b 100644 --- a/system/src/Grav/Console/Cli/SandboxCommand.php +++ b/system/src/Grav/Console/Cli/SandboxCommand.php @@ -60,6 +60,7 @@ class SandboxCommand extends ConsoleCommand protected $default_file = "---\ntitle: HomePage\n---\n# HomePage\n\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque porttitor eu felis sed ornare. Sed a mauris venenatis, pulvinar velit vel, dictum enim. Phasellus ac rutrum velit. Nunc lorem purus, hendrerit sit amet augue aliquet, iaculis ultricies nisl. Suspendisse tincidunt euismod risus, quis feugiat arcu tincidunt eget. Nulla eros mi, commodo vel ipsum vel, aliquet congue odio. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Pellentesque velit orci, laoreet at adipiscing eu, interdum quis nibh. Nunc a accumsan purus."; protected $source; + /** @var string */ protected $destination; protected function configure() diff --git a/system/src/Grav/Console/Cli/ServerCommand.php b/system/src/Grav/Console/Cli/ServerCommand.php index 99e1fb826..eccb4b8ac 100644 --- a/system/src/Grav/Console/Cli/ServerCommand.php +++ b/system/src/Grav/Console/Cli/ServerCommand.php @@ -31,6 +31,7 @@ class ServerCommand extends ConsoleCommand protected $ip; /** @var int */ protected $port; + /** @var SymfonyStyle */ protected $io; protected function configure() diff --git a/system/src/Grav/Console/ConsoleTrait.php b/system/src/Grav/Console/ConsoleTrait.php index 190109517..b44f7a8c9 100644 --- a/system/src/Grav/Console/ConsoleTrait.php +++ b/system/src/Grav/Console/ConsoleTrait.php @@ -22,6 +22,7 @@ use Symfony\Component\Console\Output\OutputInterface; trait ConsoleTrait { + /** @var string */ protected $argv; /* @var InputInterface $output */ diff --git a/system/src/Grav/Console/Gpm/InfoCommand.php b/system/src/Grav/Console/Gpm/InfoCommand.php index 1abe84852..5a7671e6c 100644 --- a/system/src/Grav/Console/Gpm/InfoCommand.php +++ b/system/src/Grav/Console/Gpm/InfoCommand.php @@ -26,9 +26,6 @@ class InfoCommand extends ConsoleCommand /** @var string */ protected $all_yes; - /** - * - */ protected function configure() { $this diff --git a/system/src/Grav/Console/Gpm/SelfupgradeCommand.php b/system/src/Grav/Console/Gpm/SelfupgradeCommand.php index b37b3df34..3d3f5789f 100644 --- a/system/src/Grav/Console/Gpm/SelfupgradeCommand.php +++ b/system/src/Grav/Console/Gpm/SelfupgradeCommand.php @@ -38,11 +38,13 @@ class SelfupgradeCommand extends ConsoleCommand /** @var string */ private $tmp; + /** @var Upgrader */ private $upgrader; /** @var string */ protected $all_yes; + /** @var string */ protected $overwrite; protected function configure() diff --git a/system/src/Grav/Console/Gpm/UpdateCommand.php b/system/src/Grav/Console/Gpm/UpdateCommand.php index 074cd8e58..dba38e2ed 100644 --- a/system/src/Grav/Console/Gpm/UpdateCommand.php +++ b/system/src/Grav/Console/Gpm/UpdateCommand.php @@ -42,6 +42,7 @@ class UpdateCommand extends ConsoleCommand /** @var string */ protected $all_yes; + /** @var string */ protected $overwrite; /** @var Upgrader */ diff --git a/system/src/Grav/Framework/Cache/Adapter/ChainCache.php b/system/src/Grav/Framework/Cache/Adapter/ChainCache.php index b530b3e89..ede81c8dc 100644 --- a/system/src/Grav/Framework/Cache/Adapter/ChainCache.php +++ b/system/src/Grav/Framework/Cache/Adapter/ChainCache.php @@ -20,14 +20,10 @@ use Grav\Framework\Cache\Exception\InvalidArgumentException; */ class ChainCache extends AbstractCache { - /** - * @var CacheInterface[] - */ + /** @var CacheInterface[] */ protected $caches; - /** - * @var int - */ + /** @var int */ protected $count; /** diff --git a/system/src/Grav/Framework/Cache/Adapter/DoctrineCache.php b/system/src/Grav/Framework/Cache/Adapter/DoctrineCache.php index 45c9d07a8..2eba498e7 100644 --- a/system/src/Grav/Framework/Cache/Adapter/DoctrineCache.php +++ b/system/src/Grav/Framework/Cache/Adapter/DoctrineCache.php @@ -19,9 +19,7 @@ use Grav\Framework\Cache\Exception\InvalidArgumentException; */ class DoctrineCache extends AbstractCache { - /** - * @var CacheProvider - */ + /** @var CacheProvider */ protected $driver; /** diff --git a/system/src/Grav/Framework/Cache/Adapter/FileCache.php b/system/src/Grav/Framework/Cache/Adapter/FileCache.php index 3d3a2ec1d..526ace6cc 100644 --- a/system/src/Grav/Framework/Cache/Adapter/FileCache.php +++ b/system/src/Grav/Framework/Cache/Adapter/FileCache.php @@ -22,7 +22,9 @@ use Grav\Framework\Cache\Exception\InvalidArgumentException; */ class FileCache extends AbstractCache { + /** @var string */ private $directory; + /** @var string|null */ private $tmp; /** diff --git a/system/src/Grav/Framework/Cache/Adapter/MemoryCache.php b/system/src/Grav/Framework/Cache/Adapter/MemoryCache.php index 2d0fe40bd..56e4e77a6 100644 --- a/system/src/Grav/Framework/Cache/Adapter/MemoryCache.php +++ b/system/src/Grav/Framework/Cache/Adapter/MemoryCache.php @@ -20,9 +20,7 @@ use Grav\Framework\Cache\AbstractCache; */ class MemoryCache extends AbstractCache { - /** - * @var array - */ + /** @var array */ protected $cache = []; public function doGet($key, $miss) diff --git a/system/src/Grav/Framework/Collection/AbstractFileCollection.php b/system/src/Grav/Framework/Collection/AbstractFileCollection.php index 3379e3687..819ad98d0 100644 --- a/system/src/Grav/Framework/Collection/AbstractFileCollection.php +++ b/system/src/Grav/Framework/Collection/AbstractFileCollection.php @@ -22,34 +22,22 @@ use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator; */ class AbstractFileCollection extends AbstractLazyCollection implements FileCollectionInterface { - /** - * @var string - */ + /** @var string */ protected $path; - /** - * @var \RecursiveDirectoryIterator|RecursiveUniformResourceIterator - */ + /** @var \RecursiveDirectoryIterator|RecursiveUniformResourceIterator */ protected $iterator; - /** - * @var callable - */ + /** @var callable */ protected $createObjectFunction; - /** - * @var callable|null - */ + /** @var callable|null */ protected $filterFunction; - /** - * @var int - */ + /** @var int */ protected $flags; - /** - * @var int - */ + /** @var int */ protected $nestingLimit; /** diff --git a/system/src/Grav/Framework/Collection/AbstractLazyCollection.php b/system/src/Grav/Framework/Collection/AbstractLazyCollection.php index 250ce8977..1e8067ef9 100644 --- a/system/src/Grav/Framework/Collection/AbstractLazyCollection.php +++ b/system/src/Grav/Framework/Collection/AbstractLazyCollection.php @@ -18,11 +18,7 @@ use Doctrine\Common\Collections\AbstractLazyCollection as BaseAbstractLazyCollec */ abstract class AbstractLazyCollection extends BaseAbstractLazyCollection implements CollectionInterface { - /** - * The backed collection to use - * - * @var ArrayCollection - */ + /** @var ArrayCollection The backed collection to use */ protected $collection; /** diff --git a/system/src/Grav/Framework/ContentBlock/ContentBlock.php b/system/src/Grav/Framework/ContentBlock/ContentBlock.php index ab63bb1d1..f933c68fb 100644 --- a/system/src/Grav/Framework/ContentBlock/ContentBlock.php +++ b/system/src/Grav/Framework/ContentBlock/ContentBlock.php @@ -23,12 +23,19 @@ namespace Grav\Framework\ContentBlock; */ class ContentBlock implements ContentBlockInterface { + /** @var int */ protected $version = 1; + /** @var string */ protected $id; + /** @var string */ protected $tokenTemplate = '@@BLOCK-%s@@'; + /** @var string */ protected $content = ''; + /** @var array */ protected $blocks = []; + /** @var string */ protected $checksum; + /** @var bool */ protected $cached = true; /** diff --git a/system/src/Grav/Framework/ContentBlock/HtmlBlock.php b/system/src/Grav/Framework/ContentBlock/HtmlBlock.php index 8cefd4f9a..a1a1a9801 100644 --- a/system/src/Grav/Framework/ContentBlock/HtmlBlock.php +++ b/system/src/Grav/Framework/ContentBlock/HtmlBlock.php @@ -16,10 +16,15 @@ namespace Grav\Framework\ContentBlock; */ class HtmlBlock extends ContentBlock implements HtmlBlockInterface { + /** @var int */ protected $version = 1; + /** @var array */ protected $frameworks = []; + /** @var array */ protected $styles = []; + /** @var array */ protected $scripts = []; + /** @var array */ protected $html = []; /** diff --git a/system/src/Grav/Framework/Flex/FlexFormFlash.php b/system/src/Grav/Framework/Flex/FlexFormFlash.php index 819977078..bd092f283 100644 --- a/system/src/Grav/Framework/Flex/FlexFormFlash.php +++ b/system/src/Grav/Framework/Flex/FlexFormFlash.php @@ -14,9 +14,7 @@ use Grav\Framework\Form\FormFlash; class FlexFormFlash extends FormFlash { - /** - * @var FlexObjectInterface - */ + /** @var FlexObjectInterface */ protected $object; public function setObject(FlexObjectInterface $object) diff --git a/system/src/Grav/Framework/Flex/Pages/Traits/PageContentTrait.php b/system/src/Grav/Framework/Flex/Pages/Traits/PageContentTrait.php index 6e144a124..b8052dcb6 100644 --- a/system/src/Grav/Framework/Flex/Pages/Traits/PageContentTrait.php +++ b/system/src/Grav/Framework/Flex/Pages/Traits/PageContentTrait.php @@ -27,6 +27,7 @@ use RocketTheme\Toolbox\Event\Event; */ trait PageContentTrait { + /** @var array */ protected static $headerProperties = [ 'slug' => 'slug', 'routes' => false, @@ -59,6 +60,7 @@ trait PageContentTrait 'debugger' => false, ]; + /** @var array */ protected static $calculatedProperties = [ 'name' => 'name', 'parent' => 'parent', diff --git a/system/src/Grav/Framework/Flex/Pages/Traits/PageLegacyTrait.php b/system/src/Grav/Framework/Flex/Pages/Traits/PageLegacyTrait.php index 39408e852..c49141ead 100644 --- a/system/src/Grav/Framework/Flex/Pages/Traits/PageLegacyTrait.php +++ b/system/src/Grav/Framework/Flex/Pages/Traits/PageLegacyTrait.php @@ -32,7 +32,9 @@ use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator; */ trait PageLegacyTrait { + /** @var array|null */ private $_content_meta; + /** @var array|null */ private $_metadata; /** diff --git a/system/src/Grav/Framework/Flex/Traits/FlexAuthorizeTrait.php b/system/src/Grav/Framework/Flex/Traits/FlexAuthorizeTrait.php index 89ef29267..b65172f2f 100644 --- a/system/src/Grav/Framework/Flex/Traits/FlexAuthorizeTrait.php +++ b/system/src/Grav/Framework/Flex/Traits/FlexAuthorizeTrait.php @@ -21,6 +21,7 @@ use Grav\Framework\Flex\Interfaces\FlexObjectInterface; */ trait FlexAuthorizeTrait { + /** @var string */ private $_authorize = '%s.flex-object.%s'; public function isAuthorized(string $action, string $scope = null, UserInterface $user = null): bool diff --git a/system/src/Grav/Framework/Flex/Traits/FlexMediaTrait.php b/system/src/Grav/Framework/Flex/Traits/FlexMediaTrait.php index 010b73976..57a71975d 100644 --- a/system/src/Grav/Framework/Flex/Traits/FlexMediaTrait.php +++ b/system/src/Grav/Framework/Flex/Traits/FlexMediaTrait.php @@ -34,6 +34,7 @@ trait FlexMediaTrait MediaTrait::getMedia as protected getExistingMedia; } + /** @var array */ protected $_uploads; public function __debugInfo() diff --git a/system/src/Grav/Framework/Object/Base/ObjectCollectionTrait.php b/system/src/Grav/Framework/Object/Base/ObjectCollectionTrait.php index 60a50bc93..0f776d30d 100644 --- a/system/src/Grav/Framework/Object/Base/ObjectCollectionTrait.php +++ b/system/src/Grav/Framework/Object/Base/ObjectCollectionTrait.php @@ -20,9 +20,7 @@ trait ObjectCollectionTrait /** @var string */ protected static $type; - /** - * @var string - */ + /** @var string */ private $_key; /** diff --git a/system/src/Grav/Framework/Object/Base/ObjectTrait.php b/system/src/Grav/Framework/Object/Base/ObjectTrait.php index 07e4f7917..b761ff806 100644 --- a/system/src/Grav/Framework/Object/Base/ObjectTrait.php +++ b/system/src/Grav/Framework/Object/Base/ObjectTrait.php @@ -19,9 +19,7 @@ trait ObjectTrait /** @var string */ protected static $type; - /** - * @var string - */ + /** @var string */ private $_key; /** diff --git a/system/src/Grav/Framework/Object/ObjectIndex.php b/system/src/Grav/Framework/Object/ObjectIndex.php index 1fcde29dd..d6c35ab50 100644 --- a/system/src/Grav/Framework/Object/ObjectIndex.php +++ b/system/src/Grav/Framework/Object/ObjectIndex.php @@ -26,9 +26,7 @@ abstract class ObjectIndex extends AbstractIndexCollection implements NestedObje /** @var string */ protected static $type; - /** - * @var string - */ + /** @var string */ private $_key; /** diff --git a/system/src/Grav/Framework/Object/Property/ArrayPropertyTrait.php b/system/src/Grav/Framework/Object/Property/ArrayPropertyTrait.php index 4932acf6a..574b74f8e 100644 --- a/system/src/Grav/Framework/Object/Property/ArrayPropertyTrait.php +++ b/system/src/Grav/Framework/Object/Property/ArrayPropertyTrait.php @@ -18,10 +18,7 @@ namespace Grav\Framework\Object\Property; */ trait ArrayPropertyTrait { - /** - * Properties of the object. - * @var array - */ + /** @var array Properties of the object. */ private $_elements; /** diff --git a/system/src/Grav/Framework/Object/Property/ObjectPropertyTrait.php b/system/src/Grav/Framework/Object/Property/ObjectPropertyTrait.php index a6ecfa760..dd52764d1 100644 --- a/system/src/Grav/Framework/Object/Property/ObjectPropertyTrait.php +++ b/system/src/Grav/Framework/Object/Property/ObjectPropertyTrait.php @@ -24,9 +24,7 @@ namespace Grav\Framework\Object\Property; */ trait ObjectPropertyTrait { - /** - * @var array - */ + /** @var array */ private $_definedProperties; /** diff --git a/system/src/Grav/Framework/Psr7/AbstractUri.php b/system/src/Grav/Framework/Psr7/AbstractUri.php index e0d46b660..0c7053730 100644 --- a/system/src/Grav/Framework/Psr7/AbstractUri.php +++ b/system/src/Grav/Framework/Psr7/AbstractUri.php @@ -20,6 +20,7 @@ use Psr\Http\Message\UriInterface; */ abstract class AbstractUri implements UriInterface { + /** @var array */ protected static $defaultPorts = [ 'http' => 80, 'https' => 443 diff --git a/system/src/Grav/Framework/Psr7/Response.php b/system/src/Grav/Framework/Psr7/Response.php index 0293fe089..62e1c4acd 100644 --- a/system/src/Grav/Framework/Psr7/Response.php +++ b/system/src/Grav/Framework/Psr7/Response.php @@ -24,9 +24,7 @@ class Response implements ResponseInterface { use ResponseDecoratorTrait; - /** - * @var string EOL characters used for HTTP response. - */ + /** @var string EOL characters used for HTTP response. */ private const EOL = "\r\n"; /** diff --git a/system/src/Grav/Framework/RequestHandler/Exception/InvalidArgumentException.php b/system/src/Grav/Framework/RequestHandler/Exception/InvalidArgumentException.php index 4cacd711d..f357a452a 100644 --- a/system/src/Grav/Framework/RequestHandler/Exception/InvalidArgumentException.php +++ b/system/src/Grav/Framework/RequestHandler/Exception/InvalidArgumentException.php @@ -15,9 +15,7 @@ use Throwable; class InvalidArgumentException extends \InvalidArgumentException { - /** - * @var mixed|null - */ + /** @var mixed|null */ private $invalidMiddleware; /** diff --git a/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php b/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php index 79358003d..2598950c0 100644 --- a/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php +++ b/system/src/Grav/Framework/RequestHandler/Traits/RequestHandlerTrait.php @@ -19,7 +19,7 @@ use Psr\Http\Server\MiddlewareInterface; trait RequestHandlerTrait { - /** @var array */ + /** @var array */ protected $middleware; /** @var callable */ diff --git a/system/src/Grav/Framework/Session/Exceptions/SessionException.php b/system/src/Grav/Framework/Session/Exceptions/SessionException.php index 4caab82f6..aeda0ecd9 100644 --- a/system/src/Grav/Framework/Session/Exceptions/SessionException.php +++ b/system/src/Grav/Framework/Session/Exceptions/SessionException.php @@ -6,9 +6,9 @@ * @copyright Copyright (C) 2015 - 2019 Trilby Media, LLC. All rights reserved. * @license MIT License; see LICENSE file for details. */ + namespace Grav\Framework\Session\Exceptions; class SessionException extends \RuntimeException { - } diff --git a/system/src/Grav/Framework/Session/Session.php b/system/src/Grav/Framework/Session/Session.php index 2ea64a739..1d11f7ccf 100644 --- a/system/src/Grav/Framework/Session/Session.php +++ b/system/src/Grav/Framework/Session/Session.php @@ -19,14 +19,10 @@ class Session implements SessionInterface { protected $options; - /** - * @var bool - */ + /** @var bool */ protected $started = false; - /** - * @var Session - */ + /** @var Session */ protected static $instance; /** diff --git a/system/src/Grav/Installer/Install.php b/system/src/Grav/Installer/Install.php index d2581dbaa..f6f867ebb 100644 --- a/system/src/Grav/Installer/Install.php +++ b/system/src/Grav/Installer/Install.php @@ -22,6 +22,7 @@ use Grav\Common\Plugins; */ class Install { + /** @var array */ private $requires = [ 'php' => [ 'name' => 'PHP', @@ -81,6 +82,7 @@ class Install ] ]; + /** @var array */ private $ignores = [ 'backup', 'cache', @@ -92,13 +94,18 @@ class Install 'robots.txt' ]; + /** @var array */ private $classMap = [ // 'Grav\\Installer\\Test' => __DIR__ . '/Test.php', ]; + /** @var string|null */ private $zip; + + /** @var string|null */ private $location; + /** @var static */ private static $instance; public static function instance()