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
6
  • $i = 6
  • $i <= 6
3
  • $cols_count = 3
  • $i = 3
  • $rows = 3
  • $this->yyerrcnt = 3
  • $currencyFormat == 3
  • $currencyFormat === 3
2
  • $decimalPlaces = 2
  • $i = 2
  • $opts[\CURLOPT_MAXREDIRS] = 2
  • $opts[\CURLOPT_SSL_VERIFYHOST] = 2
  • $startingRowNumber = 2
  • $i <= 2
  • $index < 2
  • $letters >= 2
4
  • $compiler->known_modifier_type[$modifier] = 4
  • $i = 4
  • $params[1] = 4
  • $quarter = 4
  • $extra < 4
  • $fiscalFirstMonth < 4
  • $n !== 4
500
  • $statusCode = 500
  • $code < 500
  • $status < 500
100
  • $lifetime = 100
  • $min = 100
  • $itemProbability === 100
  • $lastStageProbability !== 100
  • $probabilityMap[$stage] == 100
  • $value == 100
200
  • $limit = 200
  • $code >= 200
  • $httpCode !== 200
  • $r['code'] == 200
  • $response['code'] == 200
%02d
  • $day_format = "%02d"
  • $hour_format = '%02d'
  • $hour_value_format = '%02d'
  • $minute_format = '%02d'
  • $minute_value_format = '%02d'
  • $second_format = '%02d'
  • $second_value_format = '%02d'
  • $day_format == '%02d'
  • $day_value_format == '%02d'
  • $hour_format == '%02d'
  • $hour_value_format == '%02d'
  • $minute_format == '%02d'
  • $minute_value_format == '%02d'
  • $second_format == '%02d'
  • $second_value_format == '%02d'
\n
  • $field_separator = "\n"
  • $option_separator = "\n"
  • $wrap_char = "\n"
  • $s == "\n"
  • $string[$i] === "\n"
  • $token == "\n"
  • $compiled_ref = ' '
  • $indent_char = ' '
  • $modifiedString[$i + 1] = ' '
  • $modifiedString[$i] = ' '
  • $string[$i + 1] = ' '
  • $string[$i] = ' '
  • $char !== ' '
  • $value == ' '
right
  • $hdir = 'right'
  • $hdir == 'right'
down
  • $vdir = 'down'
  • $counter['direction'] == "down"
  • $vdir == 'down'
,
  • $cycle_vars[$name]['delimiter'] = ','
  • $functionContent[$i] === ','
cols
  • $inner = 'cols'
  • $inner != 'cols'
%m
  • $month_value_format = "%m"
  • $month_format == "%m"
  • $month_value_format == "%m"
global
  • $clone->scope = 'Global'
  • $_attr['scope'] == 'global'
  • $scope !== 'Global'
  • $scope == 'global'
  • $scope === 'Global'
false
  • $_filter = 'false'
  • $_nocache = 'false'
  • $params[3] = 'false'
  • $results = 'false'
  • $this->_retvalue = 'false'
  • $_SESSION['install']['outboundEmailIsShared'] == 'false'
  • $_SESSION['install']['smtpAuth'] == 'false'
  • $_attr['once'] == 'false'
  • $expression === 'false'
true
  • $_filter = 'true'
  • $_nocache = 'true'
  • $results = 'true'
  • $this->_retvalue = 'true'
  • $checkResult !== 'true'
  • $expression === 'true'
  • $params[1] != 'true'
  • $shellResult !== 'true'
  • $value === 'true'
{
  • $smarty->left_delimiter = '{'
  • $char === '{'
  • $value === '{'
}
  • $smarty->right_delimiter = '}'
  • $char === '}'
  • $value === '}'
null
  • $_cache_lifetime = 'null'
  • $_filepath = 'null'
  • $_nocache = 'null'
  • $results = 'null'
  • $section = 'null'
  • $this->_retvalue = 'null'
  • $value = 'null'
  • $_script != 'null'
  • $expression === 'null'
<
  • $this->_retvalue = '<'
  • $inReplyTo[0] !== '<'
  • $messageId[0] !== '<'
asc
  • $order = 'ASC'
  • $ormMetadata[$entityType]['collection']['order'] = 'ASC'
  • $result['order'] = 'ASC'
  • $collectionItem->order === 'asc'
  • $data['sortDirection'] === 'asc'
dayofweek
  • $function = 'DAYOFWEEK'
  • $type === 'dayOfWeek'
minute
  • $function = 'MINUTE'
  • $type === 'minute'
hour
  • $function = 'HOUR'
  • $type === 'hour'
month
  • $function = 'MONTH'
  • $type === 'month'
attachment
  • $disposition = 'attachment'
  • $foreignEntityType !== 'Attachment'
portal
  • $userFields['type'] = 'portal'
  • $folders[count($folders) - 2] === 'portal'
id
  • $idPart = 'id'
  • $orderBy = 'id'
  • $attribute == 'id'
  • $attribute === 'id'
  • $field === 'id'
  • $name == 'id'
  • $name === 'id'
  • $order !== 'id'
  • $orderBy !== 'id'
  • $sortBy != 'id'
match_boolean
  • $function = 'MATCH_BOOLEAN'
  • $function === 'MATCH_BOOLEAN'
0
  • $a[2] = '0'
  • $r = '0'
  • $argumentPartList[1] === '0'
  • $internalPart !== '0'
  • $subject !== '0'
  • $value !== '0'
or
  • $logicalOperator = 'OR'
  • $left === 'OR'
in
  • $operatorKey = 'IN'
  • $operator === 'IN'
days
  • $intervalType = 'days'
  • $intervalType === 'days'
base
  • $type = 'base'
  • $fieldParams['type'] == 'base'
text/plain
  • $messageType = 'text/plain'
  • $messageType === 'text/plain'
contacts
  • $link = 'contacts'
  • $relationName === 'contacts'
unique
  • $obj->params['type'] = 'unique'
  • $type === 'unique'
_
  • $modifiedString[$i] = '_'
  • $name[3] !== '_'
local
  • $scope = 'local'
  • $scope == 'local'
nocache
  • $code = 'nocache'
  • $name == 'nocache'
prepend
  • $compiler->template->block_data[$name1]['mode'] = 'prepend'
  • $compiler->template->block_data[$_name]['mode'] == 'prepend'
  • $compiler->template->block_data[$name1]['mode'] == 'prepend'
append
  • $compiler->template->block_data[$name1]['mode'] = 'append'
  • $compiler->template->block_data[$_name]['mode'] == 'append'
  • $compiler->template->block_data[$name1]['mode'] == 'append'