Completed
Push — master ( 5c8f9b...c72a1f )
by Christopher
01:11
created

CommentBuilder::approved()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Chriscreates\Blog\Builders;
4
5
class CommentBuilder extends Builder
6
{
7
    /**
8
     * Return results where Comments have been approved.
9
     *
10
     * @return \Chriscreates\Blog\Builders\CommentBuilder
11
     */
12
    public function approved() : CommentBuilder
13
    {
14
        return $this->where('is_approved', true);
15
    }
16
17
    /**
18
     * Return results where Comments are not yet approved.
19
     *
20
     * @return \Chriscreates\Blog\Builders\CommentBuilder
21
     */
22
    public function unapproved() : CommentBuilder
23
    {
24
        return $this->where('is_approved', false);
25
    }
26
}
27