GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

OrbitalBase   D
last analyzed

Complexity

Total Complexity 115

Size/Duplication

Total Lines 362
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 362
rs 4.8717
c 1
b 0
f 0
wmc 115
lcom 2
cbo 0

94 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 1 1
A getRPlace() 0 1 1
A getRPlayer() 0 1 1
A getName() 0 1 1
A getLevelGenerator() 0 1 1
A getLevelRefinery() 0 1 1
A getLevelDock1() 0 1 1
A getLevelDock2() 0 1 1
A getLevelDock3() 0 1 1
A getLevelTechnosphere() 0 1 1
A getLevelCommercialPlateforme() 0 1 1
A getLevelStorage() 0 1 1
A getLevelRecycling() 0 1 1
A getLevelSpatioport() 0 1 1
A getPoints() 0 1 1
A getISchool() 0 1 1
A getIAntiSpy() 0 1 1
A getAntiSpyAverage() 0 1 1
A getShipStorage() 0 1 2
A getResourcesStorage() 0 1 1
A getDCreation() 0 1 1
A getPosition() 0 1 1
A getSystem() 0 1 1
A getXSystem() 0 1 1
A getYSystem() 0 1 1
A getSector() 0 1 1
A getTax() 0 1 1
A getPlanetPopulation() 0 1 1
A getPlanetResources() 0 1 1
A getPlanetHistory() 0 1 1
A getRemainingTimeGenerator() 0 1 1
A getRemainingTimeDock1() 0 1 1
A getRemainingTimeDock2() 0 1 1
A getRemainingTimeDock3() 0 1 1
A getRoutesNumber() 0 1 1
A getRealGeneratorLevel() 0 1 1
A getRealRefineryLevel() 0 1 1
A getRealDock1Level() 0 1 1
A getRealDock2Level() 0 1 1
A getRealDock3Level() 0 1 1
A getRealTechnosphereLevel() 0 1 1
A getRealCommercialPlateformeLevel() 0 1 1
A getRealStorageLevel() 0 1 1
A getRealRecyclingLevel() 0 1 1
A getRealSpatioportLevel() 0 1 1
B getBuildingLevel() 0 17 11
A setId() 0 4 1
A setRPlace() 0 4 1
A setRPlayer() 0 4 1
A setName() 0 4 1
A setLevelGenerator() 0 4 1
A setLevelRefinery() 0 4 1
A setLevelDock1() 0 4 1
A setLevelDock2() 0 4 1
A setLevelDock3() 0 4 1
A setLevelTechnosphere() 0 4 1
A setLevelCommercialPlateforme() 0 4 1
A setLevelStorage() 0 4 1
A setLevelRecycling() 0 4 1
A setLevelSpatioport() 0 4 1
A setPoints() 0 4 1
A setISchool() 0 4 1
A setIAntiSpy() 0 4 1
A setAntiSpyAverage() 0 4 1
A setShipStorage() 0 4 1
A setResourcesStorage() 0 4 1
A setDCreation() 0 4 1
A setPosition() 0 4 1
A setSystem() 0 4 1
A setXSystem() 0 4 1
A setYSystem() 0 4 1
A setSector() 0 4 1
A setTax() 0 4 1
A setPlanetPopulation() 0 4 1
A setPlanetResources() 0 4 1
A setPlanetHistory() 0 4 1
A setRemainingTimeGenerator() 0 4 1
A setRemainingTimeDock1() 0 4 1
A setRemainingTimeDock2() 0 4 1
A setRemainingTimeDock3() 0 4 1
A setRoutesNumber() 0 4 1
A setRealGeneratorLevel() 0 4 1
A setRealRefineryLevel() 0 4 1
A setRealDock1Level() 0 4 1
A setRealDock2Level() 0 4 1
A setRealDock3Level() 0 4 1
A setRealTechnosphereLevel() 0 4 1
A setRealCommercialPlateformeLevel() 0 4 1
A setRealStorageLevel() 0 4 1
A setRealRecyclingLevel() 0 4 1
A setRealSpatioportLevel() 0 4 1
B setBuildingLevel() 0 17 11
A setUpdatedAt() 0 6 1
A getUpdatedAt() 0 4 1

How to fix   Complexity   

Complex Class

Complex classes like OrbitalBase often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.

Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.

While breaking up the class, it is a good idea to analyze how other classes use OrbitalBase, and based on these observations, apply Extract Interface, too.

