Browse Source

Code cleanup

- Remove extraneous use statements
- Format require_once
pull/3921/head
Hypolite Petovan 4 years ago
parent
commit
898fe2db1e
  1. 1
      include/contact_widgets.php
  2. 6
      mod/admin.php
  3. 4
      mod/cal.php
  4. 4
      mod/crepair.php
  5. 2
      src/Model/GlobalContact.php
  6. 3
      src/Protocol/PortableContact.php
  7. 4
      src/Worker/Expire.php
  8. 1
      src/Worker/Notifier.php

1
include/contact_widgets.php

@ -1,6 +1,5 @@
<?php
use Friendica\App;
use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Core\PConfig;

6
mod/admin.php

@ -13,9 +13,9 @@ use Friendica\Core\Worker;
use Friendica\Database\DBM;
use Friendica\Model\User;
require_once("include/enotify.php");
require_once("include/text.php");
require_once('include/items.php');
require_once 'include/enotify.php';
require_once 'include/text.php';
require_once 'include/items.php';
/**
* @brief Process send data from the admin panels subpages

4
mod/cal.php

@ -13,8 +13,8 @@ use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
require_once('include/event.php');
require_once('include/redir.php');
require_once 'include/event.php';
require_once 'include/redir.php';
function cal_init(App $a) {
if($a->argc > 1)

4
mod/crepair.php

@ -5,8 +5,8 @@ use Friendica\Core\Config;
use Friendica\Database\DBM;
use Friendica\Object\Contact;
require_once("include/contact_selectors.php");
require_once("mod/contacts.php");
require_once 'include/contact_selectors.php';
require_once 'mod/contacts.php';
function crepair_init(App $a) {
if (! local_user()) {

2
src/Model/GlobalContact.php

@ -381,7 +381,7 @@ class GlobalContact
if (DBM::is_result($r)) {
return $r[0]['total'];
}
return 0;
}

3
src/Protocol/PortableContact.php

@ -9,9 +9,6 @@
namespace Friendica\Protocol;
use Friendica\App;
use Friendica\Core\System;
use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\Worker;
use Friendica\Database\DBM;

4
src/Worker/Expire.php

@ -15,8 +15,8 @@ class Expire {
public static function execute($param = '', $hook_name = '') {
global $a;
require_once('include/datetime.php');
require_once('include/items.php');
require_once 'include/datetime.php';
require_once 'include/items.php';
load_hooks();

1
src/Worker/Notifier.php

@ -4,7 +4,6 @@
*/
namespace Friendica\Worker;
use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\Worker;
use Friendica\Database\DBM;

Loading…
Cancel
Save