GenerationRapport   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 27
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A setGenererRapport() 0 10 2
1
<?php
2
	namespace modules\bataille\app\controller;
3
	
4
	
5
	use modules\messagerie\app\controller\Messagerie;
6
	
7
	class GenerationRapport {
8
		
9
		
10
		//-------------------------- BUILDER ----------------------------------------------------------------------------//
11
		public function __construct() {
12
			
13
		}
14
		//-------------------------- END BUILDER ----------------------------------------------------------------------------//
15
		
16
		
17
		//-------------------------- GETTER ----------------------------------------------------------------------------//
18
		//-------------------------- END GETTER ----------------------------------------------------------------------------//
19
		
20
		
21
		//-------------------------- SETTER ----------------------------------------------------------------------------//
22
		public static function setGenererRapport($titre, $infos, $type) {
23
			$chemin = MODULEROOT."bataille/app/controller/rapports/";
24
			
25
			if ($type == "mission") {
26
				require_once($chemin."mission.php");
27
			}
28
			
29
			$messagerie = new Messagerie();
30
			$messagerie->setEnvoyerMessage($titre, Bataille::getIdIdentite(), $message);
0 ignored issues
show
Bug introduced by
The variable $message does not exist. Did you mean $messagerie?

This check looks for variables that are accessed but have not been defined. It raises an issue if it finds another variable that has a similar name.

The variable may have been renamed without also renaming all references.

Loading history...
31
		}
32
		//-------------------------- END SETTER ----------------------------------------------------------------------------//    
33
	}