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
200
  • $total = 200
  • $status < 200
2
  • $curlOptions[CURLOPT_SSL_VERIFYHOST] = 2
  • $i = 2
  • $precision = 2
  • $i < 2
  • $numParts === 2
4
  • $i = 4
  • $bitsPerCharacter !== 4
  • $i < 4
3
  • $config['uri_segment'] = 3
  • $i = 3
  • $page = 3
  • $count === 3
  • $i >= 3
  • $numParts === 3
  • 3 !== $i
100
  • $config['max_size'] = 100
  • $code < 100
  • $quality === 100
10
  • $attempts = 10
  • $config['per_page'] = 10
  • $i < 10
  • $i <= 10
  • $len > 10
1024
  • $config['max_width'] = 1024
  • $bytes < 1024
  • $value < 1024
32
  • $length = 32
  • $ascii === 32
  • $sidLength !== 32
"
  • $enclosure = '"'
  • $item[0] === '"'
  • $this->db->escapeChar !== '"'
  • $this->db->escapeChar === '"'
  • $this->escapeChar !== '"'
  • '"' === $token
value
  • $_SESSION['item'] = 'value'
  • $key === 'value'
,
  • $delimiter = ','
  • $separator = ','
  • ',' === $token[0]
\r\n
  • $newline = "\r\n"
  • $this->CRLF === "\r\n"
name
  • $fieldName = 'name'
  • $key = 'name'
  • $key === 'name'
8.1
  • $minPhpVersion = '8.1'
  • $v >= '8.1'
id
  • $primaryKey = 'id'
  • $sortField = 'id'
  • $fields === 'id'
  • $endPartOutput = ' '
  • $extent = ' '
  • $firstPartOutput = ' '
  • $separator = ' '
  • $token[1] = ' '
  • $str[3] === ' '
b
  • $symbolic = 'b'
  • $typeflag = 'b'
  • 'b' === $quote
-
  • $symbolic = '-'
  • $typeflag = '-'
  • $timezone[0] === '-'
  • '-' !== $tzn[0]
null
  • $this->default = 'null'
  • $field->default === 'NULL'
  • $val === 'null'
  • 'null' === $type
utf-8
  • $encoding = 'UTF-8'
  • $this->charset === 'UTF-8'
  • 'UTF-8' === $this->encoding
mail
  • $this->protocol = 'mail'
  • $protocol === 'mail'
  • $this->protocol === 'mail'
file
  • $data['type'] = 'file'
  • $typename = 'File'
  • $config->handler !== 'file'
  • 'file' === $key
/
  • $uri = '/'
  • $basePath !== '/'
  • $config['host'][0] === '/'
  • $from !== '/'
  • $indexPageRoutePath === '/'
  • $key === '/'
  • $match[1] === '/'
  • $output !== '/'
  • $path !== '/'
  • $path === '/'
  • $relativePath === '/'
  • $route === '/'
  • $routeKey === '/'
  • $routePath !== '/'
  • $routePath === '/'
  • $routePath[0] !== '/'
  • $routePath[0] === '/'
  • $routeWithoutController === '/'
  • $this->hostname[0] === '/'
  • $this->path !== '/'
  • $this->routePath === '/'
  • $uri !== '/'
  • $uri === '/'
  • $url['path'][0] === '/'
  • '/' === $this->uri[0]
old
  • $_SESSION['__ci_vars'][$key] = 'old'
  • $value === 'old'
[internal function]
  • $line['file'] = '[internal function]'
  • $frame['file'] !== '[internal function]'
=
  • $escape = '='
  • $match[1][0] === '='
sqlite3
  • $config->{$group}['DBDriver'] = 'SQLite3'
  • $this->db->DBDriver === 'SQLite3'
primary
  • $obj->type = 'PRIMARY'
  • $type = 'PRIMARY'
  • $index->type !== 'PRIMARY'
  • $index->type === 'PRIMARY'
  • $index['Key_name'] === 'PRIMARY'
  • $index['type'] === 'primary'
  • $indexData->type === 'PRIMARY'
  • $key->type === 'PRIMARY'
  • $name === 'primary'
  • $row->indextype === 'PRIMARY'
default
  • $values[$arrayKey][$key] = 'DEFAULT'
  • $group === 'default'
[
  • $newTokens[$i][1] = '['
  • '[' !== $var[0]
integer
  • $attributes['TYPE'] = 'INTEGER'
  • 'integer' === $this->type
  • 'integer' === $type
]
  • $newTokens[$i] = ']'
  • ']' === $last[0]
txt
  • $prefs['format'] = 'txt'
  • $prefs['format'] === 'txt'
entity
  • $this->component = 'Entity'
  • $return === 'entity'
controller
  • $extends = 'Controller'
  • $this->component = 'Controller'
  • $rest === 'controller'
  • $row['name'] === 'Controller'
  • $type === 'controller'
up
  • $method = 'up'
  • $direction === 'up'
  • $method === 'up'
config
  • $this->component = 'Config'
  • $this->directory = 'Config'
  • $component === 'config'
tests
  • $this->defaultGroup = 'tests'
  • $group === 'tests'
  • $this->groupFilter !== 'tests'
array
  • $this->tempReturnType = 'array'
  • $returnType === 'array'
  • $this->model->returnType === 'array'
  • $type === 'array'
\n
  • $form = "\n"
  • $chr !== "\n"
  • $str !== "\n"
unique
  • $type = 'UNIQUE'
  • $index->type === 'UNIQUE'
  • $key->type === 'UNIQUE'
testing
  • $_SERVER['CI_ENVIRONMENT'] = 'testing'
  • $_SERVER['CI_ENVIRONMENT'] === 'testing'
  • $env === 'testing'
stdclass
  • $className = 'stdClass'
  • $className === 'stdClass'
fulltext
  • $type = 'FULLTEXT'
  • $index['Index_type'] === 'FULLTEXT'
application/json
  • $formatMime = 'application/json'
  • $mime !== 'application/json'
  • $mime === 'application/json'
+
  • $cols = '+'
  • '+' !== $tzn[0]
write
  • static::$lastWrite = 'write'
  • static::$lastWrite !== 'write'
html
  • $escape = 'html'
  • $this->format = 'html'
  • $this->mailType !== 'html'
  • $this->mailType === 'html'
  • $type === 'html'
varchar2
  • $attributes['TYPE'] = 'VARCHAR2'
  • $processedField['type'] === 'VARCHAR2'
refresh
  • $method = 'refresh'
  • $method !== 'refresh'
text
  • $attributes['TYPE'] = 'TEXT'
  • $processedField['type'] === 'TEXT'
  • $processedField['type'] === 'text'
  • $this->mailType === 'text'
_
  • $delimiter = '_'
  • $this->method[0] === '_'
modify
  • $alterType = 'MODIFY'
  • $alterType === 'MODIFY'
hex2bin
  • $prefix = 'hex2bin'
  • $prefix === 'hex2bin'
number
  • $attributes['TYPE'] = 'NUMBER'
  • $primaryColumnType !== 'NUMBER'