app/Http/Controllers/GatewayController.php
Avoid unused parameters such as '$batch'. Open
Open
->sortBy(function ($batch, $key) {
- 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
Expected 1 space after FUNCTION keyword; 0 found Open
Open
collect($key)->each(function($outputKey, $property) use (&$data, &$carry, $key) {
- Exclude checks
Expected 1 space after FUNCTION keyword; 0 found Open
Open
return collect(array_keys($output))->reduce(function($carry, $alias) use ($output) {
- Exclude checks
Expected 1 space after FUNCTION keyword; 0 found Open
Open
$output = $this->actions->reduce(function($carry, $batch) use (&$parametersJar, $client) {
- Exclude checks
Line exceeds 120 characters; contains 160 characters Open
Open
if ($request->getRoute()->isAggregate()) throw new NotImplementedException('Aggregate ' . strtoupper($request->method()) . 's are not implemented yet');
- Exclude checks
Inline control structures are not allowed Open
Open
if (! $request->getRoute()->isAggregate()) return $this->simpleRequest($request, $client);
- Exclude checks
Line exceeds 120 characters; contains 156 characters Open
Open
$data = isset($this->config['actions'][$alias]['input_key']) ? $output[$alias][$this->config['actions'][$alias]['input_key']] : $output[$alias];
- Exclude checks
Inline control structures are not allowed Open
Open
if ($key === false) return $carry;
- Exclude checks
Inline control structures are not allowed Open
Open
if (! $request->getRoute()->isAggregate()) return $this->simpleRequest($request, $client);
- Exclude checks
Inline control structures are not allowed Open
Open
if (! $request->getRoute()->isAggregate()) return $this->simpleRequest($request, $client);
- Exclude checks
Inline control structures are not allowed Open
Open
if (empty($request->getRoute())) throw new DataFormatException('Unable to find original URI pattern');
- Exclude checks
Inline control structures are not allowed Open
Open
if (! $request->getRoute()->isAggregate()) return $this->simpleRequest($request, $client);
- Exclude checks
Inline control structures are not allowed Open
Open
if ($request->getRoute()->isAggregate()) throw new NotImplementedException('Aggregate ' . strtoupper($request->method()) . 's are not implemented yet');
- Exclude checks
Opening brace should be on a new line Open
Open
private function aggregateRequest(Request $request, RestClient $client) {
- Exclude checks