Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed typos/CS #3

Merged
merged 1 commit into from
Aug 17, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Filesystem/File/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected function encode($var)
}
$vars = implode("\n", $vars);

return "<?php\nnamespace Grav;\n\nclass Config extends \\Grav\\Common\\Config {\n {$vars}\n}";
return "<?php\nnamespace Grav;\n\nclass Config extends \\Grav\\Common\\Config {\n {$vars}\n}";
}

/**
Expand Down
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Getters.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __set($offset, $value)
*/
public function __get($offset)
{
return $this->offsetGet($offset);
return $this->offsetGet($offset);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Grav.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Page/Pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Session/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function start()
$this->started = true;

return $this;
}
}

/**
* Get session ID
Expand Down
4 changes: 2 additions & 2 deletions system/src/Grav/Common/Themes.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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.');
Expand Down
4 changes: 2 additions & 2 deletions system/src/Grav/Common/User/Authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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...
Expand Down
8 changes: 4 additions & 4 deletions system/src/Grav/Common/Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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;
}
}
Expand All @@ -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 .= '</' . $tag . '>';
Expand Down
1 change: 0 additions & 1 deletion system/src/Grav/Console/SetupCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down