Showing 38 of 38 total issues
Missing class import via use statement (line '49', column '27'). Open
throw new \InvalidArgumentException(
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Avoid unused parameters such as '$ctx'. Open
protected function _getOrderedTerms(ValueAwareInterface $ctx = null)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
The variable $_term is not named in camelCase. Open
protected function _setTerms(array $terms)
{
$this->_clearTerms();
foreach ($terms as $_index => $_term) {
if (!$_term instanceof EvaluableInterface) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $_next is not named in camelCase. Open
protected function _eval(ValueAwareInterface $ctx = null)
{
$terms = $this->_getOrderedTerms($ctx);
$numTerms = count($terms);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $_index is not named in camelCase. Open
protected function _setTerms(array $terms)
{
$this->_clearTerms();
foreach ($terms as $_index => $_term) {
if (!$_term instanceof EvaluableInterface) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $_term is not named in camelCase. Open
protected function _setTerms(array $terms)
{
$this->_clearTerms();
foreach ($terms as $_index => $_term) {
if (!$_term instanceof EvaluableInterface) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $_next is not named in camelCase. Open
protected function _eval(ValueAwareInterface $ctx = null)
{
$terms = $this->_getOrderedTerms($ctx);
$numTerms = count($terms);
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $_term is not named in camelCase. Open
protected function _setTerms(array $terms)
{
$this->_clearTerms();
foreach ($terms as $_index => $_term) {
if (!$_term instanceof EvaluableInterface) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The variable $_index is not named in camelCase. Open
protected function _setTerms(array $terms)
{
$this->_clearTerms();
foreach ($terms as $_index => $_term) {
if (!$_term instanceof EvaluableInterface) {
- Read upRead up
- Exclude checks
CamelCaseVariableName
Since: 0.2
It is considered best practice to use the camelCase notation to name variables.
Example
class ClassName {
public function doSomething() {
$data_module = new DataModule();
}
}
Source
The method _clearTerms is not named in camelCase. Open
protected function _clearTerms()
{
$this->terms = array();
return $this;
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method _setTerms is not named in camelCase. Open
protected function _setTerms(array $terms)
{
$this->_clearTerms();
foreach ($terms as $_index => $_term) {
if (!$_term instanceof EvaluableInterface) {
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method _getTerm is not named in camelCase. Open
protected function _getTerm($index)
{
return isset($this->terms[$index])
? $this->terms[$index]
: null;
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method _setValues is not named in camelCase. Open
protected function _setValues(array $values)
{
$this->value = $values;
return $this;
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method _defaultValue is not named in camelCase. Open
abstract protected function _defaultValue(ValueAwareInterface $ctx = null);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method _getOrderedTerms is not named in camelCase. Open
protected function _getOrderedTerms(ValueAwareInterface $ctx = null)
{
return array_reverse($this->_getTerms());
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method _getValue is not named in camelCase. Open
protected function _getValue()
{
return $this->value;
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method _getValueOf is not named in camelCase. Open
protected function _getValueOf($key)
{
return $this->_hasValue($key)
? $this->value[$key]
: null;
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method _updateBuffer is not named in camelCase. Open
abstract protected function _updateBuffer($buffer, $next, ValueAwareInterface $ctx = null);
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method _addTerm is not named in camelCase. Open
protected function _addTerm(EvaluableInterface $term)
{
$this->terms[] = $term;
return $this;
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}
Source
The method _setValue is not named in camelCase. Open
protected function _setValue($value)
{
$this->value = $value;
return $this;
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}