Add a lot of missing docblocks (variables)

This commit is contained in:
Matias Griese
2019-11-18 10:53:21 +02:00
parent be3ecf1377
commit 1aa69e61ac
130 changed files with 432 additions and 391 deletions

View File

@@ -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
*/

View File

@@ -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();

View File

@@ -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;
/**

View File

@@ -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...

View File

@@ -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()
{

View File

@@ -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/

View File

@@ -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 = [

View File

@@ -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;
/**

View File

@@ -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)

View File

@@ -17,6 +17,7 @@ use Grav\Common\Utils;
class Config extends Data
{
/** @var string */
public $environment;
/** @var string */

View File

@@ -13,6 +13,7 @@ use Grav\Common\Filesystem\Folder;
class ConfigFileFinder
{
/** @var string */
protected $base = '';
/**

View File

@@ -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;

View File

@@ -32,6 +32,7 @@ class Setup extends Data
*/
public static $environment;
/** @var array */
protected $streams = [
'system' => [
'type' => 'ReadOnlyStream',

View File

@@ -32,6 +32,7 @@ class Blueprint extends BlueprintForm
/** @var array|null */
protected $defaults;
/** @var array */
protected $handlers = [];
public function __clone()

View File

@@ -18,6 +18,7 @@ class BlueprintSchema extends BlueprintSchemaBase implements ExportInterface
{
use Export;
/** @var array */
protected $ignoreFormKeys = [
'title' => true,
'help' => true,

View File

@@ -13,6 +13,7 @@ use Grav\Common\Grav;
class ValidationException extends \RuntimeException
{
/** @var array */
protected $messages = [];
public function setMessages(array $messages = [])

View File

@@ -62,6 +62,7 @@ class Debugger
/** @var bool */
protected $enabled = false;
/** @var bool */
protected $initialized = false;
/** @var array */

View File

@@ -13,7 +13,6 @@ use Whoops\Handler\Handler;
class BareHandler extends Handler
{
/**
* @return int|null
*/

View File

@@ -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()
{

View File

@@ -11,6 +11,7 @@ namespace Grav\Common\Errors;
class SystemFacade extends \Whoops\Util\SystemFacade
{
/** @var callable */
protected $whoopsShutdownHandler;
/**

View File

@@ -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)

View File

@@ -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;
/**

View File

@@ -13,6 +13,7 @@ use Grav\Common\Grav;
class RecursiveFolderFilterIterator extends \RecursiveFilterIterator
{
/** @var array */
protected static $ignore_folders;
/**

View File

@@ -33,6 +33,7 @@ use Grav\Framework\Flex\Pages\FlexPageCollection;
*/
class PageCollection extends FlexPageCollection implements PageCollectionInterface
{
/** @var array|null */
protected $_params;
/**

View File

@@ -32,6 +32,7 @@ class PageIndex extends FlexPageIndex
/** @var PageObject|array */
protected $_root;
/** @var array|null */
protected $_params;
/**

View File

@@ -50,6 +50,7 @@ class PageObject extends FlexPageObject
/** @var string File format, eg. 'md' */
protected $format;
/** @var bool */
private $_initialized = false;
/**

View File

@@ -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

View File

@@ -68,6 +68,7 @@ class UserObject extends FlexObject implements UserInterface, MediaManipulationI
use FlexAuthorizeTrait;
use UserTrait;
/** @var array|null */
protected $_uploads_original;
/** @var FileInterface|null */

View File

@@ -13,6 +13,7 @@ use Grav\Common\Iterator;
abstract class AbstractPackageCollection extends Iterator
{
/** @var string */
protected $type;
public function toJson()

View File

@@ -13,7 +13,8 @@ use Grav\Common\Iterator;
class CachedCollection extends Iterator
{
protected static $cache;
/** @var array */
protected static $cache = [];
public function __construct($items)
{

View File

@@ -16,9 +16,7 @@ use Grav\Common\Data\Data;
*/
class Package
{
/**
* @var Data
*/
/** @var Data */
protected $data;
public function __construct(Data $package, $type = null)

View File

@@ -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%',

View File

@@ -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,

View File

@@ -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()
{

View File

@@ -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()
{

View File

@@ -13,9 +13,7 @@ use Grav\Common\Grav;
class Plugins extends AbstractPackageCollection
{
/**
* @var string
*/
/** @var string */
protected $type = 'plugins';
/**

View File

@@ -13,9 +13,7 @@ use Grav\Common\Grav;
class Themes extends AbstractPackageCollection
{
/**
* @var string
*/
/** @var string */
protected $type = 'themes';
/**

View File

@@ -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;
/**

View File

@@ -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;
/**

View File

@@ -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';
/**

View File

@@ -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';
/**

View File

@@ -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' => [

View File

@@ -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;
/**

View File

@@ -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;
/**

View File

@@ -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 = [];
/**

View File

@@ -14,6 +14,7 @@ namespace Grav\Common;
*/
trait GravTrait
{
/** @var Grav */
protected static $grav;
/**

View File

@@ -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', ':', ';', '<', '=', '>', '?'

View File

@@ -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) {

View File

@@ -11,6 +11,7 @@ namespace Grav\Common\Helpers;
class LogViewer
{
/** @var string */
protected $pattern = '/\[(?P<date>.*)\] (?P<logger>\w+).(?P<level>\w+): (?P<message>.*[^ ]+) (?P<context>[^ ]+) (?P<extra>[^ ]+)/';
/**

View File

@@ -28,7 +28,6 @@ use DOMLettersIterator;
class Truncator
{
/**
* Safely truncates HTML by a given number of words.
* @param string $html Input HTML.

View File

@@ -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()

View File

@@ -20,9 +20,7 @@ class Iterator implements \ArrayAccess, \Iterator, \Countable, \Serializable
{
use Constructor, ArrayAccessWithGetters, ArrayIterator, Countable, Serializable, Export;
/**
* @var array
*/
/** @var array */
protected $items = [];
/**

View File

@@ -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;
/**

View File

@@ -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

View File

@@ -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
*

View File

@@ -18,7 +18,9 @@ use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
trait MediaTrait
{
/** @var MediaCollectionInterface|null */
protected $media;
/** @var bool */
protected $_loadMedia = true;
/**

View File

@@ -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;
/**

View File

@@ -18,6 +18,7 @@ class Header implements \ArrayAccess, ExportInterface, \JsonSerializable
{
use NestedArrayAccessWithGetters, Constructor, Export;
/** @var array */
protected $items;
public function jsonSerialize()

View File

@@ -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'];
/**

View File

@@ -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;
/**

View File

@@ -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';
/**

View File

@@ -13,10 +13,9 @@ class Link implements RenderableInterface
{
use ParsedownHtmlTrait;
/**
* @var array
*/
/** @var array */
protected $attributes = [];
/** @var Medium|null */
protected $source;
/**

View File

@@ -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;
/**

View File

@@ -14,9 +14,7 @@ use Grav\Common\Page\Markdown\Excerpts;
trait ParsedownHtmlTrait
{
/**
* @var \Grav\Common\Markdown\Parsedown|null
*/
/** @var Parsedown|null */
protected $parsedown;
/**

View File

@@ -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;
/**

View File

@@ -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;
/**

View File

@@ -7,6 +7,7 @@ use RocketTheme\Toolbox\Event\Event;
trait PageFormTrait
{
/** @var array|null */
private $_forms;
/**

View File

@@ -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)

View File

@@ -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;
/**

View File

@@ -18,6 +18,7 @@ use Symfony\Component\EventDispatcher\EventDispatcher;
class Plugins extends Iterator
{
/** @var array */
public $formFieldTypes;
public function __construct()

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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;
/**

View File

@@ -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;
/**

View File

@@ -32,7 +32,9 @@ use Grav\Common\Page\Interfaces\PageInterface;
*/
class Taxonomy
{
/** @var array */
protected $taxonomy_map;
/** @var Grav */
protected $grav;
/**

View File

@@ -26,6 +26,7 @@ class Themes extends Iterator
/** @var Config */
protected $config;
/** @var bool */
protected $inited = false;
/**

View File

@@ -16,6 +16,7 @@ use Twig\Node\NodeCaptureInterface;
class TwigNodeRender extends Node implements NodeCaptureInterface
{
/** @var string */
protected $tagName = 'render';
/**

View File

@@ -16,6 +16,7 @@ use Twig\Node\NodeCaptureInterface;
class TwigNodeScript extends Node implements NodeCaptureInterface
{
/** @var string */
protected $tagName = 'script';
/**

View File

@@ -16,6 +16,7 @@ use Twig\Node\NodeCaptureInterface;
class TwigNodeStyle extends Node implements NodeCaptureInterface
{
/** @var string */
protected $tagName = 'style';
/**

View File

@@ -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;
/**

View File

@@ -16,9 +16,7 @@ use Grav\Common\Grav;
class TwigClockworkDataSource extends DataSource
{
/**
* Views data structure
*/
/** @var Timeline Views data structure */
protected $views;
protected $root;

View File

@@ -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)

View File

@@ -14,6 +14,7 @@ use Grav\Common\Grav;
trait WriteCacheFileTrait
{
/** @var bool */
protected static $umask;
/**

View File

@@ -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

View File

@@ -13,6 +13,7 @@ use Grav\Common\Utils;
class Access implements \JsonSerializable, \IteratorAggregate, \Countable
{
/** @var array */
private $acl;
public function __construct(array $acl = null)

View File

@@ -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;
/**

View File

@@ -21,6 +21,7 @@ use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
abstract class Utils
{
/** @var array */
protected static $nonces = [];
protected const ROOTURL_REGEX = '{^((?:http[s]?:\/\/[^\/]+)|(?:\/\/[^\/]+))(.*)}';

View File

@@ -20,6 +20,7 @@ use Symfony\Component\Console\Input\InputOption;
class PageSystemValidatorCommand extends ConsoleCommand
{
/** @var array */
protected $tests = [
// Content
'header' => [[]],

View File

@@ -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()

Some files were not shown because too many files have changed in this diff Show More