diff --git a/system/src/Grav/Common/Filesystem/File/Config.php b/system/src/Grav/Common/Filesystem/File/Config.php index d697b1f655..c54f76c73b 100644 --- a/system/src/Grav/Common/Filesystem/File/Config.php +++ b/system/src/Grav/Common/Filesystem/File/Config.php @@ -85,7 +85,7 @@ protected function encode($var) } $vars = implode("\n", $vars); - return "offsetGet($offset); + return $this->offsetGet($offset); } /** diff --git a/system/src/Grav/Common/Grav.php b/system/src/Grav/Common/Grav.php index 454e5fb986..80c7b19d3e 100644 --- a/system/src/Grav/Common/Grav.php +++ b/system/src/Grav/Common/Grav.php @@ -15,7 +15,7 @@ * @version 0.8.0 * * Originally based on Pico by Gilbert Pellegrom - http://pico.dev7studios.com - * Influeced by Pico, Stacey, Kirby, PieCrust and other great platforms... + * Influenced by Pico, Stacey, Kirby, PieCrust and other great platforms... * * @property Plugins $plugins * @property Config $config diff --git a/system/src/Grav/Common/Page/Pages.php b/system/src/Grav/Common/Page/Pages.php index 2de1561673..eaca62eb83 100644 --- a/system/src/Grav/Common/Page/Pages.php +++ b/system/src/Grav/Common/Page/Pages.php @@ -489,7 +489,7 @@ protected function buildSort($path, array $pages, $order_by = 'default', $manual $child = isset($this->instances[$key]) ? $this->instances[$key] : null; if (!$child) { - throw new \RuntimeException("Page does not exist: {$key}"); + throw new \RuntimeException("Page does not exist: {$key}"); } switch ($order_by) { diff --git a/system/src/Grav/Common/Session/Session.php b/system/src/Grav/Common/Session/Session.php index 0fe34d7f9e..2f6596cbb6 100644 --- a/system/src/Grav/Common/Session/Session.php +++ b/system/src/Grav/Common/Session/Session.php @@ -79,7 +79,7 @@ public function start() $this->started = true; return $this; - } + } /** * Get session ID diff --git a/system/src/Grav/Common/Themes.php b/system/src/Grav/Common/Themes.php index f21e8faac9..72835e4a34 100644 --- a/system/src/Grav/Common/Themes.php +++ b/system/src/Grav/Common/Themes.php @@ -16,7 +16,7 @@ class Themes * * @return array|Data\Data[] */ - static public function all() + public static function all() { $list = array(); $iterator = new \DirectoryIterator(THEMES_DIR); @@ -43,7 +43,7 @@ static public function all() * @return Data\Data * @throws \RuntimeException */ - static public function get($type) + public static function get($type) { if (!$type) { throw new \RuntimeException('Theme name not provided.'); diff --git a/system/src/Grav/Common/User/Authentication.php b/system/src/Grav/Common/User/Authentication.php index 3a7af6d8f2..265cac8fc9 100644 --- a/system/src/Grav/Common/User/Authentication.php +++ b/system/src/Grav/Common/User/Authentication.php @@ -15,7 +15,7 @@ abstract class Authentication * @param string $password Plaintext password. * @return string|bool */ - static public function create($password) + public static function create($password) { return password_hash($password, PASSWORD_DEFAULT); } @@ -27,7 +27,7 @@ static public function create($password) * @param string $hash Hash to verify against. * @return int Returns 0 if the check fails, 1 if password matches, 2 if hash needs to be updated. */ - static public function verify($password, $hash) + public static function verify($password, $hash) { // Always accept plaintext passwords (needs an update). // FIXME: not safe to do this... diff --git a/system/src/Grav/Common/Utils.php b/system/src/Grav/Common/Utils.php index 09e564ebdb..068c6b20e7 100644 --- a/system/src/Grav/Common/Utils.php +++ b/system/src/Grav/Common/Utils.php @@ -72,7 +72,7 @@ public static function truncateHtml($text, $length = 100, $ending = '...', $exac // delete tag from $open_tags list $pos = array_search($tag_matchings[1], $open_tags); if ($pos !== false) { - unset($open_tags[$pos]); + unset($open_tags[$pos]); } // if tag is an opening tag } else if (preg_match('/^<\s*([^\s>!]+).*?>$/s', $line_matchings[1], $tag_matchings)) { @@ -102,14 +102,14 @@ public static function truncateHtml($text, $length = 100, $ending = '...', $exac } } $truncate .= substr($line_matchings[2], 0, $left+$entities_length); - // maximum lenght is reached, so get off the loop + // maximum length is reached, so get off the loop break; } else { $truncate .= $line_matchings[2]; $total_length += $content_length; } // if the maximum length is reached, get off the loop - if($total_length>= $length) { + if ($total_length >= $length) { break; } } @@ -131,7 +131,7 @@ public static function truncateHtml($text, $length = 100, $ending = '...', $exac } // add the defined ending to the text $truncate .= $ending; - if($considerHtml) { + if ($considerHtml) { // close all unclosed html-tags foreach ($open_tags as $tag) { $truncate .= ''; diff --git a/system/src/Grav/Console/SetupCommand.php b/system/src/Grav/Console/SetupCommand.php index 41ba7c17ea..4ad1c3516f 100644 --- a/system/src/Grav/Console/SetupCommand.php +++ b/system/src/Grav/Console/SetupCommand.php @@ -86,7 +86,6 @@ protected function execute(InputInterface $input, OutputInterface $output) // Copy the Core STuff } else { - $options = true; // Create Some core stuff if it doesn't exist $this->createDirectories($output);