Completed
Branch develop (c4bcdd)
by Stephen
06:03
created

Transformable   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 16
rs 10
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A newCollection() 0 4 1
1
<?php
2
3
namespace Spinen\Transformers;
4
5
/**
6
 * Class Transformable
7
 *
8
 * @package App\Support\Transformation
9
 */
10
trait Transformable
11
{
12
    /**
13
     * Tell eloquent to make the collection as a TransformableCollection
14
     *
15
     * This allows us to mix in methods to the collection.
16
     *
17
     * @param array $models
18
     *
19
     * @return TransformableCollection
20
     */
21
    public function newCollection(array $models = [])
22
    {
23
        return new TransformableCollection($models);
24
    }
25
}
26