Code Duplication    Length = 9-9 lines in 4 locations

src/Tracker.php 4 locations

@@ 111-119 (lines=9) @@
108
        throw new UndefinedTrackerConstant("Uknown method called on tracker. [$method]");
109
    }
110
111
    protected function dynamicGet($method)
112
    {
113
        $key = strtoupper(str_after($method, 'get'));
114
        if (! defined("static::{$key}")) {
115
            throw new UndefinedTrackerConstant("Tracker: Undefined key constant [{$key}]");
116
        }
117
118
        return $this->get(constant("static::{$key}"));
119
    }
120
121
    protected function dynamicSet($method, $value)
122
    {
@@ 121-129 (lines=9) @@
118
        return $this->get(constant("static::{$key}"));
119
    }
120
121
    protected function dynamicSet($method, $value)
122
    {
123
        $key = strtoupper(str_after($method, 'set'));
124
        if (! defined("static::{$key}")) {
125
            throw new UndefinedTrackerConstant("Tracker: Undefined key constant [{$key}]");
126
        }
127
128
        $this->set(constant("static::{$key}"), $value);
129
    }
130
131
    protected function dynamicJsonGet($method)
132
    {
@@ 131-139 (lines=9) @@
128
        $this->set(constant("static::{$key}"), $value);
129
    }
130
131
    protected function dynamicJsonGet($method)
132
    {
133
        $key = strtoupper(str_after($method, 'jsonGet'));
134
        if (! defined("static::{$key}")) {
135
            throw new UndefinedTrackerConstant("Tracker: Undefined key constant [{$key}]");
136
        }
137
138
        return $this->jsonGet(constant("static::{$key}"));
139
    }
140
141
    protected function dynamicJsonSet($method, $value)
142
    {
@@ 141-149 (lines=9) @@
138
        return $this->jsonGet(constant("static::{$key}"));
139
    }
140
141
    protected function dynamicJsonSet($method, $value)
142
    {
143
        $key = strtoupper(str_after($method, 'jsonSet'));
144
        if (! defined("static::{$key}")) {
145
            throw new UndefinedTrackerConstant("Tracker: Undefined key constant [{$key}]");
146
        }
147
148
        $this->jsonSet(constant("static::{$key}"), $value);
149
    }
150
151
    protected function dynamicIncrement($method, $parameters)
152
    {