Merge pull request #3 from pborreli/typos

Fixed typos/CS
This commit is contained in:
Andy Miller 2014-08-17 14:01:30 -06:00
commit c1b2b5f56f
9 changed files with 13 additions and 14 deletions

View File

@ -85,7 +85,7 @@ class Config extends General
}
$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}";
}
/**

View File

@ -36,7 +36,7 @@ abstract class Getters implements \ArrayAccess, \Countable
*/
public function __get($offset)
{
return $this->offsetGet($offset);
return $this->offsetGet($offset);
}
/**

View File

@ -15,7 +15,7 @@ use \Grav\Common\Page\Pages;
* @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

View File

@ -489,7 +489,7 @@ class Pages
$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) {

View File

@ -79,7 +79,7 @@ class Session implements \IteratorAggregate
$this->started = true;
return $this;
}
}
/**
* Get session ID

View File

@ -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 @@ class Themes
* @return Data\Data
* @throws \RuntimeException
*/
static public function get($type)
public static function get($type)
{
if (!$type) {
throw new \RuntimeException('Theme name not provided.');

View File

@ -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 @@ abstract class Authentication
* @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...

View File

@ -72,7 +72,7 @@ abstract class Utils
// 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 @@ abstract class Utils
}
}
$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 @@ abstract class Utils
}
// 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 . '>';

View File

@ -86,7 +86,6 @@ EOT
// Copy the Core STuff
} else {
$options = true;
// Create Some core stuff if it doesn't exist
$this->createDirectories($output);