PoweredLocal/vrata

View on GitHub
app/Http/Controllers/GatewayController.php

Summary

Maintainability
A
0 mins
Test Coverage

Avoid unused parameters such as '$batch'.
Open

            ->sortBy(function ($batch, $key) {

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

Expected 1 space after FUNCTION keyword; 0 found
Open

        $output = $this->actions->reduce(function($carry, $batch) use (&$parametersJar, $client) {

Expected 1 space after FUNCTION keyword; 0 found
Open

        return collect(array_keys($output))->reduce(function($carry, $alias) use ($output) {

Expected 1 space after FUNCTION keyword; 0 found
Open

                collect($key)->each(function($outputKey, $property) use (&$data, &$carry, $key) {

Inline control structures are not allowed
Open

        if ($request->getRoute()->isAggregate()) throw new NotImplementedException('Aggregate ' . strtoupper($request->method()) . 's are not implemented yet');

Inline control structures are not allowed
Open

            if ($key === false) return $carry;

Inline control structures are not allowed
Open

        if (! $request->getRoute()->isAggregate()) return $this->simpleRequest($request, $client);

Inline control structures are not allowed
Open

        if (empty($request->getRoute())) throw new DataFormatException('Unable to find original URI pattern');

Inline control structures are not allowed
Open

        if (! $request->getRoute()->isAggregate()) return $this->simpleRequest($request, $client);

Line exceeds 120 characters; contains 156 characters
Open

            $data = isset($this->config['actions'][$alias]['input_key']) ? $output[$alias][$this->config['actions'][$alias]['input_key']] : $output[$alias];

Inline control structures are not allowed
Open

        if (! $request->getRoute()->isAggregate()) return $this->simpleRequest($request, $client);

Inline control structures are not allowed
Open

        if (! $request->getRoute()->isAggregate()) return $this->simpleRequest($request, $client);

Line exceeds 120 characters; contains 160 characters
Open

        if ($request->getRoute()->isAggregate()) throw new NotImplementedException('Aggregate ' . strtoupper($request->method()) . 's are not implemented yet');

Opening brace should be on a new line
Open

    private function aggregateRequest(Request $request, RestClient $client) {

There are no issues that match your filters.

Category
Status