Followable::isMutualFollow()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 2
eloc 2
nc 2
nop 1
crap 6
1
<?php
2
3
/*
4
 * This file is part of questocat/laravel-rally package.
5
 *
6
 * (c) questocat <[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 Questocat\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