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
2
  • $i = 2
  • $index = 2
  • $result = 2
  • $this->version = 2
  • $difference > 2
  • $lines < 2
  • $numargs === 2
  • $result === 2
  • 2 === $count
300
  • $size = 300
  • $code < 300
  • $redirectCode > 300
443
  • $this->port = 443
  • $this->port === 443
999999
  • $order = 999999
  • $order >= 999999
80
  • $this->port = 80
  • $this->port === 80
1
  • $headers['ETag'] = '1'
  • $options['read_and_close'] = '1'
  • $_SERVER['HTTP_DNT'] === '1'
  • $file === '1'
asc
  • $options['order'] = 'asc'
  • $this->order_dir = 'asc'
  • $orderDir !== 'asc'
  • $order_dir !== 'asc'
copy
  • $this->_action = 'copy'
  • $this->_action === 'copy'
move
  • $this->_action = 'move'
  • $this->_action === 'move'
/
  • $input = '/'
  • $root = '/'
  • $target_path = '/'
  • $context[strlen($context) - 1] !== '/'
  • $key !== '/'
  • $normalized_url === '/'
  • $parent_route !== '/'
  • $path === '/'
  • $path[-1] !== '/'
  • $route !== '/'
  • $route === '/'
  • $this->base_url !== '/'
  • $this->path[0] !== '/'
  • $url === '/'
  • $url_path === '/'
localhost
  • $host = 'localhost'
  • $hostname = 'localhost'
  • $cookie_domain === 'localhost'
http
  • $url['scheme'] = 'http'
  • $this->scheme === 'http'
https
  • $url['scheme'] = 'https'
  • $scheme !== 'https'
  • $this->scheme === 'https'
yaml
  • $scope = 'yaml'
  • $scope === 'yaml'
grav
  • $name = 'Grav'
  • $scope = 'grav'
  • $dependency === 'grav'
  • $dependency_slug === 'grav'
  • $extension === 'grav'
  • $package === 'grav'
  • $type === 'grav'
name
  • $offset = 'name'
  • $name === 'name'
file
  • $driver_name = 'file'
  • $field['type'] === 'file'
  • $scheme === 'file'
  • $value === 'file'
all
  • $remove = 'all'
  • $remove === 'all'
  • $uppercase === 'all'
folder
  • $icon = 'folder'
  • $var = 'folder'
  • $name === 'folder'
  • $value === 'folder'
standard
  • $remove = 'standard'
  • $remove === 'standard'
themes
  • $type = 'themes'
  • $type === 'themes'
update
  • $dependencies[$dependency_slug] = 'update'
  • $questionAction = 'Update'
  • $type === 'update'
install
  • $action = 'install'
  • $dependencies[$dependency_slug] = 'install'
  • $questionAction = 'Install'
  • $verb = 'install'
  • $type === 'install'
storage_key
  • $keyField = 'storage_key'
  • $keyFieldFind = 'storage_key'
  • $field === 'storage_key'
  • $keyField !== 'storage_key'
  • $keyField === 'storage_key'
  • $name === 'storage_key'
  • $this->keyField !== 'storage_key'
127.0.0.1
  • $this->ip = '127.0.0.1'
  • $this->host === '127.0.0.1'
.
  • $this->nestedSeparator = '.'
  • $file[0] === '.'
  • $folder === '.'
  • $k[0] === '.'
  • $parentKey === '.'
  • $part === '.'
  • $path !== '.'
  • $path === '.'
  • $segment === '.'
  • '.' !== $dirname
guess
  • $this->format = 'guess'
  • $this->format === 'guess'
  • $type === 'guess'
alternative
  • $type = 'alternative'
  • $type === 'alternative'
text
  • $field['type'] = 'text'
  • $field['type'] === 'text'
create
  • $action = 'create'
  • $action === 'create'
get
  • $server['REQUEST_METHOD'] = 'GET'
  • $method !== 'GET'
success
  • $status = 'success'
  • $this->status = 'success'
  • $this->status === 'success'
ignore
  • $dependencies[$dependency_slug] = 'ignore'
  • $property !== 'ignore'
  • $property === 'ignore'
  • $validateOptions === 'ignore'
*
  • $currently_stored_version_number = '*'
  • $currently_stored_version_number === '*'
  • $dependencyVersion !== '*'
  • $key === '*'
  • $string !== '*'
  • $type === '*'
  • $value === '*'
  • $version === '*'
page
  • $icon = 'page'
  • $type === 'page'