Returns the factor for a given source-to-target couple.

@param string $source
@param string $target

@return int|null
557769
public static function getFactor($source, $target)
    {
        $source = self::standardizeUnit($source);
        $target = self::standardizeUnit($target);
        $factors = static::getFlipCascadeFactors();
        if (isset($factors[$source])) {
            [$to, $factor] = $factors[$source];
            if ($to === $target) {
                return $factor;
            }
        }

        return null;
    }
959138
protected function mergeBindings(array &$target, array $source)
    {
        $targetBindingsAmount = count($target);
        $sourceBindingsIndex = 0;

        foreach ($source as $name => $value) {
            $key = is_int($name) ? $targetBindingsAmount + $sourceBindingsIndex : $name;
            $target[$key] = $value;
            $sourceBindingsIndex += 1;
        }
    }
464239
protected function createLink($source, $target)
    {
        $success = $this->filesystem->relativeSymlink($source, $target);
        if (!$success) {
            throw new RuntimeException("Could not create symlink at $target");
        }
    }
240515
public static int countIgnoreCase(final String source, final String target) {

    if (isEmpty(source) || isEmpty(target)) {
      return 0;
    }
    return count(source.toLowerCase(), target.toLowerCase());
  }
157214
public function withContext(RelationContext $source, RelationContext $target = null): self
    {
        $definition = clone $this;
        $definition->sourceContext = $source;
        $definition->targetContext = $target;

        return $definition;
    }
196895
public function canConvertFrom($source, $targetType)
    {
        $identifier = $this->persistenceManager->getIdentifierByObject($source);
        return ($identifier !== null);
    }
1110691
protected function _parseExtensionDef($target)
    {
        $paths = array();
        if (!empty($target['paths'])) {
            $paths = array_map(array($this, '_replacePathConstants'), (array)$target['paths']);
        }
        $target['paths'] = $paths;
        if (!empty($target['cachePath'])) {
            $path = $this->_replacePathConstants($target['cachePath']);
            $target['cachePath'] = rtrim($path, '/') . '/';
        }
        return $target;
    }
279039
public function copy($target) {
        if (!parent::copy($target))
            return false;
        return copy($this->fileSource, $target);
    }
925963
public static function dataGet( $target, $key, $default = NULL )
    {
        if ( is_null( $key ) ) return $target;

        foreach ( explode( '.', $key ) as $segment )
        {
            if ( is_array( $target ) )
            {
                if ( !array_key_exists( $segment, $target ) )
                {
                    return static::value( $default );
                }

                $target = $target[ $segment ];
            }
            elseif ( is_object( $target ) )
            {
                if ( !isset( $target->{$segment} ) )
                {
                    return static::value( $default );
                }

                $target = $target->{$segment};
            }
            else
            {
                return static::value( $default );
            }
        }

        return $target;
    }
885429
public function detectCrossAge($source, $target)
    {
        $source_image = self::encode($source);
        $target_image = self::encode($target);

        return Request::exec(self::DETECT_CROSS_AGE, compact('source_image', 'target_image'));
    }
356035
public function getEdgeValue( $source, $target )
	{
		$value = 0;
		if( $this->isEdge( $source, $target ) )
		{
			$edge	= $this->getEdge( $source, $target );
			$value	= $edge->getEdgeValue();
		}
		return $value;
	}
959821
private function copyThenRemove($source, $target)
    {
        if (!is_dir($source)) {
            copy($source, $target);
            $this->unlink($source);

            return;
        }

        $it = new RecursiveDirectoryIterator($source, RecursiveDirectoryIterator::SKIP_DOTS);
        $ri = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::SELF_FIRST);
        $this->ensureDirectoryExists($target);

        foreach ($ri as $file) {
            $targetPath = $target.DIRECTORY_SEPARATOR.$ri->getSubPathName();
            if ($file->isDir()) {
                $this->ensureDirectoryExists($targetPath);
            } else {
                copy($file->getPathname(), $targetPath);
            }
        }

        $this->removeDirectoryPhp($source);
    }
328615
public static function create($source, $target)
    {
        $message = sprintf('Dependency `%s` not found, required by `%s`', $target, $source);
        $exception = new static($message, 0, null, $source, $target);

        return $exception;
    }
1253707
public function getFile( $fileName, $target = "" )
	{
		$this->connection->checkConnection();
		if( !$target )
			$target	= $fileName;
		return @ftp_get( $this->connection->getResource(), $target, $fileName, $this->connection->mode );
	}
127623
protected function mapJoinTable(array $target = [], array $source = [])
    {
        $joinTable['name'] = $target['name'];

        if ($this->hasJoinColumns($target)) {
            $joinTable['joinColumns'] = $this->mapJoinColumns(
                $target['joinColumns'],
                $source['joinColumns']
            );
        }

        if ($this->hasInverseJoinColumns($target)) {
            $joinTable['inverseJoinColumns'] = $this->mapJoinColumns(
                $target['inverseJoinColumns'],
                $source['inverseJoinColumns']
            );
        }

        return $joinTable;
    }
1175401
public function copy($target, $source)
    {
        if (!$this->exists($target)) {
            throw new \RuntimeException("$target does not exist.", E_ERROR);
        }

        if (!$this->exists($source)) {
            $this->makeDirectory(dirname($source), true);
        }

        return file_put_contents($source, $this->get($target));
    }
1164142
public static function copy(String $source, String $target) : Bool
    {
        return Filesystem::copy(Info::rpath($source), Info::rpath($target));
    }