Normalize App parameter declaration (mod folder, 1 out of 3)

This commit is contained in:
Hypolite Petovan 2017-01-09 23:12:54 +11:00
parent ee39aba490
commit 8a197055e3
42 changed files with 172 additions and 174 deletions

View file

@ -6,9 +6,7 @@ require_once("include/crypto.php");
require_once("include/diaspora.php");
require_once("include/xml.php");
/// @TODO You always make it like this: function foo(&$a)
/// @TODO This means that the value of $a can be changed in anything, remove & and use App as type-hint
function fetch_init(App &$a){
function fetch_init(App $a) {
if (($a->argc != 3) OR (!in_array($a->argv[1], array("post", "status_message", "reshare")))) {
header($_SERVER["SERVER_PROTOCOL"].' 404 '.t('Not Found'));