Install_Helper_Newsletter   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A create() 0 7 1
1
<?php
2
class Install_Helper_Newsletter {
3
    
4
    private $kernel;
5
    private $db;
6
7
    public function __construct($kernel, $db) {
8
        $this->kernel = $kernel;
9
        $this->db = $db;
10
    }
11
    
12
    public function create() {
13
        
14
        require_once 'Intraface/modules/newsletter/NewsletterList.php';
15
        $newsletter = new NewsletterList($this->kernel);
16
        
17
        return $newsletter->save(array('title' => 'Test'));
18
    }
19
}
20
?>
0 ignored issues
show
Best Practice introduced by
It is not recommended to use PHP's closing tag ?> in files other than templates.

Using a closing tag in PHP files that only contain PHP code is not recommended as you might accidentally add whitespace after the closing tag which would then be output by PHP. This can cause severe problems, for example headers cannot be sent anymore.

A simple precaution is to leave off the closing tag as it is not required, and it also has no negative effects whatsoever.

Loading history...
21