src/Psalm/Internal/ExecutionEnvironment/BuildInfoCollector.php
protected function fillScrutinizer() : self
    {
        if (isset($this->env['SCRUTINIZER']) && $this->env['SCRUTINIZER']) {
            $this->readEnv['CI_JOB_ID'] = $this->env['SCRUTINIZER_INSPECTION_UUID'];
            $this->readEnv['CI_BRANCH'] = $this->env['SCRUTINIZER_BRANCH'];
            $this->readEnv['CI_PR_NUMBER'] = $this->env['SCRUTINIZER_PR_NUMBER'] ?? '';

            // backup
            $this->readEnv['CI_NAME'] = 'Scrutinizer';

            $repo_slug = (string) $this->env['SCRUTINIZER_PROJECT'] ?? '';

            if ($repo_slug) {
                $slug_parts = explode('/', $repo_slug);

                if ($this->readEnv['CI_PR_NUMBER']) {
                    $this->readEnv['CI_PR_REPO_OWNER'] = $slug_parts[1];
                    $this->readEnv['CI_PR_REPO_NAME'] = $slug_parts[2];
                } else {
                    $this->readEnv['CI_REPO_OWNER'] = $slug_parts[1];
                    $this->readEnv['CI_REPO_NAME'] = $slug_parts[2];
                }
            }
        }

        return $this;
    }
protected function fillScrutinizer() : self
    {
        if (isset($this->env['SCRUTINIZER']) && $this->env['SCRUTINIZER']) {
            $this->readEnv['CI_JOB_ID'] = $this->env['SCRUTINIZER_INSPECTION_UUID'];
            $this->readEnv['CI_BRANCH'] = $this->env['SCRUTINIZER_BRANCH'];
            $this->readEnv['CI_PR_NUMBER'] = $this->env['SCRUTINIZER_PR_NUMBER'] ?? '';

            // backup
            $this->readEnv['CI_NAME'] = 'Scrutinizer';

            $repo_slug = (string) $this->env['SCRUTINIZER_PROJECT'] ?? '';

            if ($repo_slug) {
                $slug_parts = explode('/', $repo_slug);

                if ($this->readEnv['CI_PR_NUMBER']) {
                    $this->readEnv['CI_PR_REPO_OWNER'] = $slug_parts[1];
                    $this->readEnv['CI_PR_REPO_NAME'] = $slug_parts[2];
                } else {
                    $this->readEnv['CI_REPO_OWNER'] = $slug_parts[1];
                    $this->readEnv['CI_REPO_NAME'] = $slug_parts[2];
                }
            }
        }

        return $this;
    }
protected function fillScrutinizer ( ) : self { if ( isset ( $ this -> env [ 'SCRUTINIZER' ] ) && $ this -> env [ 'SCRUTINIZER' ] ) { $ this -> readEnv [ 'CI_JOB_ID' ] = $ this -> env [ 'SCRUTINIZER_INSPECTION_UUID' ] ; $ this -> readEnv [ 'CI_BRANCH' ] = $ this -> env [ 'SCRUTINIZER_BRANCH' ] ; $ this -> readEnv [ 'CI_PR_NUMBER' ] = $ this -> env [ 'SCRUTINIZER_PR_NUMBER' ] ?? '' ; // backup $ this -> readEnv [ 'CI_NAME' ] = 'Scrutinizer' ; $ repo_slug = ( string ) $ this -> env [ 'SCRUTINIZER_PROJECT' ] ?? '' ; if ( $ repo_slug ) { $ slug_parts = explode ( '/' , $ repo_slug ) ; if ( $ this -> readEnv [ 'CI_PR_NUMBER' ] ) { $ this -> readEnv [ 'CI_PR_REPO_OWNER' ] = $ slug_parts [ 1 ] ; $ this -> readEnv [ 'CI_PR_REPO_NAME' ] = $ slug_parts [ 2 ] ; } else { $ this -> readEnv [ 'CI_REPO_OWNER' ] = $ slug_parts [ 1 ] ; $ this -> readEnv [ 'CI_REPO_NAME' ] = $ slug_parts [ 2 ] ; } } } return $ this ; }
Fill Scrutinizer environment variables.

"JENKINS_URL", "BUILD_NUMBER" must be set.

@return $this
Fill Scrutinizer environment variables .