Could Be A Constant

Those literals are assigned then compared somewhere else in the code. When those literals are carrying a state, it is recommended to assign them to a constant, to ensure that both parts of the application use the same values..

LiteralAssignationsComparisons
10
  • $options['http']['timeout'] = 10
  • $this->maxJobs = 10
  • $countChanges > 10
  • $permission['access_level'] > 10
  • 10 > $rate['remaining']
100
  • $perPage = 100
  • 100 !== $progression
3
  • $retries = 3
  • $attributes['retries'] >= 3
  • $index < 3
4
  • $attributes['ipResolve'] = 4
  • $attributes['ipResolve'] === 4
  • $size === 4
6
  • $attributes['ipResolve'] = 6
  • $attributes['ipResolve'] === 6
zip
  • $fileType = 'zip'
  • $fileExtension === 'zip'
tar
  • $fileType = 'tar'
  • $fileType === 'tar'
0
  • $prettyVersion = '0'
  • $version = '0'
  • $semanticVersionParts[0] === '0'
__root__
  • $config['name'] = '__root__'
  • $config['name'] !== '__root__'
  • '__root__' === $name
  • '__root__' === $realName
available
  • $type = 'available'
  • 'available' === $type
.
  • $path = '.'
  • $dirname === '.'
  • $file !== '.'
  • '.' !== $chunk
  • '.' !== $commonPath
  • '.' === $commonPath
update
  • $composerCommand = 'update'
  • $opType === 'update'
  • $type === 'update'
require
  • $composerCommand = 'require'
  • 'require' === $linkType
stable
  • $minStability = 'stable'
  • $preferredStability = 'stable'
  • $stability = 'stable'
  • $this->channel = 'stable'
  • $stability !== 'stable'
*
  • $constraint = '*'
  • $requirements[$package] = '*'
  • $match[0] === '*'
  • '*' !== $firstComponent[strlen($firstComponent) - 1]
  • '*' !== $textConstraint
  • '*' === $this->hostNames[0]
full
  • $binCompat = 'full'
  • $binCompat === "full"
/
  • $absolute = '/'
  • $pattern = '/'
  • $dir === '/'
  • '/' !== $commonPath
  • '/' === $commonPath
  • '/' === $locationHeader[0]
[
  • $str = '['
  • $hostName[0] === '['
  • $match[2] === '['
  • '[' !== $prevChar
  • '[' === $char
{}
  • $contents = '{}'
  • $contents === '{}'
platform
  • $type = 'platform'
  • $settingKey === 'platform'
guess
  • $requirement['version'] = 'guess'
  • $constraint === 'guess'
https
  • $match[1] = 'https'
  • $protocol = 'https'
  • $cloneLink['name'] === 'https'
  • $proto === 'https'
  • $scheme === 'https'
  • 'https' === $scheme
http
  • $protocol = 'http'
  • $scheme === 'http'
composer
  • $note = 'Composer'
  • $repository['type'] === 'composer'
api.github.com
  • $apiUrl = 'api.github.com'
  • $host === 'api.github.com'
github.com
  • $this->originUrl = 'github.com'
  • $domain !== 'github.com'
  • $domain === 'github.com'
  • $host === 'github.com'
  • $this->originUrl !== 'github.com'
  • 'github.com' === $origin
  • 'github.com' === $originUrl
  • 'github.com' === $this->originUrl
bitbucket.org
  • $origin = 'bitbucket.org'
  • $this->originUrl = 'bitbucket.org'
  • $host === 'bitbucket.org'
  • $job['origin'] === 'bitbucket.org'
  • $origin === 'bitbucket.org'
  • $originUrl !== 'bitbucket.org'
  • $originUrl === 'bitbucket.org'
  • 'bitbucket.org' === $origin
null
  • $res = 'null'
  • $val === 'null'
  • 'null' !== $content
trunk
  • $this->rootIdentifier = 'trunk'
  • $prettyVersion === 'trunk'