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