@param string $class1String
@param string $class2String
@param boolean $bidirectional
@param boolean $isInverse
@param string $class2SideName
@param integer $class2Count
@param string $class1SideName
@param integer $class1Count

@return string
513860
public function makeDoubleSidedLinkString(
        $class1String,
        $class2String,
        $bidirectional,
        $isInverse,
        $class2SideName,
        $class2Count,
        $class1SideName,
        $class1Count
    ) {
        return $class1String . $this->getLeftArrow($isInverse, $bidirectional)
        . ($class2SideName ? $class2SideName . ' ' . $this->getCountSide($class2Count) : '')
        . '-' . $class1SideName . ' ' . $this->getCountSide($class1Count)
        . $this->getRightArrow($isInverse, $bidirectional) . $class2String;
    }
1191315
private static function _extractClassName($cls)
    {
        $tokens = preg_split("/\\\\/", $cls);
        $size   = sizeof($tokens);
        if ($size < 2) {
            return $cls;
        }
        return $tokens[$size-1];
    }
743551
public function toPhpString(
        $namespace,
        array $aliased_classes,
        $this_class,
        $php_major_version,
        $php_minor_version
    ) {
        return parent::toNamespacedString($namespace, $aliased_classes, $this_class, false);
    }
564983
function convertToClassName($pString)
    {
        // strip off the forward slash and extension.
        $className = \basename($pString, '.php');

        // Camel Case any words left.
        $className = $this->camelCase($className, TRUE);

        return $className;
    }
575383
private function getDestinationClass() {
        if(empty($this->record) || $this->record===false) {
            return false;
        }
        
        $convertToClass=false;
        
        if(class_exists($this->record->DestinationClass) && is_subclass_of($this->record->DestinationClass, 'SiteTree')) {
            $convertToClass=$this->record->DestinationClass;
        }else {
            $parentClasses=array_reverse(ClassInfo::dataClassesFor($this->record->ClassName));
            unset($parentClasses[$this->record->ClassName]);
            unset($parentClasses['KapostObject']);
        
            if(count($parentClasses)>0) {
                foreach($parentClasses as $class) {
                    $sng=singleton($class);
                    if(class_exists($sng->DestinationClass) && is_subclass_of($sng->DestinationClass, 'SiteTree')) {
                        $convertToClass=$sng->DestinationClass;
                        break;
                    }
                }
        
                if(isset($sng)) {
                    unset($sng);
                }
            }
        }
        
        return $convertToClass;
    }
701261
public static function stringToClassName($str, $methodIncluded = true, $separator = ':')
	{
        $classParts = explode($separator, $str);

        $returnValue = new \stdClass();

		if($methodIncluded === true)
            $returnValue->methodName = array_pop($classParts);

        $returnValue->className = implode('\\', $classParts);

        return $returnValue;
    }
103106
protected function pStmt_Class(Class_ $class): string
    {
        $shouldReindex = false;

        foreach ($class->stmts as $key => $stmt) {
            if ($stmt instanceof TraitUse) {
                // remove empty ones
                if (count($stmt->traits) === 0) {
                    unset($class->stmts[$key]);
                    $shouldReindex = true;
                }
            }
        }

        if ($shouldReindex) {
            $class->stmts = array_values($class->stmts);
        }

        return parent::pStmt_Class($class);
    }
870639
public function getClass_v2() {
		$class = new StdClass;
		$class->name1 = $this->getName();

		$class->Communication = new StdClass;
		if($this->getPhone() !== null)
			$class->Communication->phone = $this->getPhone();
		if($this->getEmail() !== null)
			$class->Communication->email = $this->getEmail();
		if($this->getContactPerson() !== null)
			$class->Communication->contactPerson = $this->getContactPerson();

		$class->Packstation = new StdClass;
		$class->Packstation->postNumber = $this->getPostNumber();
		$class->Packstation->packstationNumber = $this->getPackStationNumber();
		$class->Packstation->zip = $this->getZip();
		$class->Packstation->city = $this->getLocation();

		if($this->getCountryISOCode() !== null) {
			$class->Packstation->Origin = new StdClass;

			if($this->getCountry() !== null)
				$class->Packstation->Origin->country = $this->getCountry();

			$class->Packstation->Origin->countryISOCode = $this->getCountryISOCode();

			if($this->getState() !== null)
				$class->Packstation->Origin->state = $this->getState();
		}

		return $class;
	}
969115
public static function getNamespaceBackwards($class, $backwards = 3)
    {
        if (!is_string($class)) {
            $class = get_class($class);
        }

        $class = explode('\\', $class);

        foreach (range(1, $backwards) as $i) {
            array_pop($class);
        }

        return implode('\\', $class);
    }
