Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DiffElem.php

class DiffElem

Same name in this branch
  1. 11.1.x vendor/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php \PhpParser\Internal\DiffElem

Inspired by https://github.com/nikic/PHP-Parser/tree/36a6dcd04e7b0285e8f0868f44bd49…

Copyright (c) 2011, Nikita Popov All rights reserved.

Implements the Myers diff algorithm.

@internal

Hierarchy

  • class \PHPStan\PhpDocParser\Printer\DiffElem

Expanded class hierarchy of DiffElem

File

vendor/phpstan/phpdoc-parser/src/Printer/DiffElem.php, line 15

Namespace

PHPStan\PhpDocParser\Printer
View source
class DiffElem {
    public const TYPE_KEEP = 0;
    public const TYPE_REMOVE = 1;
    public const TYPE_ADD = 2;
    public const TYPE_REPLACE = 3;
    
    /** @var self::TYPE_* */
    public $type;
    
    /** @var mixed Is null for add operations */
    public $old;
    
    /** @var mixed Is null for remove operations */
    public $new;
    
    /**
     * @param self::TYPE_* $type
     * @param mixed $old Is null for add operations
     * @param mixed $new Is null for remove operations
     */
    public function __construct(int $type, $old, $new) {
        $this->type = $type;
        $this->old = $old;
        $this->new = $new;
    }

}

Members

Title Sort descending Modifiers Object type Summary
DiffElem::$new public property @var mixed Is null for remove operations
DiffElem::$old public property @var mixed Is null for add operations
DiffElem::$type public property @var self::TYPE_*
DiffElem::TYPE_ADD public constant
DiffElem::TYPE_KEEP public constant
DiffElem::TYPE_REMOVE public constant
DiffElem::TYPE_REPLACE public constant
DiffElem::__construct public function *

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal