Test Failed
Push — master ( 647c72...cd42b5 )
by
unknown
10:25
created

StickyNoteItemModule   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 14
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
	/**
3
	 * StickyNote ItemModule
4
	 * Module which openes, creates, saves and deletes an item. It 
5
	 * extends the Module class.
6
	 */
7
	class StickyNoteItemModule extends ItemModule
8
	{
9
		/**
10
		 * Constructor
11
		 * @param int $id unique id.
12
		 * @param array $data list of all actions.
13
		 */
14
		function __construct($id, $data)
15
		{
16
			parent::__construct($id, $data);
17
18
			$this->properties = $GLOBALS["properties"]->getStickyNoteProperties();
0 ignored issues
show
Bug Best Practice introduced by
The property properties does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
19
20
			$this->plaintext = true;
21
		}
22
	}
23
?>
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...
24