1323713
protected static function __classSort(ClassReflection $a, ClassReflection $b)
    {
        if ($a->getSort() > $b->getSort()) {
            return -1;
        }
        if ($a->getSort() < $b->getSort()) {
            return 1;
        }
        return 0;
    }
653461
protected function fixClassToThis(File $phpCsFile, int $classNameIndex, array $parts, string $appendix, array $returnTypes): void
    {
        $ownClassName = '\\' . $this->getClassName($phpCsFile);

        $result = [];
        foreach ($parts as $key => $part) {
            if ($part !== $ownClassName) {
                continue;
            }

            $parts[$key] = '$this';
            $result[$part] = '$this';
        }

        if (!$result) {
            return;
        }

        $isFluentInterfaceMethod = $returnTypes === ['$this'];
        if (!$isFluentInterfaceMethod) {
            return;
        }

        $message = [];
        foreach ($result as $part => $useStatement) {
            $message[] = $part . ' => ' . $useStatement;
        }

        $fix = $phpCsFile->addFixableError(implode(', ', $message), $classNameIndex, 'ClassVsThis');
        if ($fix) {
            $newContent = implode('|', $parts);
            $phpCsFile->fixer->replaceToken($classNameIndex, $newContent . $appendix);
        }
    }
116548
public static function doubleReverse($arg1, $reverse1, $reverse2, $scale = null) : string {
		if ($reverse1) {
			$arg1 = self::opposite($arg1, $scale);
		}
		if ($reverse2) {
			$arg1 = self::opposite($arg1, $scale);
		}
		return $arg1;
	}
1038105
private function classNameMatchesFileName(string $filename, string $className): bool
    {
        return strpos($filename, $className) !== false
            || strpos($filename, $this->invertSlashes($className)) !== false;
    }
228436
public static String getMessage(final Class class1, final String string, final String compName) {
		return JKMessage.get(string, compName);
	}
880165
static function createClassFilteringSQLString( $classFilterType, &$classFilterArray )
    {
        // Check for class filtering
        $classCondition = '';

        if ( isset( $classFilterType ) &&
             ( $classFilterType == 'include' || $classFilterType == 'exclude' ) &&
             count( $classFilterArray ) > 0 )
        {
            $classCondition = '  ';
            $i = 0;
            $classCount = count( $classFilterArray );
            $classIDArray = array();
            foreach ( $classFilterArray as $classID )
            {
                $originalClassID = $classID;
                // Check if classes are recerenced by identifier
                if ( is_string( $classID ) && !is_numeric( $classID ) )
                {
                    $classID = eZContentClass::classIDByIdentifier( $classID );
                }
                if ( is_numeric( $classID ) )
                {
                    $classIDArray[] = $classID;
                }
                else
                {
                    eZDebugSetting::writeWarning( 'kernel-content-class', "Invalid class identifier in subTree() classfilterarray, classID : " . $originalClassID );
                }
            }

            if ( count( $classIDArray ) > 0  )
            {
                $classCondition .= " ezcontentobject.contentclass_id ";
                if ( $classFilterType == 'include' )
                    $classCondition .= " IN ";
                else
                    $classCondition .= " NOT IN ";

                $classIDString =  implode( ', ', $classIDArray );
                $classCondition .= ' ( ' . $classIDString . ' ) AND';
            }
            else
            {
                if ( count( $classIDArray ) == 0 and count( $classFilterArray ) > 0 and $classFilterType == 'include' )
                {
                    $classCondition = false;
                }
            }
        }

        return $classCondition;
    }
507169
private function getShortClassName($className)
    {
        if (false !== ($pos = strrpos($className, '\\'))) {
            return substr($className, $pos + 1);
        }

        return $className;
    }
279753
public function toPhpString(
        $namespace,
        array $aliased_classes,
        $this_class,
        $php_major_version,
        $php_minor_version
    ) {
        $nullable = false;

        if (!$this->isSingleAndMaybeNullable()
            || $php_major_version < 7
            || (isset($this->types['null']) && $php_minor_version < 1)
        ) {
            return null;
        }

        $types = $this->types;

        if (isset($types['null'])) {
            unset($types['null']);

            $nullable = true;
        }

        if (!$types) {
            return null;
        }

        $atomic_type = array_values($types)[0];

        $atomic_type_string = $atomic_type->toPhpString(
            $namespace,
            $aliased_classes,
            $this_class,
            $php_major_version,
            $php_minor_version
        );

        if ($atomic_type_string) {
            return ($nullable ? '?' : '') . $atomic_type_string;
        }

        return null;
    }