@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $page->setConfig([ |
19 | 19 | 'borderColor' => Color::BLACK, |
20 | 20 | 'backgroundColor' => Color::GREEN |
21 | -])->setBorder(1,1,1,1); |
|
21 | +])->setBorder(1, 1, 1, 1); |
|
22 | 22 | $page->setPadding(1, 1, 1, 1); |
23 | 23 | $documentWidth = $page->getDocumentWidth(); |
24 | 24 | echo str_repeat("\n", 5); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $page->addText(['mode' => SymbolMode::BLINKING, 'color' => Color::RED, 'backgroundColor' => Color::WHITE]) |
48 | 48 | ->setValue("Line 1"); |
49 | 49 | |
50 | -$div= $page->addDiv()->setPadding(1, 1, 1, 1)->setBorder(1, 1, 1, 1); |
|
50 | +$div = $page->addDiv()->setPadding(1, 1, 1, 1)->setBorder(1, 1, 1, 1); |
|
51 | 51 | $div->setConfig([ |
52 | 52 | 'mode' => SymbolMode::DEFAULT, |
53 | 53 | 'borderColor' => Color::RED, |
@@ -34,7 +34,7 @@ |
||
34 | 34 | ->setBorder(1, 1, 1, 1) |
35 | 35 | ->setPadding(2, 2, 1, 1); |
36 | 36 | $table1d = (new Table1D($config)) |
37 | - ->setConfig(['secondColumnWidth' => 30,]) |
|
37 | + ->setConfig(['secondColumnWidth' => 30, ]) |
|
38 | 38 | ->setHeader("Attribute", "Value"); |
39 | 39 | $div->addChild($table1d); |
40 | 40 | $table1d->setData($data); |
@@ -16,7 +16,7 @@ |
||
16 | 16 | |
17 | 17 | $page = $di->get(Page::class); |
18 | 18 | |
19 | -$table = $page->addTable(['color'=>Color::GREEN,'borderColor'=>Color::RED, 'backgroundColor'=>Color::WHITE])->setBorder(1, 1, 1, 1); |
|
19 | +$table = $page->addTable(['color'=>Color::GREEN, 'borderColor'=>Color::RED, 'backgroundColor'=>Color::WHITE])->setBorder(1, 1, 1, 1); |
|
20 | 20 | $row = $table->addRow(); |
21 | 21 | $row->addCell()->setPadding(1, 1, 0, 0)->setBorder(0, 1, 0, 0)->addText()->setValue("Table 1\nCell 1"); |
22 | 22 | $cell1 = $row->addCell()->setPadding(0, 0, 0, 0); |
@@ -36,7 +36,7 @@ |
||
36 | 36 | 'borderColor' => $this->__get('borderColor'), |
37 | 37 | 'backgroundColor' => $this->__get('backgroundColor'), |
38 | 38 | ]; |
39 | - $text->setConfig(array_merge($text->getConfig(), $symbolConfig, $config)); |
|
39 | + $text->setConfig(array_merge($text->getConfig(), $symbolConfig, $config)); |
|
40 | 40 | $this->addChild($text); |
41 | 41 | return $text; |
42 | 42 | } |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | { |
14 | 14 | $this->text = $text; |
15 | 15 | $batches = $this->splitText(); |
16 | - $lengths = array_map(function ($it) { |
|
16 | + $lengths = array_map(function($it) { |
|
17 | 17 | return strlen($it); |
18 | 18 | }, $batches); |
19 | 19 | $this->width = max($lengths); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | public function render(): GlyphInline |
31 | 31 | { |
32 | 32 | $batches = $this->splitText(); |
33 | - $lengths = array_map(function ($it) { |
|
33 | + $lengths = array_map(function($it) { |
|
34 | 34 | return strlen($it); |
35 | 35 | }, $batches); |
36 | 36 | $this->height = count($batches); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | 'color' => $this->__get('color'), |
55 | 55 | 'backgroundColor' => $this->__get('backgroundColor'), |
56 | 56 | ]; |
57 | - $this->renderMap = $this->getWidth() ? array_chunk(array_map(function ($value) use ($symbolConfig) { |
|
57 | + $this->renderMap = $this->getWidth() ? array_chunk(array_map(function($value) use ($symbolConfig) { |
|
58 | 58 | return (new Symbol($value))->setConfig($symbolConfig); |
59 | 59 | }, $symbols), $this->getWidth()) : []; |
60 | 60 | $this->height = count($this->renderMap); |