This is useful in detecting the enclosing rectangle of a 'pure' barcode.

@return int[]|null
972236
public function getEnclosingRectangle() : ?array
    {
        $left = $this->width;
        $top = $this->height;
        $right = -1;
        $bottom = -1;

        for ($y = 0; $y < $this->height; ++$y) {
            for ($x32 = 0; $x32 < $this->rowSize; ++$x32) {
                $bits = $this->bits[$y * $this->rowSize + $x32];

                if (0 !== $bits) {
                    if ($y < $top) {
                        $top = $y;
                    }

                    if ($y > $bottom) {
                        $bottom = $y;
                    }

                    if ($x32 * 32 < $left) {
                        $bit = 0;

                        while (($bits << (31 - $bit)) === 0) {
                            $bit++;
                        }

                        if (($x32 * 32 + $bit) < $left) {
                            $left = $x32 * 32 + $bit;
                        }
                    }
                }

                if ($x32 * 32 + 31 > $right) {
                    $bit = 31;

                    while (0 === BitUtils::unsignedRightShift($bits, $bit)) {
                        --$bit;
                    }

                    if (($x32 * 32 + $bit) > $right) {
                        $right = $x32 * 32 + $bit;
                    }
                }
            }
        }

        $width = $right - $left;
        $height = $bottom - $top;

        if ($width < 0 || $height < 0) {
            return null;
        }

        return [$left, $top, $width, $height];
    }
403972
protected function parseTransactionCode()
    {
        $results = [];
        if (preg_match('/^:61:.*?N(.{3}).*/', $this->getCurrentTransactionData(), $results)
            && !empty($results[1])
        ) {
            return trim($results[1]);
        }
        return '';
    }
1164736
public function getReceptionCodes()
    {
        $rcLib = $this->util->getReceptionCodeLibrary();

        if ($this->unDelete) {
            return $rcLib->getTokenRestoreCodes();
        }
        if ($this->token->isCompleted()) {
            return $rcLib->getCompletedTokenDeletionCodes();
        }
        return $rcLib->getUnansweredTokenDeletionCodes();
    }
731781
public function getSegmentsExplode()
	{
		if ($this->_path === null)
			return [];

		$segments = explode('/', $this->_path);

		if (empty(end($segments)))
			array_pop($segments); // this normally indicates that the last character was a '/', which created an empty string in the last array member

		return $segments;
	}
787137
protected function get_key_from_position() {
        $keylist = array_keys($this->contextlists);
        if (isset($keylist[$this->iteratorposition])) {
            return $keylist[$this->iteratorposition];
        }

        return null;
    }
846283
public function getCodeAllowableValues()
    {
        return [
            self::CODE_INVALID_PARAMETER,
            self::CODE_MISSING_PARAMETER,
            self::CODE_OUT_OF_RANGE,
            self::CODE_CAMPAIGN_PROCESSING,
            self::CODE_CAMPAIGN_SENT,
            self::CODE_DOCUMENT_NOT_FOUND,
            self::CODE_RESELLER_PERMISSION_DENIED,
            self::CODE_NOT_ENOUGH_CREDITS,
            self::CODE_PERMISSION_DENIED,
            self::CODE_DUPLICATE_PARAMETER,
            self::CODE_DUPLICATE_REQUEST,
            self::CODE_METHOD_NOT_ALLOWED,
            self::CODE_UNAUTHORIZED,
            self::CODE_ACCOUNT_UNDER_VALIDATION,
            self::CODE_NOT_ACCEPTABLE,
        ];
    }
344077
public function getExcludedIds()
    {
        $excludedIdsString = $this->getRequest()->get('excludedIds');

        return (null !== $excludedIdsString) ? array_filter(explode(',', $excludedIdsString)) : [];
    }
589769
public function getPathInfo() {
    /** @var TokenNode $first */
    $first = $this->firstChild();
    $absolute = $first->getType() === T_NS_SEPARATOR;
    $relative = $first->getType() === T_NAMESPACE;
    $parts = $this->getParts();
    return [
      'absolute' => $absolute,
      'relative' => $relative,
      'qualified' => !$absolute && count($parts) > 1,
      'unqualified' => !$absolute && count($parts) === 1,
      'parts' => $parts,
    ];
  }
974521
protected function getRomanValues()
    {
        return [
            'M' => self::M,
            'D' => self::D,
            'C' => self::C,
            'L' => self::L,
            'X' => self::X,
            'V' => self::V,
            'I' => self::I,
        ];
    }
