gossi\codegen\config\CodeFileGeneratorConfig::getDeclareStrictTypes PHP Method

getDeclareStrictTypes() public method

Returns whether a declare(strict_types=1); statement should be printed below the header comments (PHP 7)
public getDeclareStrictTypes ( ) : boolean
return boolean `true` if it will be printed and `false` if not
    public function getDeclareStrictTypes()
    {
        return $this->options['declareStrictTypes'];
    }

Usage Example

 public function testCodeFileGeneratorConfigDeclareStrictTypes()
 {
     $config = new CodeFileGeneratorConfig(['declareStrictTypes' => true]);
     $this->assertTrue($config->getDeclareStrictTypes());
     $this->assertTrue($config->getGenerateReturnTypeHints());
     $this->assertTrue($config->getGenerateScalarTypeHints());
 }