@@ -30,18 +30,18 @@ |
||
30 | 30 | |
31 | 31 | $rootNode |
32 | 32 | ->children() |
33 | - ->scalarNode('excel_factory_namespace') |
|
33 | + ->scalarNode('excel_factory_namespace') |
|
34 | 34 | ->defaultValue('\PHPExcel_IOFactory') |
35 | - ->end() |
|
36 | - ->scalarNode('layout_style') |
|
35 | + ->end() |
|
36 | + ->scalarNode('layout_style') |
|
37 | 37 | ->defaultValue('horizontal') |
38 | - ->end() |
|
39 | - ->scalarNode('output_format') |
|
38 | + ->end() |
|
39 | + ->scalarNode('output_format') |
|
40 | 40 | ->defaultValue('Excel2007') |
41 | - ->end() |
|
42 | - ->scalarNode('default_report_path') |
|
41 | + ->end() |
|
42 | + ->scalarNode('default_report_path') |
|
43 | 43 | ->isRequired() |
44 | - ->end() |
|
44 | + ->end() |
|
45 | 45 | ->end() |
46 | 46 | ; |
47 | 47 |
@@ -22,7 +22,7 @@ |
||
22 | 22 | class Align implements StyleInterface |
23 | 23 | { |
24 | 24 | |
25 | - public function run(ReportBuilder &$context, $coordString, $options) |
|
25 | + public function run(ReportBuilder&$context, $coordString, $options) |
|
26 | 26 | { |
27 | 27 | |
28 | 28 | $context->sheet() |
@@ -28,13 +28,13 @@ |
||
28 | 28 | switch ($options['type']) { |
29 | 29 | case 'auto': |
30 | 30 | $context->sheet() |
31 | - ->getColumnDimension($coordString) |
|
32 | - ->setAutoSize(true); |
|
33 | - break; |
|
31 | + ->getColumnDimension($coordString) |
|
32 | + ->setAutoSize(true); |
|
33 | + break; |
|
34 | 34 | |
35 | 35 | default: |
36 | 36 | throw new \Exception('Unrecognised style width option: '.$options['type']); |
37 | - break; |
|
38 | - } |
|
37 | + break; |
|
38 | + } |
|
39 | 39 | } |
40 | 40 | } |
@@ -26,15 +26,15 @@ |
||
26 | 26 | public function run(ReportBuilder &$context, $coordString, $options) { |
27 | 27 | |
28 | 28 | switch ($options['type']) { |
29 | - case 'auto': |
|
30 | - $context->sheet() |
|
31 | - ->getColumnDimension($coordString) |
|
32 | - ->setAutoSize(true); |
|
33 | - break; |
|
29 | + case 'auto': |
|
30 | + $context->sheet() |
|
31 | + ->getColumnDimension($coordString) |
|
32 | + ->setAutoSize(true); |
|
33 | + break; |
|
34 | 34 | |
35 | - default: |
|
36 | - throw new \Exception('Unrecognised style width option: '.$options['type']); |
|
37 | - break; |
|
35 | + default: |
|
36 | + throw new \Exception('Unrecognised style width option: '.$options['type']); |
|
37 | + break; |
|
38 | 38 | } |
39 | 39 | } |
40 | 40 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | class Width implements StyleInterface |
24 | 24 | { |
25 | 25 | |
26 | - public function run(ReportBuilder &$context, $coordString, $options) { |
|
26 | + public function run(ReportBuilder&$context, $coordString, $options) { |
|
27 | 27 | |
28 | 28 | switch ($options['type']) { |
29 | 29 | case 'auto': |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | break; |
34 | 34 | |
35 | 35 | default: |
36 | - throw new \Exception('Unrecognised style width option: '.$options['type']); |
|
36 | + throw new \Exception('Unrecognised style width option: ' . $options['type']); |
|
37 | 37 | break; |
38 | 38 | } |
39 | 39 | } |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | class Bg implements StyleInterface |
24 | 24 | { |
25 | 25 | |
26 | - public function run(ReportBuilder &$context, $coordString, $options) |
|
26 | + public function run(ReportBuilder&$context, $coordString, $options) |
|
27 | 27 | { |
28 | 28 | if (!isset($options['color'])) { |
29 | 29 | $options['color'] = $options['default_bg_color']; |
@@ -33,6 +33,6 @@ discard block |
||
33 | 33 | ->getStyle($coordString) |
34 | 34 | ->applyFromArray(['fill' => array( |
35 | 35 | 'type' => \PHPExcel_Style_Fill::FILL_SOLID, |
36 | - 'color' => array('rgb' => $options['color']), )]); |
|
36 | + 'color' => array('rgb' => $options['color']),)]); |
|
37 | 37 | } |
38 | 38 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | class Merge implements StyleInterface |
24 | 24 | { |
25 | 25 | |
26 | - public function run(ReportBuilder &$context, $coordString, $options) |
|
26 | + public function run(ReportBuilder&$context, $coordString, $options) |
|
27 | 27 | { |
28 | 28 | |
29 | 29 | $context->sheet()->mergeCells($coordString); |
@@ -31,7 +31,7 @@ |
||
31 | 31 | * @return type |
32 | 32 | * @throws \InvalidArgumentException if options array is missing edge |
33 | 33 | */ |
34 | - public function run(ReportBuilder &$context, $coordString, $options) |
|
34 | + public function run(ReportBuilder&$context, $coordString, $options) |
|
35 | 35 | { |
36 | 36 | if (!isset($options['edge'])) { |
37 | 37 | throw new \InvalidArgumentException('Must set edge to use in options array'); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | class DataSet implements PatternInterface |
24 | 24 | { |
25 | 25 | |
26 | - public function run(ReportBuilder &$context) |
|
26 | + public function run(ReportBuilder&$context) |
|
27 | 27 | { |
28 | 28 | $data = $context->meta()->getDataSet(); |
29 | 29 | $nav = $context->nav(); |
@@ -71,6 +71,6 @@ discard block |
||
71 | 71 | $start = $nav->coord('current', 'initial'); |
72 | 72 | $end = $nav->coord('current', ($nav->row() - 1)); |
73 | 73 | |
74 | - $context->style('border', $start.':'.$end, ['edge' => 'left']); |
|
74 | + $context->style('border', $start . ':' . $end, ['edge' => 'left']); |
|
75 | 75 | } |
76 | 76 | } |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | class SetHeadings implements PatternInterface |
23 | 23 | { |
24 | 24 | |
25 | - public function run(ReportBuilder &$context) |
|
25 | + public function run(ReportBuilder&$context) |
|
26 | 26 | { |
27 | 27 | $nav = $context->nav(); |
28 | 28 | $meta = $context->meta(); |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | $context->write($context->query()->getTitle()); |
35 | 35 | |
36 | 36 | // Get the last column of the headings |
37 | - $rangeEndColumn = $nav->column()+$meta->columnCount()-1; |
|
38 | - $headingRange = $nav->coord().':'.$nav->coord($rangeEndColumn, false); |
|
37 | + $rangeEndColumn = $nav->column() + $meta->columnCount() - 1; |
|
38 | + $headingRange = $nav->coord() . ':' . $nav->coord($rangeEndColumn, false); |
|
39 | 39 | |
40 | 40 | $context->style('merge', $headingRange); |
41 | 41 | $nav->down(); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $start = $nav->coord('initial', 'current'); |
62 | 62 | $end = $nav->coord(($nav->column() - 1), 'current'); |
63 | 63 | |
64 | - $context->style('border', $start.':'.$end, ['edge' => 'bottom']); |
|
64 | + $context->style('border', $start . ':' . $end, ['edge' => 'bottom']); |
|
65 | 65 | |
66 | 66 | $nav->reset('set'); |
67 | 67 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * |
27 | 27 | * @param ReportBuilder $context |
28 | 28 | */ |
29 | - public function run(ReportBuilder &$context) |
|
29 | + public function run(ReportBuilder&$context) |
|
30 | 30 | { |
31 | 31 | $nav = $context->nav(); |
32 | 32 | $meta = $context->meta(); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | // Draw the edge line |
46 | 46 | $start = $nav->coord('current', 'initial'); |
47 | 47 | $end = $nav->coord('current', ($nav->row() - 1)); |
48 | - $coordString = $start.':'.$end; |
|
48 | + $coordString = $start . ':' . $end; |
|
49 | 49 | |
50 | 50 | $context->style('border', $coordString, ['edge' => 'right']); |
51 | 51 | $context->style('align', $coordString, ['edge' => 'right']); |