Transformer::transform()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 1
nc 1
1
<?php
2
3
/**
4
 * Created by PhpStorm.
5
 * User: sergi
6
 * Date: 11/01/16
7
 * Time: 18:19
8
 */
9
10
namespace App\Transformers;
11
12
abstract class Transformer
13
{
14
15
    public function transformCollection($items){
16
        return array_map([$this, 'Transform'], $items->toArray());
17
    }
18
  /*  public function transform($item)
0 ignored issues
show
Unused Code Comprehensibility introduced by
58% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
19
    {
20
21
22
        return [
23
            'name' => $item['name'],
24
            'priority' => $item['priority'],
25
            'done' => $item['done']
26
        ];
27
28
29
30
    }*/
31
32
    public abstract function transform($items);
0 ignored issues
show
Coding Style introduced by
The abstract declaration must precede the visibility declaration
Loading history...
33
}