SocialIntegrationAPIInterface
last analyzed

Size/Duplication

Total Lines 80
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 80
c 0
b 0
f 0

12 Methods

Rating   Name   Duplication   Size   Complexity  
set_number_of_friends_that_can_be_retrieved() 0 1 ?
get_number_of_friends_that_can_be_retrieved() 0 1 ?
login_url() 0 1 ?
connect_url() 0 1 ?
redirect_to_login_prompt() 0 1 ?
get_current_user() 0 1 ?
get_list_of_friends() 0 1 ?
is_valid_user() 0 1 ?
get_updates() 0 1 ?
send_message() 0 1 ?
test() 0 1 ?
meondatabase() 0 1 ?
1
<?php
2
3
4
5
interface SocialIntegrationAPIInterface
0 ignored issues
show
Coding Style Compatibility introduced by
Each interface must be in a namespace of at least one level (a top-level vendor name)

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
6
{
7
8
9
//======================================= STATIC METHODS ===============================================
10
11
    /**
12
     * Maximum number of followers/friends that can be retrieved
13
     * @var Int
14
     */
15
        public static function set_number_of_friends_that_can_be_retrieved($n);
0 ignored issues
show
Documentation introduced by
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
16
    public static function get_number_of_friends_that_can_be_retrieved();
0 ignored issues
show
Documentation introduced by
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
17
18
    /**
19
     * Link to login form
20
     * @param String $returnURL
21
     * @return String
22
     */
23
    public static function login_url($returnURL = "");
24
25
26
    /**
27
     * Link to connect
28
     * @param String $returnURL
29
     * @return String
30
     */
31
    public static function connect_url($returnURL = "", $existingMember = false);
32
33
    /**
34
     * redirects to login prompt, lets the user log in and returns to
35
     * the returnURL specified.
36
     * @param String $returnURL
37
     * @return REDIRECTS!
0 ignored issues
show
Documentation introduced by
The doc-type REDIRECTS! could not be parsed: Unknown type name "REDIRECTS!" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
38
     */
39
    public static function redirect_to_login_prompt($returnURL = "");
40
41
42
    /**
43
     * returns all the data of the currently logged in / connected user.
44
     *
45
     * @return Array | Null
46
     */
47
    public static function get_current_user();
48
49
    /**
50
     * gets a list of friends
51
     * @param Int - $Limit, set to -1 to to maximum
52
     * @param String - $searchString, filter for search string
53
     * @return Array
54
     */
55
    public static function get_list_of_friends($limit = 12, $searchString = "");
56
57
    /**
58
     * Checks if the id provided is a valid member of the class.
59
     * @return Boolean
60
     */
61
    public static function is_valid_user($id);
62
63
    /**
64
     * return last status updates
65
     * @return Boolean
66
     */
67
    public static function get_updates($lastNumber = 12);
68
69
    /**
70
     * make sure to return TRUE as response if the message is sent
71
     * successfully
72
     * Sends a message from the current user to someone else in the networkd
73
     * @param Int $userID - Facebook user id.
0 ignored issues
show
Bug introduced by
There is no parameter named $userID. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
74
     * @param String $message - Message you are sending
75
     * @param String $link - Link to send with message
76
     * @return Boolean - return TRUE as success
77
     */
78
    public static function send_message($to, $message, $link = "", $otherVariables = array());
79
80
81
    public function test($request);
0 ignored issues
show
Documentation introduced by
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
82
83
    public function meondatabase();
0 ignored issues
show
Documentation introduced by
For interfaces and abstract methods it is generally a good practice to add a @return annotation even if it is just @return void or @return null, so that implementors know what to do in the overridden method.

For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a @return doc comment to communicate to implementors of these methods what they are expected to return.

Loading history...
84
}
85