Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php namespace Phabricator\Request; |
||
39 | 1 | protected function process() { |
|
40 | 1 | $returnedData = []; |
|
41 | |||
42 | 1 | $params = $this->mergeConduitMetaData($this->rawData, $this->token); |
|
43 | |||
44 | 1 | $returnedData['params'] = json_encode(self::array_utf8_encode($params));; |
|
45 | 1 | $returnedData['output'] = $this->output; |
|
46 | |||
47 | //This indicates the API to the client expects conduit response. |
||
48 | //This sometimes provide more detailed error messages. |
||
49 | 1 | $returnedData['__conduit__'] = TRUE; |
|
50 | |||
51 | 1 | return $returnedData; |
|
52 | } |
||
53 | |||
87 | } |
||
The PSR-1: Basic Coding Standard recommends that a file should either introduce new symbols, that is classes, functions, constants or similar, or have side effects. Side effects are anything that executes logic, like for example printing output, changing ini settings or writing to a file.
The idea behind this recommendation is that merely auto-loading a class should not change the state of an application. It also promotes a cleaner style of programming and makes your code less prone to errors, because the logic is not spread out all over the place.
To learn more about the PSR-1, please see the PHP-FIG site on the PSR-1.