Flitch\Rule\Naming\Methods::setFormat PHP Method

setFormat() public method

Set format.
public setFormat ( string $format ) : Methods
$format string
return Methods
    public function setFormat($format)
    {
        $this->format = $format;
        return $this;
    }

Usage Example

Beispiel #1
0
 public function testNoViolationOnClosures()
 {
     $tokenizer = new Tokenizer();
     $file = $tokenizer->tokenize('foo.php', "<?php function() {}; class foo {}");
     $file->rewind();
     $file->seekTokenType(T_FUNCTION);
     $rule = new Methods();
     $rule->setFormat('bar');
     $rule->visitToken($file);
     $this->assertRuleViolations($file, array());
 }