Completed
Pull Request — master (#24)
by yuuki
11:11
created

VersionTrait   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 17
rs 10
wmc 3
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A breakingVersion() 0 10 3
1
<?php
2
3
/**
4
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
5
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
6
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
7
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
8
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
9
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
10
 * THE SOFTWARE.
11
 */
12
13
namespace Ytake\LaravelCouchbase;
14
15
/**
16
 * trait VersionTrait
17
 */
18
trait VersionTrait
19
{
20
    /**
21
     * @codeCoverageIgnore
22
     * @return bool
23
     */
24
    private function breakingVersion()
25
    {
26
        if (!str_contains(phpversion('couchbase'), 'beta')) {
27
            if (floatval(phpversion('couchbase')) >= 2.2) {
28
                return true;
29
            }
30
        }
31
32
        return false;
33
    }
34
}
35