src/package/Data/Repositories/Support/Projects.php
public function getProjectState($tests)
    {
        if ($tests->contains('state', 'running')) {
            return 'running';
        }

        if ($tests->contains('state', 'queued')) {
            return 'queued';
        }

        if ($tests->contains('state', 'failed')) {
            return 'failed';
        }

        if ($tests->every('state', 'ok')) {
            return 'ok';
        }

        return 'idle';
    }
public function getProjectState($tests)
    {
        if ($tests->contains('state', 'running')) {
            return 'running';
        }

        if ($tests->contains('state', 'queued')) {
            return 'queued';
        }

        if ($tests->contains('state', 'failed')) {
            return 'failed';
        }

        if ($tests->every('state', 'ok')) {
            return 'ok';
        }

        return 'idle';
    }
public function getProjectState ( $ tests ) { if ( $ tests -> contains ( 'state' , 'running' ) ) { return 'running' ; } if ( $ tests -> contains ( 'state' , 'queued' ) ) { return 'queued' ; } if ( $ tests -> contains ( 'state' , 'failed' ) ) { return 'failed' ; } if ( $ tests -> every ( 'state' , 'ok' ) ) { return 'ok' ; } return 'idle' ; }
The the project state.

@param \Illuminate\Support\Collection $tests

@return string
The the project state .