201585
public function getDeclareStrictTypeSequence(): array
    {
        if (self::$cachedDeclareStrictTypeTokens) {
            return self::$cachedDeclareStrictTypeTokens;
        }

        $tokens = [
            new Token([T_DECLARE, 'declare']),
            new Token('('),
            new Token([T_STRING, 'strict_types']),
            new Token('='),
            new Token([T_LNUMBER, '1']),
            new Token(')'),
            new Token(';'),
        ];

        return self::$cachedDeclareStrictTypeTokens = $tokens;
    }
910982
public function getRevScanInfo(){
        if (isset($this->_receive['ScanCodeInfo'])){
            if (!is_array($this->_receive['SendPicsInfo'])) {
                $array=(array)$this->_receive['ScanCodeInfo'];
                $this->_receive['ScanCodeInfo']=$array;
            }else {
                $array=$this->_receive['ScanCodeInfo'];
            }
        }
        if (isset($array) && count($array) > 0) {
            return $array;
        } else {
            return false;
        }
    }
1173604
public function getBoleto()
    {
        if (isset($this->data['object']) && 'transaction' === $this->data['object']) {
            if ( $this->data['boleto_url'] ) {
                $data = array(
                    'boleto_url' => $this->data['boleto_url'], 
                    'boleto_barcode' => $this->data['boleto_barcode'],
                    'boleto_expiration_date' => $this->data['boleto_expiration_date'],
                );
                return $data;
            } else {
                return null;
            }
        }
        
        return null;
    }
505233
public function findDistinct()
	{
		$a = [];
		foreach ($this->parents as $x => $r) {
			$a[$this->find($x)] = null;
		}
		return array_keys($a);
	}
643310
public static function getContribRules20()
    {
        return [
            'align_double_arrow'                        => true,
            'align_equals'                              => true,
            'combine_consecutive_unsets'                => false,
            'concat_with_spaces'                        => true,
            'ereg_to_preg'                              => false,
            'echo_to_print'                             => false,
            'dir_constant'                              => false,
            'header_comment'                            => false,
            'linebreak_after_opening_tag'               => true,
            'long_array_syntax'                         => false,
            'modernize_types_casting'                   => false,
            'no_blank_lines_before_namespace'           => false,
            'no_empty_comment'                          => true,
            'no_multiline_whitespace_before_semicolons' => false,
            'no_php4_constructor'                       => true,
            'no_short_echo_tag'                         => true,
            'no_useless_else'                           => false,
            'no_useless_return'                         => true,
            'not_operator_with_space'                   => false,
            'not_operator_with_successor_space'         => false,
            'ordered_class_elements'                    => false,
            'ordered_imports'                           => true,
            'phpdoc_order'                              => true,
            'phpdoc_property'                           => false,
            'phpdoc_var_to_type'                        => false,
            'php_unit_construct'                        => false,
            'php_unit_dedicate_assert'                  => false,
            'php_unit_strict'                           => false,
            'psr0'                                      => false,
            'random_api_migration'                      => false,
            'short_array_syntax'                        => true,
            'strict_comparison'                         => false,
            'strict_param'                              => false,
        ];
    }
376476
public function getDimensionValues()
    {
        $values = [];
        
        foreach ($this->fields as $dim => $field) {
            $values[$dim] = is_numeric($field->dataValue()) ? (int) $field->dataValue() : null;
        }
        
        return $values;
    }
248877
public function getInfo() : array
    {
        if ($this->processed === true) {
            return [
                'canvas' => [
                    'width' => $this->canvas['width'],
                    'height' => $this->canvas['height'],
                    'color' => $this->canvas['color']
                ],
                'resized-image' => [
                    'width' => $this->intermediate['width'],
                    'height' => $this->intermediate['height']
                ],
                'canvas-placement' => [
                    'x' => $this->canvas['spacing']['x'],
                    'y' => $this->canvas['spacing']['y']
                ],
                'resizer' => [
                    'maintain-aspect-ratio' => $this->intermediate['maintain_aspect'],
                    'quality' => $this->canvas['quality']
                ]
            ];
        } else {
            throw new \Exception(Helper::ERROR_CALL_GETINFO);
        }
    }
1283003
public function getViewBox()
    {
        $attr = $this->getAttribute('viewBox');
        if (empty($attr)) {
            return null;
        }

        $result = preg_split('/[\s,]+/', $attr);
        if (count($result) !== 4) {
            return null;
        }

        return array_map('floatval', $result);
    }