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

VersionTrait::breakingVersion()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 5
c 0
b 0
f 0
nc 3
nop 0
dl 0
loc 10
rs 9.4285
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