| 1 | <?php |
||
| 19 | class Create implements Action, ActionSet |
||
| 20 | { |
||
| 21 | use QueryBuilder; |
||
| 22 | |||
| 23 | protected $kernel; |
||
| 24 | protected $url = '/'; |
||
| 25 | /** |
||
| 26 | * Request type to created |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | protected $HTTP_TYPE = 'POST'; |
||
| 30 | protected $data = []; |
||
| 31 | |||
| 32 | 1 | public function injectionKernel(KernelBpm $bpm) |
|
| 36 | |||
| 37 | 1 | public function getUrl() |
|
| 41 | |||
| 42 | public function processData() |
||
| 47 | |||
| 48 | 1 | public function setData(array $data) |
|
| 52 | |||
| 53 | private function query() |
||
| 67 | } |
PHP Analyzer performs a side-effects analysis of your code. A side-effect is basically anything that might be visible after the scope of the method is left.
Let’s take a look at an example:
If we look at the
getEmail()method, we can see that it has no side-effect. Whether you call this method or not, no future calls to other methods are affected by this. As such code as the following is useless:On the hand, if we look at the
setEmail(), this method _has_ side-effects. In the following case, we could not remove the method call: