From d8af66cfd70c6428c0b5cec19061f5ab2df4cd75 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Mon, 18 Nov 2019 10:55:40 +0200 Subject: [PATCH] Remove some unused variables --- .../Common/Assets/Traits/AssetUtilsTrait.php | 17 +++++++++++++++++ system/src/Grav/Common/Page/Page.php | 5 ++--- .../Common/Twig/TwigClockworkDataSource.php | 2 -- system/src/Grav/Console/Cli/SandboxCommand.php | 2 -- system/src/Grav/Console/Cli/SecurityCommand.php | 4 ---- system/src/Grav/Console/Gpm/IndexCommand.php | 3 --- .../src/Grav/Console/Gpm/SelfupgradeCommand.php | 4 ---- system/src/Grav/Console/Gpm/UpdateCommand.php | 4 ---- system/src/Grav/Framework/Session/Session.php | 3 ++- 9 files changed, 21 insertions(+), 23 deletions(-) diff --git a/system/src/Grav/Common/Assets/Traits/AssetUtilsTrait.php b/system/src/Grav/Common/Assets/Traits/AssetUtilsTrait.php index ae01a3b64..a03111dbb 100644 --- a/system/src/Grav/Common/Assets/Traits/AssetUtilsTrait.php +++ b/system/src/Grav/Common/Assets/Traits/AssetUtilsTrait.php @@ -14,6 +14,23 @@ use Grav\Common\Utils; trait AssetUtilsTrait { + /** + * @var \Closure|null + * + * Closure used by the pipeline to fetch assets. + * + * Useful when file_get_contents() function is not available in your PHP + * installation or when you want to apply any kind of preprocessing to + * your assets before they get pipelined. + * + * The closure will receive as the only parameter a string with the path/URL of the asset and + * it should return the content of the asset file as a string. + */ + protected $fetch_command; + + /** @var string */ + protected $base_url; + /** * Determine whether a link is local or remote. * Understands both "http://" and "https://" as well as protocol agnostic links "//" diff --git a/system/src/Grav/Common/Page/Page.php b/system/src/Grav/Common/Page/Page.php index 5f46d357a..f467d2cc5 100644 --- a/system/src/Grav/Common/Page/Page.php +++ b/system/src/Grav/Common/Page/Page.php @@ -83,7 +83,6 @@ class Page implements PageInterface protected $redirect; /** @var string */ protected $external_url; - protected $items; /** @var object|null */ protected $header; /** @var string */ @@ -98,7 +97,7 @@ class Page implements PageInterface protected $summry; /** @var string */ protected $raw_content; - protected $pagination; + /** @var array */ protected $metadata; /** @var string */ protected $title; @@ -118,7 +117,7 @@ class Page implements PageInterface protected $order_dir; /** @var array */ protected $order_manual; - protected $modular; + /** @var bool */ protected $modular_twig; /** @var array */ protected $process; diff --git a/system/src/Grav/Common/Twig/TwigClockworkDataSource.php b/system/src/Grav/Common/Twig/TwigClockworkDataSource.php index 8208afd57..3550102ca 100644 --- a/system/src/Grav/Common/Twig/TwigClockworkDataSource.php +++ b/system/src/Grav/Common/Twig/TwigClockworkDataSource.php @@ -19,8 +19,6 @@ class TwigClockworkDataSource extends DataSource /** @var Timeline Views data structure */ protected $views; - protected $root; - /** * TwigClockworkDataSource constructor. */ diff --git a/system/src/Grav/Console/Cli/SandboxCommand.php b/system/src/Grav/Console/Cli/SandboxCommand.php index 91551a11b..73dd1e1bd 100644 --- a/system/src/Grav/Console/Cli/SandboxCommand.php +++ b/system/src/Grav/Console/Cli/SandboxCommand.php @@ -57,8 +57,6 @@ class SandboxCommand extends ConsoleCommand ]; /** @var string */ - 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; diff --git a/system/src/Grav/Console/Cli/SecurityCommand.php b/system/src/Grav/Console/Cli/SecurityCommand.php index dbbc91660..1ed0b775d 100644 --- a/system/src/Grav/Console/Cli/SecurityCommand.php +++ b/system/src/Grav/Console/Cli/SecurityCommand.php @@ -20,16 +20,12 @@ class SecurityCommand extends ConsoleCommand /** @var ProgressBar $progress */ protected $progress; - protected $source; - protected function configure() { $this ->setName('security') ->setDescription('Capable of running various Security checks') ->setHelp('The security runs various security checks on your Grav site'); - - $this->source = getcwd(); } protected function serve() diff --git a/system/src/Grav/Console/Gpm/IndexCommand.php b/system/src/Grav/Console/Gpm/IndexCommand.php index e60e43167..c785737ea 100644 --- a/system/src/Grav/Console/Gpm/IndexCommand.php +++ b/system/src/Grav/Console/Gpm/IndexCommand.php @@ -28,9 +28,6 @@ class IndexCommand extends ConsoleCommand /** @var array */ protected $options; - /** @var array */ - protected $sortKeys = ['name', 'slug', 'author', 'date']; - protected function configure() { $this diff --git a/system/src/Grav/Console/Gpm/SelfupgradeCommand.php b/system/src/Grav/Console/Gpm/SelfupgradeCommand.php index 3d3f5789f..c23d67eb7 100644 --- a/system/src/Grav/Console/Gpm/SelfupgradeCommand.php +++ b/system/src/Grav/Console/Gpm/SelfupgradeCommand.php @@ -25,10 +25,6 @@ class SelfupgradeCommand extends ConsoleCommand /** @var array */ protected $data; - protected $extensions; - - protected $updatable; - /** @var string */ protected $file; diff --git a/system/src/Grav/Console/Gpm/UpdateCommand.php b/system/src/Grav/Console/Gpm/UpdateCommand.php index dba38e2ed..9aaceec16 100644 --- a/system/src/Grav/Console/Gpm/UpdateCommand.php +++ b/system/src/Grav/Console/Gpm/UpdateCommand.php @@ -23,10 +23,6 @@ class UpdateCommand extends ConsoleCommand /** @var array */ protected $data; - protected $extensions; - - protected $updatable; - /** @var string */ protected $destination; diff --git a/system/src/Grav/Framework/Session/Session.php b/system/src/Grav/Framework/Session/Session.php index 1d11f7ccf..8d3f9b9ed 100644 --- a/system/src/Grav/Framework/Session/Session.php +++ b/system/src/Grav/Framework/Session/Session.php @@ -17,7 +17,8 @@ use Grav\Framework\Session\Exceptions\SessionException; */ class Session implements SessionInterface { - protected $options; + /** @var array */ + protected $options = []; /** @var bool */ protected $started = false;