Browse Source

Fix class methods staticity/return value

tags/3.6
Hypolite Petovan 2 years ago
parent
commit
4b5894817e
3 changed files with 5 additions and 7 deletions
  1. +2
    -4
      src/App.php
  2. +2
    -2
      src/Protocol/Diaspora.php
  3. +1
    -1
      src/Protocol/Feed.php

+ 2
- 4
src/App.php View File

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

if (! $basepath) {
$basepath = Config::get('system', 'basepath');


+ 2
- 2
src/Protocol/Diaspora.php View File

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


+ 1
- 1
src/Protocol/Feed.php View File

@@ -32,7 +32,7 @@ class Feed {
*
* @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();



Loading…
Cancel
Save