# woocommerce-pos/1.10.7/vendor_prefixed/picqer/php-barcode-generator/src/BarcodeBar.php

WCPOS – Point of Sale (POS) plugin for WooCommerce, version 1.10.7. 37 lines.

- Page: https://pluginprobe.com/plugins/woocommerce-pos/1.10.7/code/vendor_prefixed/picqer/php-barcode-generator/src/BarcodeBar.php
- Raw: https://pluginprobe.com/plugins/woocommerce-pos/1.10.7/raw/vendor_prefixed/picqer/php-barcode-generator/src/BarcodeBar.php
- Modified: 2026-06-09T13:55:26+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/woocommerce-pos/1.10.7/code/vendor_prefixed/picqer/php-barcode-generator/src/BarcodeBar.php#L10-L20`.

```php
<?php

namespace WCPOS\Vendor\Picqer\Barcode;

class BarcodeBar
{
    protected $width;
    protected $height;
    protected $positionVertical;
    protected $type;
    const TYPE_BAR = 1;
    const TYPE_SPACING = 0;
    public function __construct(int $width, int $height, bool $drawBar = \true, int $positionVertical = 0)
    {
        $this->width = $width;
        $this->height = $height;
        $this->positionVertical = $positionVertical;
        $this->type = $drawBar ? self::TYPE_BAR : self::TYPE_SPACING;
    }
    public function getWidth() : int
    {
        return $this->width;
    }
    public function getHeight() : int
    {
        return $this->height;
    }
    public function getPositionVertical() : int
    {
        return $this->positionVertical;
    }
    public function isBar() : bool
    {
        return $this->type === self::TYPE_BAR;
    }
}

```
