protected function makeContract()
    {
        $full_path = $this->getFullContractPath();
        if (file_exists($full_path)) {
            return true;
        }
        $contract_contents = str_replace(
            [
                '%%MODEL_BASENAME%%',
                '%%MODEL_NAME%%',
                '%%CLASS_NAME%%',
                '%%NAMESPACE%%',
            ],
            [
                $this->getModelBasename(),
                $this->getModelName(),
                $this->getContractBaseName(),
                trim($this->getContractsNamespace(), '\\'),
            ],
            $this->contentsFromStub('Contract')
        );
        if (!file_exists(dirname($full_path))) {
            mkdir(dirname($full_path), 0755, true);
        }
        file_put_contents($full_path, $contract_contents);
    }
protected function makeContract()
    {
        $full_path = $this->getFullContractPath();
        if (file_exists($full_path)) {
            return true;
        }
        $contract_contents = str_replace(
            [
                '%%MODEL_BASENAME%%',
                '%%MODEL_NAME%%',
                '%%CLASS_NAME%%',
                '%%NAMESPACE%%',
            ],
            [
                $this->getModelBasename(),
                $this->getModelName(),
                $this->getContractBaseName(),
                trim($this->getContractsNamespace(), '\\'),
            ],
            $this->contentsFromStub('Contract')
        );
        if (!file_exists(dirname($full_path))) {
            mkdir(dirname($full_path), 0755, true);
        }
        file_put_contents($full_path, $contract_contents);
    }
protected function makeContract ( ) { $ full_path = $ this -> getFullContractPath ( ) ; if ( file_exists ( $ full_path ) ) { return true ; } $ contract_contents = str_replace ( [ '%%MODEL_BASENAME%%' , '%%MODEL_NAME%%' , '%%CLASS_NAME%%' , '%%NAMESPACE%%' , ] , [ $ this -> getModelBasename ( ) , $ this -> getModelName ( ) , $ this -> getContractBaseName ( ) , trim ( $ this -> getContractsNamespace ( ) , '\\' ) , ] , $ this -> contentsFromStub ( 'Contract' ) ) ; if ( ! file_exists ( dirname ( $ full_path ) ) ) { mkdir ( dirname ( $ full_path ) , 0755 , true ) ; } file_put_contents ( $ full_path , $ contract_contents ) ; }
Make contract file

@method makeContract
@return string The fully qualified contract name
Make contract file