Notify   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 12
c 2
b 0
f 0
dl 0
loc 23
rs 10
wmc 4

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 21 4
1
<?php
2
namespace GJClasses;
3
4
class Notify
5
{
6
    public function __construct($method, $name, $address, $reply_name, $reply_address, $recipients, $email_subject,
7
                                $html, $text, $push_provider, $api_key, $user_key, $push_subject, $content, $url,
8
                                $priority)
9
    {
10
        if ($method == 'all') {
11
12
            $mail = new Mail();
13
            $mail->send($name, $address, $reply_name, $reply_address, $recipients, $email_subject, $html, $text);
14
15
            $push = new Push($push_provider);
16
            $push->push($api_key, $user_key, $push_subject, $content, $url, $priority);
17
18
        } elseif ($method == 'email') {
19
20
            $mail = new Mail();
21
            $mail->send($name, $address, $reply_name, $reply_address, $recipients, $email_subject, $html, $text);
22
23
        } elseif ($method == 'push') {
24
25
            $push = new Push($push_provider);
26
            $push->push($api_key, $user_key, $push_subject, $content, $url, $priority);
27
28
        }
29
    }
30
}
31