src/package/Data/Repositories/Support/Suites.php
public function createOrUpdateSuite($name, $project_id, $suite_data)
    {
        $project_id = $project_id instanceof Project ? $project_id->id : $project_id;

        if (is_null($tester = Tester::where('name', $suite_data['tester'])->first())) {
            $this->addMessage("Tester {$suite_data['tester']} not found.", 'error');

            return false;
        }

        return Suite::updateOrCreate(
            [
                'name'       => $name,
                'project_id' => $project_id,
            ],
            [
                'tester_id'        => $tester->id,
                'tests_path'       => array_get($suite_data, 'tests_path'),
                'command_options'  => array_get($suite_data, 'command_options'),
                'file_mask'        => array_get($suite_data, 'file_mask'),
                'retries'          => array_get($suite_data, 'retries'),
                'editor'           => array_get($suite_data, 'editor'),
                'coverage_enabled' => array_get($suite_data, 'coverage.enabled', false),
                'coverage_index'   => array_get($suite_data, 'coverage.index'),
            ]
        );
    }
public function createOrUpdateSuite($name, $project_id, $suite_data)
    {
        $project_id = $project_id instanceof Project ? $project_id->id : $project_id;

        if (is_null($tester = Tester::where('name', $suite_data['tester'])->first())) {
            $this->addMessage("Tester {$suite_data['tester']} not found.", 'error');

            return false;
        }

        return Suite::updateOrCreate(
            [
                'name'       => $name,
                'project_id' => $project_id,
            ],
            [
                'tester_id'        => $tester->id,
                'tests_path'       => array_get($suite_data, 'tests_path'),
                'command_options'  => array_get($suite_data, 'command_options'),
                'file_mask'        => array_get($suite_data, 'file_mask'),
                'retries'          => array_get($suite_data, 'retries'),
                'editor'           => array_get($suite_data, 'editor'),
                'coverage_enabled' => array_get($suite_data, 'coverage.enabled', false),
                'coverage_index'   => array_get($suite_data, 'coverage.index'),
            ]
        );
    }
public function createOrUpdateSuite ( $ name , $ project_id , $ suite_data ) { $ project_id = $ project_id instanceof Project ? $ project_id -> id : $ project_id ; if ( is_null ( $ tester = Tester :: where ( 'name' , $ suite_data [ 'tester' ] ) -> first ( ) ) ) { $ this -> addMessage ( "Tester {$suite_data['tester']} not found." , 'error' ) ; return false ; } return Suite :: updateOrCreate ( [ 'name' => $ name , 'project_id' => $ project_id , ] , [ 'tester_id' => $ tester -> id , 'tests_path' => array_get ( $ suite_data , 'tests_path' ) , 'command_options' => array_get ( $ suite_data , 'command_options' ) , 'file_mask' => array_get ( $ suite_data , 'file_mask' ) , 'retries' => array_get ( $ suite_data , 'retries' ) , 'editor' => array_get ( $ suite_data , 'editor' ) , 'coverage_enabled' => array_get ( $ suite_data , 'coverage.enabled' , false ) , 'coverage_index' => array_get ( $ suite_data , 'coverage.index' ) , ] ) ; }
Create or update a suite.

@param $name
@param $project_id
@param $suite_data

@return Suite|null|bool
Create or update a suite .