Be::visible()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
/**
3
 * ShouldPHP
4
 *
5
 * @author  Gabriel Jacinto <[email protected]>
6
 * @status  dev
7
 * @link    https://github.com/GabrielJMJ/ShouldPHP
8
 * @license MIT
9
 */
10
 
11
namespace Gabrieljmj\Should\Condition\TheMethod;
12
13
use Gabrieljmj\Should\Condition\TheMethod\AbstractMethodCondition;
14
use Gabrieljmj\Should\Assert\TheMethod\Be\VisibleAs;
15
16
class Be extends AbstractMethodCondition
17
{
18
    /**
19
     * Tests if the visibility of determined method is public, or protected, or private
20
     *
21
     * @param integer     $as
22
     * @param string|null $message
23
     */
24
    public function visible($as, $message = null)
25
    {
26
        $instance=  new VisibleAs($this->class, $this->method, $as);
27
        $instance->setMessage($message);
28
        $this->addAssert($instance);
29
    }
30
}