Only locally used methods should always be private
This commit is contained in:
parent
6ac45d97c4
commit
23178a17a7
1 changed files with 8 additions and 8 deletions
|
@ -575,7 +575,7 @@ class PortableContact
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function toBoolean($val)
|
private static function toBoolean($val)
|
||||||
{
|
{
|
||||||
if (($val == "true") || ($val == 1)) {
|
if (($val == "true") || ($val == 1)) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -592,7 +592,7 @@ class PortableContact
|
||||||
* @param object $data POCO data
|
* @param object $data POCO data
|
||||||
* @return array Server data
|
* @return array Server data
|
||||||
*/
|
*/
|
||||||
public static function detectPocoData($data)
|
private static function detectPocoData($data)
|
||||||
{
|
{
|
||||||
$server = false;
|
$server = false;
|
||||||
|
|
||||||
|
@ -629,7 +629,7 @@ class PortableContact
|
||||||
* @param string $server_url address of the server
|
* @param string $server_url address of the server
|
||||||
* @return array Server data
|
* @return array Server data
|
||||||
*/
|
*/
|
||||||
public static function fetchNodeinfo($server_url)
|
private static function fetchNodeinfo($server_url)
|
||||||
{
|
{
|
||||||
$serverret = z_fetch_url($server_url."/.well-known/nodeinfo");
|
$serverret = z_fetch_url($server_url."/.well-known/nodeinfo");
|
||||||
if (!$serverret["success"]) {
|
if (!$serverret["success"]) {
|
||||||
|
@ -746,7 +746,7 @@ class PortableContact
|
||||||
* @param string $body Front page of the server
|
* @param string $body Front page of the server
|
||||||
* @return array Server data
|
* @return array Server data
|
||||||
*/
|
*/
|
||||||
public static function detectServerType($body)
|
private static function detectServerType($body)
|
||||||
{
|
{
|
||||||
$server = false;
|
$server = false;
|
||||||
|
|
||||||
|
@ -1292,7 +1292,7 @@ class PortableContact
|
||||||
*
|
*
|
||||||
* @param string $poco URL to the POCO endpoint
|
* @param string $poco URL to the POCO endpoint
|
||||||
*/
|
*/
|
||||||
public static function fetchServerlist($poco)
|
private static function fetchServerlist($poco)
|
||||||
{
|
{
|
||||||
$serverret = z_fetch_url($poco."/@server");
|
$serverret = z_fetch_url($poco."/@server");
|
||||||
if (!$serverret["success"]) {
|
if (!$serverret["success"]) {
|
||||||
|
@ -1315,7 +1315,7 @@ class PortableContact
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function discoverFederation()
|
private static function discoverFederation()
|
||||||
{
|
{
|
||||||
$last = Config::get('poco', 'last_federation_discovery');
|
$last = Config::get('poco', 'last_federation_discovery');
|
||||||
|
|
||||||
|
@ -1470,7 +1470,7 @@ class PortableContact
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function discoverServerUsers($data, $server)
|
private static function discoverServerUsers($data, $server)
|
||||||
{
|
{
|
||||||
if (!isset($data->entry)) {
|
if (!isset($data->entry)) {
|
||||||
return;
|
return;
|
||||||
|
@ -1501,7 +1501,7 @@ class PortableContact
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function discoverServer($data, $default_generation = 0)
|
private static function discoverServer($data, $default_generation = 0)
|
||||||
{
|
{
|
||||||
if (!isset($data->entry) || !count($data->entry)) {
|
if (!isset($data->entry) || !count($data->entry)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue