@@ -24,7 +24,7 @@ |
||
24 | 24 | parent::__construct($message, 0, $previous); |
25 | 25 | } |
26 | 26 | /** |
27 | - * @return mixed |
|
27 | + * @return string |
|
28 | 28 | */ |
29 | 29 | public function getFormat() |
30 | 30 | { |
@@ -21,7 +21,7 @@ |
||
21 | 21 | /** |
22 | 22 | * @param GraphicPrimitiveParser |
23 | 23 | * |
24 | - * @return AbstractGraphicPrimitiveRenderer |
|
24 | + * @return \Graze\CiffRenderer\Field\Renderer\GraphicPrimitive\AbstractGraphicPrimitiveRenderer |
|
25 | 25 | */ |
26 | 26 | protected function instantiateRenderer(ParserInterface $parser) |
27 | 27 | { |
@@ -25,7 +25,7 @@ |
||
25 | 25 | } |
26 | 26 | |
27 | 27 | /** |
28 | - * @return DateTimeInterface |
|
28 | + * @return DateTimeImmutable |
|
29 | 29 | */ |
30 | 30 | protected function getDateTime() |
31 | 31 | { |
@@ -31,7 +31,7 @@ |
||
31 | 31 | { |
32 | 32 | $offsetFieldName = (string) $this->xmlField->Data->Object->OffsetDate['SrcOffset']; |
33 | 33 | |
34 | - $offsetField = $this->xmlHeader->xpath('//DateOffset[@Name="'. $offsetFieldName .'"]')[0]; |
|
34 | + $offsetField = $this->xmlHeader->xpath('//DateOffset[@Name="' . $offsetFieldName . '"]')[0]; |
|
35 | 35 | |
36 | 36 | // currenty only supports offset days |
37 | 37 | $offsetDays = (string) $offsetField->DefaultOffset->Day; |
@@ -7,7 +7,7 @@ |
||
7 | 7 | abstract class AbstractGraphicPrimitiveRenderer extends AbstractRenderer |
8 | 8 | { |
9 | 9 | /** |
10 | - * @return int |
|
10 | + * @return double |
|
11 | 11 | */ |
12 | 12 | protected function getLineWeight() |
13 | 13 | { |
@@ -9,21 +9,25 @@ |
||
9 | 9 | { |
10 | 10 | /** |
11 | 11 | * @param ParserInterface $parser |
12 | + * @return void |
|
12 | 13 | */ |
13 | 14 | public function setParser(ParserInterface $parser); |
14 | 15 | |
15 | 16 | /** |
16 | 17 | * @param ImageManager $imageManager |
18 | + * @return void |
|
17 | 19 | */ |
18 | 20 | public function setImageManager(ImageManager $imageManager); |
19 | 21 | |
20 | 22 | /** |
21 | 23 | * @param float $scale |
24 | + * @return void |
|
22 | 25 | */ |
23 | 26 | public function setScale($scale); |
24 | 27 | |
25 | 28 | /** |
26 | 29 | * @param string $colour |
30 | + * @return void |
|
27 | 31 | */ |
28 | 32 | public function setTracerColour($colour); |
29 | 33 |
@@ -13,7 +13,6 @@ |
||
13 | 13 | protected $xml; |
14 | 14 | |
15 | 15 | /** |
16 | - * @param string $filePath |
|
17 | 16 | */ |
18 | 17 | public function __construct(SimpleXMLElement $xml) |
19 | 18 | { |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | // set bytes and padding |
47 | 47 | $meta['bytes'] = $meta['bits'] / 8; |
48 | - $meta['decal'] = 4 - (4 * (($meta['width'] * $meta['bytes'] / 4)- floor($meta['width'] * $meta['bytes'] / 4))); |
|
48 | + $meta['decal'] = 4 - (4 * (($meta['width'] * $meta['bytes'] / 4) - floor($meta['width'] * $meta['bytes'] / 4))); |
|
49 | 49 | if ($meta['decal'] == 4) { |
50 | 50 | $meta['decal'] = 0; |
51 | 51 | } |
@@ -123,26 +123,26 @@ discard block |
||
123 | 123 | break; |
124 | 124 | case 8: |
125 | 125 | $color = unpack('n', $vide . substr($data, $p, 1)); |
126 | - $color[1] = $palette[ $color[1] + 1 ]; |
|
126 | + $color[1] = $palette[$color[1] + 1]; |
|
127 | 127 | break; |
128 | 128 | case 4: |
129 | 129 | $color = unpack('n', $vide . substr($data, floor($p), 1)); |
130 | 130 | $color[1] = ($p * 2) % 2 == 0 ? $color[1] >> 4 : $color[1] & 0x0F; |
131 | - $color[1] = $palette[ $color[1] + 1 ]; |
|
131 | + $color[1] = $palette[$color[1] + 1]; |
|
132 | 132 | break; |
133 | 133 | case 1: |
134 | 134 | $color = unpack('n', $vide . substr($data, floor($p), 1)); |
135 | 135 | switch (($p * 8) % 8) { |
136 | - case 0: $color[1] = $color[1] >> 7; break; |
|
136 | + case 0: $color[1] = $color[1] >> 7; break; |
|
137 | 137 | case 1: $color[1] = ($color[1] & 0x40) >> 6; break; |
138 | 138 | case 2: $color[1] = ($color[1] & 0x20) >> 5; break; |
139 | 139 | case 3: $color[1] = ($color[1] & 0x10) >> 4; break; |
140 | - case 4: $color[1] = ($color[1] & 0x8 ) >> 3; break; |
|
141 | - case 5: $color[1] = ($color[1] & 0x4 ) >> 2; break; |
|
142 | - case 6: $color[1] = ($color[1] & 0x2 ) >> 1; break; |
|
143 | - case 7: $color[1] = ($color[1] & 0x1 ); break; |
|
140 | + case 4: $color[1] = ($color[1] & 0x8) >> 3; break; |
|
141 | + case 5: $color[1] = ($color[1] & 0x4) >> 2; break; |
|
142 | + case 6: $color[1] = ($color[1] & 0x2) >> 1; break; |
|
143 | + case 7: $color[1] = ($color[1] & 0x1); break; |
|
144 | 144 | } |
145 | - $color[1] = $palette[ $color[1] + 1 ]; |
|
145 | + $color[1] = $palette[$color[1] + 1]; |
|
146 | 146 | break; |
147 | 147 | default: |
148 | 148 | throw new RuntimeException(sprintf('Unsupported number of bits (%s) for [%s] ', $meta['bits'], $filepath)); |
@@ -9,7 +9,6 @@ |
||
9 | 9 | class DateFormatterFactory |
10 | 10 | { |
11 | 11 | /** |
12 | - * @param string $customFormat |
|
13 | 12 | * |
14 | 13 | * @return DateFormatterInterface |
15 | 14 | */ |
@@ -7,7 +7,7 @@ |
||
7 | 7 | abstract class AbstractGraphicPrimitiveRenderer extends AbstractRenderer |
8 | 8 | { |
9 | 9 | /** |
10 | - * @return int |
|
10 | + * @return double |
|
11 | 11 | */ |
12 | 12 | protected function getLineWeight() |
13 | 13 | { |
@@ -36,7 +36,7 @@ |
||
36 | 36 | |
37 | 37 | $fontPath = $fontResolver($this->getFontFace()); |
38 | 38 | |
39 | - $fontCallback = function ($font) use ($fontPath) { |
|
39 | + $fontCallback = function($font) use ($fontPath) { |
|
40 | 40 | $font->file($fontPath); |
41 | 41 | $font->size($this->getFontSize()); |
42 | 42 | $font->color('#fff'); |