@@ -12,19 +12,19 @@ |
||
| 12 | 12 | * [__construct description] |
| 13 | 13 | * @param \EnergieProduction\Chart\Contracts\Renderable $render |
| 14 | 14 | */ |
| 15 | - public function __construct(Renderable $render) |
|
| 16 | - { |
|
| 17 | - $this->render = $render; |
|
| 18 | - } |
|
| 15 | + public function __construct(Renderable $render) |
|
| 16 | + { |
|
| 17 | + $this->render = $render; |
|
| 18 | + } |
|
| 19 | 19 | |
| 20 | - /** |
|
| 21 | - * [handle description] |
|
| 22 | - * @param string $key |
|
| 23 | - * @param mixed $content |
|
| 24 | - * @return array |
|
| 25 | - */ |
|
| 26 | - public function handle($key, $content) |
|
| 27 | - { |
|
| 28 | - return $this->render->handle($key, "#!!" . $content . "!!#"); |
|
| 29 | - } |
|
| 20 | + /** |
|
| 21 | + * [handle description] |
|
| 22 | + * @param string $key |
|
| 23 | + * @param mixed $content |
|
| 24 | + * @return array |
|
| 25 | + */ |
|
| 26 | + public function handle($key, $content) |
|
| 27 | + { |
|
| 28 | + return $this->render->handle($key, "#!!" . $content . "!!#"); |
|
| 29 | + } |
|
| 30 | 30 | } |
| 31 | 31 | \ No newline at end of file |
@@ -8,63 +8,63 @@ |
||
| 8 | 8 | |
| 9 | 9 | class Option { |
| 10 | 10 | |
| 11 | - protected $options; |
|
| 11 | + protected $options; |
|
| 12 | 12 | |
| 13 | - public function __construct() |
|
| 14 | - { |
|
| 15 | - $this->options = []; |
|
| 16 | - } |
|
| 13 | + public function __construct() |
|
| 14 | + { |
|
| 15 | + $this->options = []; |
|
| 16 | + } |
|
| 17 | 17 | |
| 18 | - /** |
|
| 19 | - * [pushSubset description] |
|
| 20 | - * @param string $subset |
|
| 21 | - * @param \closure $closure |
|
| 22 | - * @return void |
|
| 23 | - */ |
|
| 24 | - public function pushSubset($subset, closure $closure) |
|
| 25 | - { |
|
| 26 | - $option = new self; |
|
| 18 | + /** |
|
| 19 | + * [pushSubset description] |
|
| 20 | + * @param string $subset |
|
| 21 | + * @param \closure $closure |
|
| 22 | + * @return void |
|
| 23 | + */ |
|
| 24 | + public function pushSubset($subset, closure $closure) |
|
| 25 | + { |
|
| 26 | + $option = new self; |
|
| 27 | 27 | |
| 28 | - call_user_func($closure, $option); |
|
| 28 | + call_user_func($closure, $option); |
|
| 29 | 29 | |
| 30 | - $render = new Renderable\Render(); |
|
| 31 | - $render = new Renderable\Subset($render); |
|
| 30 | + $render = new Renderable\Render(); |
|
| 31 | + $render = new Renderable\Subset($render); |
|
| 32 | 32 | |
| 33 | - $this->options = array_merge($this->options, $render->handle( |
|
| 34 | - $subset, |
|
| 35 | - $option->render() |
|
| 36 | - )); |
|
| 37 | - } |
|
| 33 | + $this->options = array_merge($this->options, $render->handle( |
|
| 34 | + $subset, |
|
| 35 | + $option->render() |
|
| 36 | + )); |
|
| 37 | + } |
|
| 38 | 38 | |
| 39 | - /** |
|
| 40 | - * [pushCriteria description] |
|
| 41 | - * @param mixed $criteria |
|
| 42 | - * @return void |
|
| 43 | - */ |
|
| 44 | - public function pushCriteria($criteria) |
|
| 45 | - { |
|
| 46 | - $content = $criteria->getcontent(); |
|
| 39 | + /** |
|
| 40 | + * [pushCriteria description] |
|
| 41 | + * @param mixed $criteria |
|
| 42 | + * @return void |
|
| 43 | + */ |
|
| 44 | + public function pushCriteria($criteria) |
|
| 45 | + { |
|
| 46 | + $content = $criteria->getcontent(); |
|
| 47 | 47 | |
| 48 | - $render = new Renderable\Render(); |
|
| 49 | - $render = new Renderable\Criteria($render); |
|
| 48 | + $render = new Renderable\Render(); |
|
| 49 | + $render = new Renderable\Criteria($render); |
|
| 50 | 50 | |
| 51 | - if ($content instanceof Expression) { |
|
| 52 | - $render = new Renderable\Expression($render); |
|
| 53 | - $content = $content->render(); |
|
| 54 | - } |
|
| 51 | + if ($content instanceof Expression) { |
|
| 52 | + $render = new Renderable\Expression($render); |
|
| 53 | + $content = $content->render(); |
|
| 54 | + } |
|
| 55 | 55 | |
| 56 | - $this->options = array_merge($this->options, $render->handle( |
|
| 57 | - $criteria->resolveKey(), |
|
| 58 | - $content |
|
| 59 | - )); |
|
| 60 | - } |
|
| 56 | + $this->options = array_merge($this->options, $render->handle( |
|
| 57 | + $criteria->resolveKey(), |
|
| 58 | + $content |
|
| 59 | + )); |
|
| 60 | + } |
|
| 61 | 61 | |
| 62 | - /** |
|
| 63 | - * [render description] |
|
| 64 | - * @return array |
|
| 65 | - */ |
|
| 66 | - public function render() |
|
| 67 | - { |
|
| 68 | - return $this->options; |
|
| 69 | - } |
|
| 62 | + /** |
|
| 63 | + * [render description] |
|
| 64 | + * @return array |
|
| 65 | + */ |
|
| 66 | + public function render() |
|
| 67 | + { |
|
| 68 | + return $this->options; |
|
| 69 | + } |
|
| 70 | 70 | } |