Completed
Push — master ( 77b50b...7ba73a )
by Steve
46s
created

Transform::getBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace StoutLogic\AcfBuilder\Transform;
4
5
use StoutLogic\AcfBuilder\Builder;
6
7
abstract class Transform
8
{
9
    private $bulider;
0 ignored issues
show
Unused Code introduced by
The property $bulider is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
10
11
    public function __construct(Builder $builder)
12
    {
13
        $this->builder = $builder;
0 ignored issues
show
Bug introduced by
The property builder does not exist. Did you maybe forget to declare it?

In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:

class MyClass { }

$x = new MyClass();
$x->foo = true;

Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:

class MyClass {
    public $foo;
}

$x = new MyClass();
$x->foo = true;
Loading history...
14
    }
15
16
    public function getBuilder()
17
    {
18
        return $this->builder;
19
    }
20
21
    /**
22
     * Impelment in all discrete classes
23
     * @param  array $config input
24
     * @return array output config
25
     */
26
    abstract public function transform($config);
27
}
28