@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | public function align(Command $command) |
| 15 | 15 | { |
| 16 | 16 | /** @var Command|Alignable $command */ |
| 17 | - if ($command->getAnchor() && ! $command->getAnchor()->equals(Anchor::SOUTHWEST())) { |
|
| 17 | + if ($command->getAnchor() && !$command->getAnchor()->equals(Anchor::SOUTHWEST())) { |
|
| 18 | 18 | $anchor = $command->getAnchor()->getValue(); |
| 19 | 19 | |
| 20 | 20 | $newAnchor = $anchor + 6; |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | public function resetAlign(Command $command) |
| 31 | 31 | { |
| 32 | 32 | /** @var Command|Alignable $command */ |
| 33 | - if ($command->getAnchor() && ! $command->getAnchor()->equals(Anchor::SOUTHWEST())) { |
|
| 33 | + if ($command->getAnchor() && !$command->getAnchor()->equals(Anchor::SOUTHWEST())) { |
|
| 34 | 34 | yield 'AN '.Fingerprint::DEFAULT_ANCHOR; |
| 35 | 35 | } |
| 36 | 36 | } |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | { |
| 16 | 16 | /** @var Command|Rotatable $command */ |
| 17 | 17 | |
| 18 | - if (! $command->getRotation()->equals(Angle::_0())) { |
|
| 18 | + if (!$command->getRotation()->equals(Angle::_0())) { |
|
| 19 | 19 | yield \sprintf('DIR %d', $command->getRotation()->getValue() + 1); |
| 20 | 20 | } |
| 21 | 21 | } |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | public function resetRotate(Command $command) |
| 24 | 24 | { |
| 25 | 25 | /** @var Command|Rotatable $command */ |
| 26 | - if (! $command->getRotation()->equals(Angle::_0())) { |
|
| 26 | + if (!$command->getRotation()->equals(Angle::_0())) { |
|
| 27 | 27 | yield 'DIR '.Fingerprint::DEFAULT_DIRECTION; |
| 28 | 28 | } |
| 29 | 29 | } |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | yield \sprintf('BM %d', Fingerprint::DEFAULT_BARCODE_MAGNIFICATION); |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | - if (! $command->isReadable()) { |
|
| 68 | + if (!$command->isReadable()) { |
|
| 69 | 69 | yield 'BF ON'; |
| 70 | 70 | } |
| 71 | 71 | } |
@@ -118,7 +118,7 @@ |
||
| 118 | 118 | { |
| 119 | 119 | $this->lastError = null; |
| 120 | 120 | |
| 121 | - \set_error_handler(function ($severity, $message, $file, $line) { |
|
| 121 | + \set_error_handler(function($severity, $message, $file, $line) { |
|
| 122 | 122 | $this->lastError = \compact('severity', 'message', 'file', 'line'); |
| 123 | 123 | }); |
| 124 | 124 | } |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | |
| 47 | 47 | $instructions[] = $this->language->translatePrint($copies); |
| 48 | 48 | |
| 49 | - $payload = \array_reduce($instructions, static function ($carry, $item) { |
|
| 49 | + $payload = \array_reduce($instructions, static function($carry, $item) { |
|
| 50 | 50 | return $item instanceof \Generator |
| 51 | 51 | ? \array_merge($carry, \iterator_to_array($item, false)) |
| 52 | 52 | : \array_merge($carry, $item); |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | private function scan(): \Generator |
| 41 | 41 | { |
| 42 | 42 | foreach ((new \ImagickPixelIterator($this->image)) as $y => $line) { |
| 43 | - $buffer = \array_reduce($line, static function ($carry, $pixel) { |
|
| 43 | + $buffer = \array_reduce($line, static function($carry, $pixel) { |
|
| 44 | 44 | $color = $pixel->getColor(); |
| 45 | 45 | |
| 46 | 46 | $carry[] = 1 - ((int) (($color['r'] + $color['g'] + $color['b']) / 3) >> 7); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | return; |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - \array_map(static function () use (&$buffer) { |
|
| 97 | + \array_map(static function() use (&$buffer) { |
|
| 98 | 98 | $buffer[] = self::MAX_RUN_LENGTH; |
| 99 | 99 | $buffer[] = 0; |
| 100 | 100 | }, \range(1, \intdiv($length, self::MAX_RUN_LENGTH))); |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | } elseif ($count > 1 && $count <= self::MAX_LINE_REPETITIONS) { |
| 146 | 146 | $buffer[] = $this->buildLineRepetition($line, $count); |
| 147 | 147 | } else { |
| 148 | - \array_map(function () use (&$buffer, $line) { |
|
| 148 | + \array_map(function() use (&$buffer, $line) { |
|
| 149 | 149 | $buffer[] = $this->buildLineRepetition($line, self::MAX_LINE_REPETITIONS); |
| 150 | 150 | }, \range(1, \intdiv($count, self::MAX_LINE_REPETITIONS))); |
| 151 | 151 | |
@@ -106,7 +106,7 @@ |
||
| 106 | 106 | $lines = []; |
| 107 | 107 | $lineWidth = []; |
| 108 | 108 | |
| 109 | - while(\count($words) > 0) { |
|
| 109 | + while (\count($words) > 0) { |
|
| 110 | 110 | $metrics = $this->image->queryFontMetrics($canvas, \implode(' ', \array_slice($words, 0, $i))); |
| 111 | 111 | |
| 112 | 112 | if ($metrics['textWidth'] > $this->width || \count($words) <= $i) { |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | if ($data instanceof \SplFileInfo) { |
| 54 | - if (! $data->isReadable()) { |
|
| 54 | + if (!$data->isReadable()) { |
|
| 55 | 55 | throw new \RuntimeException(); |
| 56 | 56 | } |
| 57 | 57 | |