Fix class methods staticity/return value

This commit is contained in:
Hypolite Petovan 2017-12-17 15:29:16 -05:00
parent 916236ce2f
commit 4b5894817e
3 changed files with 5 additions and 7 deletions

View file

@ -312,10 +312,8 @@ class App {
* *
* @return string * @return string
*/ */
public static function get_basepath() { public function get_basepath() {
if (isset($this)) { $basepath = $this->basepath;
$basepath = $this->basepath;
}
if (! $basepath) { if (! $basepath) {
$basepath = Config::get('system', 'basepath'); $basepath = Config::get('system', 'basepath');

View file

@ -1094,7 +1094,7 @@ class Diaspora
preg_replace_callback( preg_replace_callback(
$expression, $expression,
function ($match) use ($item) { function ($match) use ($item) {
return self::fetchGuidSub($match, $item); self::fetchGuidSub($match, $item);
}, },
$item["body"] $item["body"]
); );
@ -1102,7 +1102,7 @@ class Diaspora
preg_replace_callback( preg_replace_callback(
"&\[url=/posts/([^\[\]]*)\](.*)\[\/url\]&Usi", "&\[url=/posts/([^\[\]]*)\](.*)\[\/url\]&Usi",
function ($match) use ($item) { function ($match) use ($item) {
return self::fetchGuidSub($match, $item); self::fetchGuidSub($match, $item);
}, },
$item["body"] $item["body"]
); );

View file

@ -32,7 +32,7 @@ class Feed {
* *
* @return array In simulation mode it returns the header and the first item * @return array In simulation mode it returns the header and the first item
*/ */
function import($xml, $importer, &$contact, &$hub, $simulate = false) { public static function import($xml, $importer, &$contact, &$hub, $simulate = false) {
$a = get_app(); $a = get_app();