src/EntityQueryBuilder.php
private function callFunctionalityFields($fieldName, $methodName, array $arguments = [], $condition = null)
    {
        switch ($methodName) {
            case 'where':
            case 'filterBy':
                if ($condition === 'or') {
                    $this->orWhere(sprintf('%s = %s', $this->alias($fieldName), $arguments[0]));
                } else {
                    $this->andWhere(sprintf('%s = %s', $this->alias($fieldName), $arguments[0]));
                }
                break;
            case 'orderBy':
            case 'orderAscBy':
            case 'orderDescBy':
                if ($methodName === 'orderAscBy') {
                    $arguments = ['ASC'];
                } elseif ($methodName === 'orderDescBy') {
                    $arguments = ['DESC'];
                }

                if (count($arguments) === 1) {
                    $this->orderBy($fieldName, $arguments[0]);
                } else {
                    $this->orderBy($fieldName);
                }
                break;
            case 'addOrderBy':
            case 'addOrderAscBy':
            case 'addOrderDescBy':
                if ($methodName === 'addOrderAscBy') {
                    $arguments = ['ASC'];
                } elseif ($methodName === 'addOrderDescBy') {
                    $arguments = ['DESC'];
                }

                if (count($arguments) === 1) {
                    $this->addOrderBy($fieldName, $arguments[0]);
                } else {
                    $this->addOrderBy($fieldName);
                }
                break;
            case 'groupBy':
                $this->groupBy($this->alias($fieldName));
                break;
            case 'addGroupBy':
                $this->addGroupBy($this->alias($fieldName));
                break;
            default:
                // Do Nothing
                break;
        }

        return $this;
    }
private function callFunctionalityFields($fieldName, $methodName, array $arguments = [], $condition = null)
    {
        switch ($methodName) {
            case 'where':
            case 'filterBy':
                if ($condition === 'or') {
                    $this->orWhere(sprintf('%s = %s', $this->alias($fieldName), $arguments[0]));
                } else {
                    $this->andWhere(sprintf('%s = %s', $this->alias($fieldName), $arguments[0]));
                }
                break;
            case 'orderBy':
            case 'orderAscBy':
            case 'orderDescBy':
                if ($methodName === 'orderAscBy') {
                    $arguments = ['ASC'];
                } elseif ($methodName === 'orderDescBy') {
                    $arguments = ['DESC'];
                }

                if (count($arguments) === 1) {
                    $this->orderBy($fieldName, $arguments[0]);
                } else {
                    $this->orderBy($fieldName);
                }
                break;
            case 'addOrderBy':
            case 'addOrderAscBy':
            case 'addOrderDescBy':
                if ($methodName === 'addOrderAscBy') {
                    $arguments = ['ASC'];
                } elseif ($methodName === 'addOrderDescBy') {
                    $arguments = ['DESC'];
                }

                if (count($arguments) === 1) {
                    $this->addOrderBy($fieldName, $arguments[0]);
                } else {
                    $this->addOrderBy($fieldName);
                }
                break;
            case 'groupBy':
                $this->groupBy($this->alias($fieldName));
                break;
            case 'addGroupBy':
                $this->addGroupBy($this->alias($fieldName));
                break;
            default:
                // Do Nothing
                break;
        }

        return $this;
    }
A callFunctionalityFields function.

@param string $fieldName
@param string $methodName
@param array  $arguments
@param string $condition

@return $this This QueryBuilder instance.
@throws \ReflectionException