1
<?php
2
3
/**
4
 * Orbital Base
5
 *
6
 * @author Jacky Casas
7
 * @copyright Expansion - le jeu
8
 *
9
 * @package Athena
10
 * @update 02.01.14
11
*/
12
namespace Asylamba\Modules\Athena\Model;
13
14
use ErrorException;
15
16
class OrbitalBase {
17
	# type of base
18
	const TYP_NEUTRAL = 0;
19
	const TYP_COMMERCIAL = 1;
20
	const TYP_MILITARY = 2;
21
	const TYP_CAPITAL = 3;
22
23
	const MAXCOMMANDERSTANDARD = 2;
24
	const MAXCOMMANDERMILITARY = 5;
25
26
	const COOL_DOWN = 12;
27
	const EXTRA_STOCK = 25000;
28
29
	const MAXCOMMANDERINMESS = 20;
30
31
	//ATTRIBUTES : ORBITALBASE
32
	public $rPlace;
33
	public $rPlayer;
34
	public $name;
35
	public $typeOfBase = 0;
36
	public $levelGenerator = 1;
37
	public $levelRefinery = 1;
38
	public $levelDock1 = 1;
39
	public $levelDock2 = 0;
40
	public $levelDock3 = 0;
41
	public $levelTechnosphere = 1;
42
	public $levelCommercialPlateforme = 0;
43
	public $levelStorage = 1;
44
	public $levelRecycling = 0;
45
	public $levelSpatioport = 0;
46
	public $points = 0;
47
	public $iSchool = 1000;
48
	public $iAntiSpy = 0;
49
	public $antiSpyAverage = 0;
50
	public $shipStorage = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
51
	public $resourcesStorage = 5000;
52
	public $uOrbitalBase = '';
53
	public $dCreation = '';
54
	//ATTRIBUTES : PLACE
55
	public $position = 0;
56
	public $system = 0;
57
	public $xSystem = 0;
58
	public $ySystem = 0;
59
	public $sector = 0;
60
	public $sectorColor;
61
	public $tax = 0;
62
	public $planetPopulation = 0;
63
	public $planetResources = 0;
64
	public $planetHistory = 0;
65
	//ATTRIBUTES : OTHERS
66
	public $remainingTimeGenerator;
67
	public $remainingTimeDock1;
68
	public $remainingTimeDock2;
69
	public $remainingTimeDock3;
70
	public $routesNumber;
71
	//ATTRIBUTES : FUTURE LEVELS
72
	public $realGeneratorLevel;
73
	public $realRefineryLevel;
74
	public $realDock1Level;
75
	public $realDock2Level;
76
	public $realDock3Level;
77
	public $realTechnosphereLevel;
78
	public $realCommercialPlateformeLevel;
79
	public $realStorageLevel;
80
	public $realRecyclingLevel;
81
	public $realSpatioportLevel;
82
	// PUBLIC ATTRIBUTES
83
	public $buildingQueues = [];
84
	public $routeManager;
85
	public $technoQueues = [];
86
	public $commercialShippings = [];
87
88
	//GETTERS
89
	public function getId() { return $this->rPlace; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
90
	public function getRPlace() { return $this->rPlace; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
91
	public function getRPlayer() { return $this->rPlayer; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
92
	public function getName() { return $this->name; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
93
	public function getLevelGenerator() { return $this->levelGenerator; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
94
	public function getLevelRefinery() { return $this->levelRefinery; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
95
	public function getLevelDock1() { return $this->levelDock1; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
96
	public function getLevelDock2() { return $this->levelDock2; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
97
	public function getLevelDock3() { return $this->levelDock3; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
98
	public function getLevelTechnosphere() { return $this->levelTechnosphere; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
99
	public function getLevelCommercialPlateforme() { return $this->levelCommercialPlateforme; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
100
	public function getLevelStorage() { return $this->levelStorage; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
101
	public function getLevelRecycling() { return $this->levelRecycling; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
102
	public function getLevelSpatioport() { return $this->levelSpatioport; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
103
	public function getPoints() { return $this->points; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
104
	public function getISchool() { return $this->iSchool; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
105
	public function getIAntiSpy() { return $this->iAntiSpy; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
106
	public function getAntiSpyAverage() { return $this->antiSpyAverage; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
107
	public function getShipStorage($k = -1) {return ($k == -1) ? $this->shipStorage : $this->shipStorage[$k]; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
108
	public function getResourcesStorage() { return $this->resourcesStorage; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
109
	public function getDCreation() { return $this->dCreation; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
110
111
	public function getPosition() { return $this->position; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
112
	public function getSystem() { return $this->system; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
113
	public function getXSystem() { return $this->xSystem; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
114
	public function getYSystem() { return $this->ySystem; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
115
	public function getSector() { return $this->sector; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
116
	public function getTax() { return $this->tax; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
117
	public function getPlanetPopulation() { return $this->planetPopulation; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
118
	public function getPlanetResources() { return $this->planetResources; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
119
	public function getPlanetHistory() { return $this->planetHistory; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
120
121
	public function getRemainingTimeGenerator() { return $this->remainingTimeGenerator; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
122
	public function getRemainingTimeDock1() { return $this->remainingTimeDock1; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
123
	public function getRemainingTimeDock2() { return $this->remainingTimeDock2; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
124
	public function getRemainingTimeDock3() { return $this->remainingTimeDock3; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
125
	public function getRoutesNumber() { return $this->routesNumber; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
126
127
	public function getRealGeneratorLevel() { return $this->realGeneratorLevel; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
128
	public function getRealRefineryLevel() { return $this->realRefineryLevel; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
129
	public function getRealDock1Level() { return $this->realDock1Level; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
130
	public function getRealDock2Level() { return $this->realDock2Level; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
131
	public function getRealDock3Level() { return $this->realDock3Level; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
132
	public function getRealTechnosphereLevel() { return $this->realTechnosphereLevel; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
133
	public function getRealCommercialPlateformeLevel() { return $this->realCommercialPlateformeLevel; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
134
	public function getRealStorageLevel() { return $this->realStorageLevel; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
135
	public function getRealRecyclingLevel() { return $this->realRecyclingLevel; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
136
	public function getRealSpatioportLevel() { return $this->realSpatioportLevel; }
0 ignored issues
show
Coding Style introduced by
Opening brace must be the last content on the line
Loading history...
137
138
	public function getBuildingLevel($buildingNumber) {
139
		switch ($buildingNumber) {
140
			case 0 : return $this->levelGenerator;
0 ignored issues
show
Coding Style introduced by
There must be no space before the colon in a CASE statement

As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.

switch ($selector) {
    case "A": //right
        doSomething();
        break;
    case "B" : //wrong
        doSomethingElse();
        break;
}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
The case body in a switch statement must start on the line following the statement.

According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.

switch ($expr) {
case "A":
    doSomething(); //right
    break;
case "B":

    doSomethingElse(); //wrong
    break;

}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
Terminating statement must be on a line by itself

As per the PSR-2 coding standard, the break (or other terminating) statement must be on a line of its own.

switch ($expr) {
     case "A":
         doSomething();
         break; //wrong
     case "B":
         doSomething();
         break; //right
     case "C:":
         doSomething();
         return true; //right
 }

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
141
			case 1 : return $this->levelRefinery;
0 ignored issues
show
Coding Style introduced by
There must be no space before the colon in a CASE statement

As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.

switch ($selector) {
    case "A": //right
        doSomething();
        break;
    case "B" : //wrong
        doSomethingElse();
        break;
}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
The case body in a switch statement must start on the line following the statement.

According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.

switch ($expr) {
case "A":
    doSomething(); //right
    break;
case "B":

    doSomethingElse(); //wrong
    break;

}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
Terminating statement must be on a line by itself

As per the PSR-2 coding standard, the break (or other terminating) statement must be on a line of its own.

switch ($expr) {
     case "A":
         doSomething();
         break; //wrong
     case "B":
         doSomething();
         break; //right
     case "C:":
         doSomething();
         return true; //right
 }

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
142
			case 2 : return $this->levelDock1;
0 ignored issues
show
Coding Style introduced by
There must be no space before the colon in a CASE statement

As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.

switch ($selector) {
    case "A": //right
        doSomething();
        break;
    case "B" : //wrong
        doSomethingElse();
        break;
}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
The case body in a switch statement must start on the line following the statement.

According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.

switch ($expr) {
case "A":
    doSomething(); //right
    break;
case "B":

    doSomethingElse(); //wrong
    break;

}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
Terminating statement must be on a line by itself

As per the PSR-2 coding standard, the break (or other terminating) statement must be on a line of its own.

switch ($expr) {
     case "A":
         doSomething();
         break; //wrong
     case "B":
         doSomething();
         break; //right
     case "C:":
         doSomething();
         return true; //right
 }

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
143
			case 3 : return $this->levelDock2;
0 ignored issues
show
Coding Style introduced by
There must be no space before the colon in a CASE statement

As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.

switch ($selector) {
    case "A": //right
        doSomething();
        break;
    case "B" : //wrong
        doSomethingElse();
        break;
}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
The case body in a switch statement must start on the line following the statement.

According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.

switch ($expr) {
case "A":
    doSomething(); //right
    break;
case "B":

    doSomethingElse(); //wrong
    break;

}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
Terminating statement must be on a line by itself

As per the PSR-2 coding standard, the break (or other terminating) statement must be on a line of its own.

switch ($expr) {
     case "A":
         doSomething();
         break; //wrong
     case "B":
         doSomething();
         break; //right
     case "C:":
         doSomething();
         return true; //right
 }

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
144
			case 4 : return $this->levelDock3;
0 ignored issues
show
Coding Style introduced by
There must be no space before the colon in a CASE statement

As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.

switch ($selector) {
    case "A": //right
        doSomething();
        break;
    case "B" : //wrong
        doSomethingElse();
        break;
}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
The case body in a switch statement must start on the line following the statement.

According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.

switch ($expr) {
case "A":
    doSomething(); //right
    break;
case "B":

    doSomethingElse(); //wrong
    break;

}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
Terminating statement must be on a line by itself

As per the PSR-2 coding standard, the break (or other terminating) statement must be on a line of its own.

switch ($expr) {
     case "A":
         doSomething();
         break; //wrong
     case "B":
         doSomething();
         break; //right
     case "C:":
         doSomething();
         return true; //right
 }

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
145
			case 5 : return $this->levelTechnosphere;
0 ignored issues
show
Coding Style introduced by
There must be no space before the colon in a CASE statement

As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.

switch ($selector) {
    case "A": //right
        doSomething();
        break;
    case "B" : //wrong
        doSomethingElse();
        break;
}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
The case body in a switch statement must start on the line following the statement.

According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.

switch ($expr) {
case "A":
    doSomething(); //right
    break;
case "B":

    doSomethingElse(); //wrong
    break;

}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
Terminating statement must be on a line by itself

As per the PSR-2 coding standard, the break (or other terminating) statement must be on a line of its own.

switch ($expr) {
     case "A":
         doSomething();
         break; //wrong
     case "B":
         doSomething();
         break; //right
     case "C:":
         doSomething();
         return true; //right
 }

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
146
			case 6 : return $this->levelCommercialPlateforme;
0 ignored issues
show
Coding Style introduced by
There must be no space before the colon in a CASE statement

As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.

switch ($selector) {
    case "A": //right
        doSomething();
        break;
    case "B" : //wrong
        doSomethingElse();
        break;
}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
The case body in a switch statement must start on the line following the statement.

According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.

switch ($expr) {
case "A":
    doSomething(); //right
    break;
case "B":

    doSomethingElse(); //wrong
    break;

}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
Terminating statement must be on a line by itself

As per the PSR-2 coding standard, the break (or other terminating) statement must be on a line of its own.

switch ($expr) {
     case "A":
         doSomething();
         break; //wrong
     case "B":
         doSomething();
         break; //right
     case "C:":
         doSomething();
         return true; //right
 }

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
147
			case 7 : return $this->levelStorage;
0 ignored issues
show
Coding Style introduced by
There must be no space before the colon in a CASE statement

As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.

switch ($selector) {
    case "A": //right
        doSomething();
        break;
    case "B" : //wrong
        doSomethingElse();
        break;
}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
The case body in a switch statement must start on the line following the statement.

According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.

switch ($expr) {
case "A":
    doSomething(); //right
    break;
case "B":

    doSomethingElse(); //wrong
    break;

}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
Terminating statement must be on a line by itself

As per the PSR-2 coding standard, the break (or other terminating) statement must be on a line of its own.

switch ($expr) {
     case "A":
         doSomething();
         break; //wrong
     case "B":
         doSomething();
         break; //right
     case "C:":
         doSomething();
         return true; //right
 }

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
148
			case 8 : return $this->levelRecycling;
0 ignored issues
show
Coding Style introduced by
There must be no space before the colon in a CASE statement

As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.

switch ($selector) {
    case "A": //right
        doSomething();
        break;
    case "B" : //wrong
        doSomethingElse();
        break;
}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
The case body in a switch statement must start on the line following the statement.

According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.

switch ($expr) {
case "A":
    doSomething(); //right
    break;
case "B":

    doSomethingElse(); //wrong
    break;

}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
Terminating statement must be on a line by itself

As per the PSR-2 coding standard, the break (or other terminating) statement must be on a line of its own.

switch ($expr) {
     case "A":
         doSomething();
         break; //wrong
     case "B":
         doSomething();
         break; //right
     case "C:":
         doSomething();
         return true; //right
 }

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
149
			case 9 : return $this->levelSpatioport;
0 ignored issues
show
Coding Style introduced by
There must be no space before the colon in a CASE statement

As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.

switch ($selector) {
    case "A": //right
        doSomething();
        break;
    case "B" : //wrong
        doSomethingElse();
        break;
}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
The case body in a switch statement must start on the line following the statement.

According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.

switch ($expr) {
case "A":
    doSomething(); //right
    break;
case "B":

    doSomethingElse(); //wrong
    break;

}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
Terminating statement must be on a line by itself

As per the PSR-2 coding standard, the break (or other terminating) statement must be on a line of its own.

switch ($expr) {
     case "A":
         doSomething();
         break; //wrong
     case "B":
         doSomething();
         break; //right
     case "C:":
         doSomething();
         return true; //right
 }

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
150
			default :
0 ignored issues
show
Coding Style introduced by
There must be no space before the colon in a DEFAULT statement

As per the PSR-2 coding standard, there must not be a space in front of the colon in the default statement.

switch ($expr) {
    default : //wrong
        doSomething();
        break;
}

switch ($expr) {
    default: //right
        doSomething();
        break;
}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
151
				throw new ErrorException('Bâtiment invalide dans getBuildingLevel de OrbitalBase');
152
				return FALSE;
0 ignored issues
show
Unused Code introduced by
return FALSE; does not seem to be reachable.

This check looks for unreachable code. It uses sophisticated control flow analysis techniques to find statements which will never be executed.

Unreachable code is most often the result of return, die or exit statements that have been added for debug purposes.

function fx() {
    try {
        doSomething();
        return true;
    }
    catch (\Exception $e) {
        return false;
    }

    return false;
}

In the above example, the last return false will never be executed, because a return statement has already been met in every possible execution path.

Loading history...
153
		}
154
	}
155
156
	//SETTERS
157
	public function setId($var) {
158
		$this->rPlace = $var;
159
		return $this;
160
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
161
	public function setRPlace($var) {
162
		$this->rPlace = $var;
163
		return $this;
164
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
165
	public function setRPlayer($var) {
166
		$this->rPlayer = $var;
167
		return $this;
168
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
169
	public function setName($var) {
170
		$this->name = $var;
171
		return $this;
172
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
173
	public function setLevelGenerator($var) {
174
		$this->levelGenerator = $var;
175
		return $this;
176
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
177
	public function setLevelRefinery($var) {
178
		$this->levelRefinery = $var;
179
		return $this;
180
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
181
	public function setLevelDock1($var) {
182
		$this->levelDock1 = $var;
183
		return $this;
184
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
185
	public function setLevelDock2($var) {
186
		$this->levelDock2 = $var;
187
		return $this;
188
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
189
	public function setLevelDock3($var) {
190
		$this->levelDock3 = $var;
191
		return $this;
192
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
193
	public function setLevelTechnosphere($var) {
194
		$this->levelTechnosphere = $var;
195
		return $this;
196
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
197
	public function setLevelCommercialPlateforme($var) {
198
		$this->levelCommercialPlateforme = $var;
199
		return $this;
200
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
201
	public function setLevelStorage($var) {
202
		$this->levelStorage = $var;
203
		return $this;
204
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
205
	public function setLevelRecycling($var) {
206
		$this->levelRecycling = $var;
207
		return $this;
208
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
209
	public function setLevelSpatioport($var) {
210
		$this->levelSpatioport = $var;
211
		return $this;
212
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
213
	public function setPoints($var) {
214
		$this->points = $var;
215
		return $this;
216
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
217
	public function setISchool($var) {
218
		$this->iSchool = $var;
219
		return $this;
220
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
221
	public function setIAntiSpy($var) {
222
		$this->iAntiSpy = $var;
223
		return $this;
224
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
225
	public function setAntiSpyAverage($var) {
226
		$this->antiSpyAverage = $var;
227
		return $this;
228
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
229
	public function setShipStorage($k, $v) {
230
		$this->shipStorage[$k] = $v;
231
		return $this;
232
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
233
	public function setResourcesStorage($var) {
234
		$this->resourcesStorage = $var;
235
		return $this;
236
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
237
	public function setDCreation($var) {
238
		$this->dCreation = $var;
239
		return $this;
240
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
241
242
	public function setPosition($var) {
243
		$this->position = $var;
244
		return $this;
245
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
246
	public function setSystem($var) {
247
		$this->system = $var;
248
		return $this;
249
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
250
	public function setXSystem($var) {
251
		$this->xSystem = $var;
252
		return $this;
253
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
254
	public function setYSystem($var) {
255
		$this->ySystem = $var;
256
		return $this;
257
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
258
	public function setSector($var) {
259
		$this->sector = $var;
260
		return $this;
261
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
262
	public function setTax($var) {
263
		$this->tax = $var;
264
		return $this;
265
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
266
	public function setPlanetPopulation($var) {
267
		$this->planetPopulation = $var;
268
		return $this;
269
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
270
	public function setPlanetResources($var) {
271
		$this->planetResources = $var;
272
		return $this;
273
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
274
	public function setPlanetHistory($var) {
275
		$this->planetHistory = $var;
276
		return $this;
277
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
278
279
	public function setRemainingTimeGenerator($var) {
280
		$this->remainingTimeGenerator = $var;
281
		return $this;
282
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
283
	public function setRemainingTimeDock1($var) {
284
		$this->remainingTimeDock1 = $var;
285
		return $this;
286
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
287
	public function setRemainingTimeDock2($var) {
288
		$this->remainingTimeDock2 = $var;
289
		return $this;
290
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
291
	public function setRemainingTimeDock3($var) {
292
		$this->remainingTimeDock3 = $var;
293
		return $this;
294
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
295
	public function setRoutesNumber($var) {
296
		$this->routesNumber = $var;
297
		return $this;
298
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
299
300
	public function setRealGeneratorLevel($var) {
301
		$this->realGeneratorLevel = $var;
302
		return $this;
303
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
304
	public function setRealRefineryLevel($var) {
305
		$this->realRefineryLevel = $var;
306
		return $this;
307
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
308
	public function setRealDock1Level($var) {
309
		$this->realDock1Level = $var;
310
		return $this;
311
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
312
	public function setRealDock2Level($var) {
313
		$this->realDock2Level = $var;
314
		return $this;
315
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
316
	public function setRealDock3Level($var) {
317
		$this->realDock3Level = $var;
318
		return $this;
319
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
320
	public function setRealTechnosphereLevel($var) {
321
		$this->realTechnosphereLevel = $var;
322
		return $this;
323
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
324
	public function setRealCommercialPlateformeLevel($var) {
325
		$this->realCommercialPlateformeLevel = $var;
326
		return $this;
327
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
328
	public function setRealStorageLevel($var) {
329
		$this->realStorageLevel = $var;
330
		return $this;
331
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
332
	public function setRealRecyclingLevel($var) {
333
		$this->realRecyclingLevel = $var;
334
		return $this;
335
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
336
	public function setRealSpatioportLevel($var) {
337
		$this->realSpatioportLevel = $var;
338
		return $this;
339
	 }
0 ignored issues
show
Coding Style introduced by
Closing brace indented incorrectly; expected 4 spaces, found 5
Loading history...
340
341
	public function setBuildingLevel($buildingNumber, $level) {
342
		switch ($buildingNumber) {
343
			case 0 : $this->levelGenerator = $level; break;
0 ignored issues
show
Coding Style introduced by
There must be no space before the colon in a CASE statement

As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.

switch ($selector) {
    case "A": //right
        doSomething();
        break;
    case "B" : //wrong
        doSomethingElse();
        break;
}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
The case body in a switch statement must start on the line following the statement.

According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.

switch ($expr) {
case "A":
    doSomething(); //right
    break;
case "B":

    doSomethingElse(); //wrong
    break;

}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
Terminating statement must be on a line by itself

As per the PSR-2 coding standard, the break (or other terminating) statement must be on a line of its own.

switch ($expr) {
     case "A":
         doSomething();
         break; //wrong
     case "B":
         doSomething();
         break; //right
     case "C:":
         doSomething();
         return true; //right
 }

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
344
			case 1 : $this->levelRefinery = $level; break;
0 ignored issues
show
Coding Style introduced by
There must be no space before the colon in a CASE statement

As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.

switch ($selector) {
    case "A": //right
        doSomething();
        break;
    case "B" : //wrong
        doSomethingElse();
        break;
}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
The case body in a switch statement must start on the line following the statement.

According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.

switch ($expr) {
case "A":
    doSomething(); //right
    break;
case "B":

    doSomethingElse(); //wrong
    break;

}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
Terminating statement must be on a line by itself

As per the PSR-2 coding standard, the break (or other terminating) statement must be on a line of its own.

switch ($expr) {
     case "A":
         doSomething();
         break; //wrong
     case "B":
         doSomething();
         break; //right
     case "C:":
         doSomething();
         return true; //right
 }

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
345
			case 2 : $this->levelDock1 = $level; break;
0 ignored issues
show
Coding Style introduced by
There must be no space before the colon in a CASE statement

As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.

switch ($selector) {
    case "A": //right
        doSomething();
        break;
    case "B" : //wrong
        doSomethingElse();
        break;
}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
The case body in a switch statement must start on the line following the statement.

According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.

switch ($expr) {
case "A":
    doSomething(); //right
    break;
case "B":

    doSomethingElse(); //wrong
    break;

}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
Terminating statement must be on a line by itself

As per the PSR-2 coding standard, the break (or other terminating) statement must be on a line of its own.

switch ($expr) {
     case "A":
         doSomething();
         break; //wrong
     case "B":
         doSomething();
         break; //right
     case "C:":
         doSomething();
         return true; //right
 }

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
346
			case 3 : $this->levelDock2 = $level; break;
0 ignored issues
show
Coding Style introduced by
There must be no space before the colon in a CASE statement

As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.

switch ($selector) {
    case "A": //right
        doSomething();
        break;
    case "B" : //wrong
        doSomethingElse();
        break;
}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
The case body in a switch statement must start on the line following the statement.

According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.

switch ($expr) {
case "A":
    doSomething(); //right
    break;
case "B":

    doSomethingElse(); //wrong
    break;

}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
Terminating statement must be on a line by itself

As per the PSR-2 coding standard, the break (or other terminating) statement must be on a line of its own.

switch ($expr) {
     case "A":
         doSomething();
         break; //wrong
     case "B":
         doSomething();
         break; //right
     case "C:":
         doSomething();
         return true; //right
 }

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
347
			case 4 : $this->levelDock3 = $level; break;
0 ignored issues
show
Coding Style introduced by
There must be no space before the colon in a CASE statement

As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.

switch ($selector) {
    case "A": //right
        doSomething();
        break;
    case "B" : //wrong
        doSomethingElse();
        break;
}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
The case body in a switch statement must start on the line following the statement.

According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.

switch ($expr) {
case "A":
    doSomething(); //right
    break;
case "B":

    doSomethingElse(); //wrong
    break;

}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
Terminating statement must be on a line by itself

As per the PSR-2 coding standard, the break (or other terminating) statement must be on a line of its own.

switch ($expr) {
     case "A":
         doSomething();
         break; //wrong
     case "B":
         doSomething();
         break; //right
     case "C:":
         doSomething();
         return true; //right
 }

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
348
			case 5 : $this->levelTechnosphere = $level; break;
0 ignored issues
show
Coding Style introduced by
There must be no space before the colon in a CASE statement

As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.

switch ($selector) {
    case "A": //right
        doSomething();
        break;
    case "B" : //wrong
        doSomethingElse();
        break;
}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
The case body in a switch statement must start on the line following the statement.

According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.

switch ($expr) {
case "A":
    doSomething(); //right
    break;
case "B":

    doSomethingElse(); //wrong
    break;

}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
Terminating statement must be on a line by itself

As per the PSR-2 coding standard, the break (or other terminating) statement must be on a line of its own.

switch ($expr) {
     case "A":
         doSomething();
         break; //wrong
     case "B":
         doSomething();
         break; //right
     case "C:":
         doSomething();
         return true; //right
 }

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
349
			case 6 : $this->levelCommercialPlateforme = $level; break;
0 ignored issues
show
Coding Style introduced by
There must be no space before the colon in a CASE statement

As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.

switch ($selector) {
    case "A": //right
        doSomething();
        break;
    case "B" : //wrong
        doSomethingElse();
        break;
}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
The case body in a switch statement must start on the line following the statement.

According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.

switch ($expr) {
case "A":
    doSomething(); //right
    break;
case "B":

    doSomethingElse(); //wrong
    break;

}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
Terminating statement must be on a line by itself

As per the PSR-2 coding standard, the break (or other terminating) statement must be on a line of its own.

switch ($expr) {
     case "A":
         doSomething();
         break; //wrong
     case "B":
         doSomething();
         break; //right
     case "C:":
         doSomething();
         return true; //right
 }

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
350
			case 7 : $this->levelStorage = $level; break;
0 ignored issues
show
Coding Style introduced by
There must be no space before the colon in a CASE statement

As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.

switch ($selector) {
    case "A": //right
        doSomething();
        break;
    case "B" : //wrong
        doSomethingElse();
        break;
}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
The case body in a switch statement must start on the line following the statement.

According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.

switch ($expr) {
case "A":
    doSomething(); //right
    break;
case "B":

    doSomethingElse(); //wrong
    break;

}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
Terminating statement must be on a line by itself

As per the PSR-2 coding standard, the break (or other terminating) statement must be on a line of its own.

switch ($expr) {
     case "A":
         doSomething();
         break; //wrong
     case "B":
         doSomething();
         break; //right
     case "C:":
         doSomething();
         return true; //right
 }

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
351
			case 8 : $this->levelRecycling = $level; break;
0 ignored issues
show
Coding Style introduced by
There must be no space before the colon in a CASE statement

As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.

switch ($selector) {
    case "A": //right
        doSomething();
        break;
    case "B" : //wrong
        doSomethingElse();
        break;
}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
The case body in a switch statement must start on the line following the statement.

According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.

switch ($expr) {
case "A":
    doSomething(); //right
    break;
case "B":

    doSomethingElse(); //wrong
    break;

}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
Terminating statement must be on a line by itself

As per the PSR-2 coding standard, the break (or other terminating) statement must be on a line of its own.

switch ($expr) {
     case "A":
         doSomething();
         break; //wrong
     case "B":
         doSomething();
         break; //right
     case "C:":
         doSomething();
         return true; //right
 }

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
352
			case 9 : $this->levelSpatioport = $level; break;
0 ignored issues
show
Coding Style introduced by
There must be no space before the colon in a CASE statement

As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.

switch ($selector) {
    case "A": //right
        doSomething();
        break;
    case "B" : //wrong
        doSomethingElse();
        break;
}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
The case body in a switch statement must start on the line following the statement.

According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.

switch ($expr) {
case "A":
    doSomething(); //right
    break;
case "B":

    doSomethingElse(); //wrong
    break;

}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
Terminating statement must be on a line by itself

As per the PSR-2 coding standard, the break (or other terminating) statement must be on a line of its own.

switch ($expr) {
     case "A":
         doSomething();
         break; //wrong
     case "B":
         doSomething();
         break; //right
     case "C:":
         doSomething();
         return true; //right
 }

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
Coding Style introduced by
It is generally recommended to place each PHP statement on a line by itself.

Let’s take a look at an example:

// Bad
$a = 5; $b = 6; $c = 7;

// Good
$a = 5;
$b = 6;
$c = 7;
Loading history...
353
			default :
0 ignored issues
show
Coding Style introduced by
There must be no space before the colon in a DEFAULT statement

As per the PSR-2 coding standard, there must not be a space in front of the colon in the default statement.

switch ($expr) {
    default : //wrong
        doSomething();
        break;
}

switch ($expr) {
    default: //right
        doSomething();
        break;
}

To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.

Loading history...
354
				throw new ErrorException('Bâtiment invalide dans setBuildingLevel de OrbitalBase');
355
		}
356
		return $this;
357
	}
358
	
359
	/**
360
	 * @param string $updatedAt
361
	 * @return OrbitalBase
362
	 */
363
	public function setUpdatedAt($updatedAt)
364
	{
365
		$this->uOrbitalBase = $updatedAt;
366
		
367
		return $this;
368
	}
369
	
370
	/**
371
	 * @return string
372
	 */
373
	public function getUpdatedAt()
374
	{
375
		return $this->uOrbitalBase;
376
	}
377
}
378