Test Failed
Push — master ( 04b9d0...addd19 )
by Zhengchao
07:38
created

Followable   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A isMutualFollow() 0 4 2
1
<?php
2
3
/*
4
 * This file is part of emanci/laravel-rally package.
5
 *
6
 * (c) emanci <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.
10
 */
11
12
namespace Emanci\Rally\Traits;
13
14
trait Followable
15
{
16
    use CanFollow,CanBeFollowed;
17
18
    /**
19
     * Check if it is mutual follow.
20
     *
21
     *@param int|\Illuminate\Database\Eloquent\Model $followable
22
     *
23
     * @return bool
24
     */
25
    public function isMutualFollow($followable)
26
    {
27
        return $this->isFollowing($followable) && $this->isFollowedBy($followable);
28
    }
29
}
30