Skip to content

Commit c1b2b5f

Browse files
committed
Merge pull request #3 from pborreli/typos
Fixed typos/CS
2 parents 69ca8bc + 41aadf2 commit c1b2b5f

9 files changed

Lines changed: 13 additions & 14 deletions

File tree

system/src/Grav/Common/Filesystem/File/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ protected function encode($var)
8585
}
8686
$vars = implode("\n", $vars);
8787

88-
return "<?php\nnamespace Grav;\n\nclass Config extends \\Grav\\Common\\Config {\n {$vars}\n}";
88+
return "<?php\nnamespace Grav;\n\nclass Config extends \\Grav\\Common\\Config {\n {$vars}\n}";
8989
}
9090

9191
/**

system/src/Grav/Common/Getters.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __set($offset, $value)
3636
*/
3737
public function __get($offset)
3838
{
39-
return $this->offsetGet($offset);
39+
return $this->offsetGet($offset);
4040
}
4141

4242
/**

system/src/Grav/Common/Grav.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* @version 0.8.0
1616
*
1717
* Originally based on Pico by Gilbert Pellegrom - http://pico.dev7studios.com
18-
* Influeced by Pico, Stacey, Kirby, PieCrust and other great platforms...
18+
* Influenced by Pico, Stacey, Kirby, PieCrust and other great platforms...
1919
*
2020
* @property Plugins $plugins
2121
* @property Config $config

system/src/Grav/Common/Page/Pages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ protected function buildSort($path, array $pages, $order_by = 'default', $manual
489489

490490
$child = isset($this->instances[$key]) ? $this->instances[$key] : null;
491491
if (!$child) {
492-
throw new \RuntimeException("Page does not exist: {$key}");
492+
throw new \RuntimeException("Page does not exist: {$key}");
493493
}
494494

495495
switch ($order_by) {

system/src/Grav/Common/Session/Session.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function start()
7979
$this->started = true;
8080

8181
return $this;
82-
}
82+
}
8383

8484
/**
8585
* Get session ID

system/src/Grav/Common/Themes.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Themes
1616
*
1717
* @return array|Data\Data[]
1818
*/
19-
static public function all()
19+
public static function all()
2020
{
2121
$list = array();
2222
$iterator = new \DirectoryIterator(THEMES_DIR);
@@ -43,7 +43,7 @@ static public function all()
4343
* @return Data\Data
4444
* @throws \RuntimeException
4545
*/
46-
static public function get($type)
46+
public static function get($type)
4747
{
4848
if (!$type) {
4949
throw new \RuntimeException('Theme name not provided.');

system/src/Grav/Common/User/Authentication.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ abstract class Authentication
1515
* @param string $password Plaintext password.
1616
* @return string|bool
1717
*/
18-
static public function create($password)
18+
public static function create($password)
1919
{
2020
return password_hash($password, PASSWORD_DEFAULT);
2121
}
@@ -27,7 +27,7 @@ static public function create($password)
2727
* @param string $hash Hash to verify against.
2828
* @return int Returns 0 if the check fails, 1 if password matches, 2 if hash needs to be updated.
2929
*/
30-
static public function verify($password, $hash)
30+
public static function verify($password, $hash)
3131
{
3232
// Always accept plaintext passwords (needs an update).
3333
// FIXME: not safe to do this...

system/src/Grav/Common/Utils.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public static function truncateHtml($text, $length = 100, $ending = '...', $exac
7272
// delete tag from $open_tags list
7373
$pos = array_search($tag_matchings[1], $open_tags);
7474
if ($pos !== false) {
75-
unset($open_tags[$pos]);
75+
unset($open_tags[$pos]);
7676
}
7777
// if tag is an opening tag
7878
} 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
102102
}
103103
}
104104
$truncate .= substr($line_matchings[2], 0, $left+$entities_length);
105-
// maximum lenght is reached, so get off the loop
105+
// maximum length is reached, so get off the loop
106106
break;
107107
} else {
108108
$truncate .= $line_matchings[2];
109109
$total_length += $content_length;
110110
}
111111
// if the maximum length is reached, get off the loop
112-
if($total_length>= $length) {
112+
if ($total_length >= $length) {
113113
break;
114114
}
115115
}
@@ -131,7 +131,7 @@ public static function truncateHtml($text, $length = 100, $ending = '...', $exac
131131
}
132132
// add the defined ending to the text
133133
$truncate .= $ending;
134-
if($considerHtml) {
134+
if ($considerHtml) {
135135
// close all unclosed html-tags
136136
foreach ($open_tags as $tag) {
137137
$truncate .= '</' . $tag . '>';

system/src/Grav/Console/SetupCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
8686

8787
// Copy the Core STuff
8888
} else {
89-
$options = true;
9089
// Create Some core stuff if it doesn't exist
9190
$this->createDirectories($output);
9291

0 commit comments

Comments
 (0)