runs = $runs; $this->quick = $quick; $this->full = $full; $this->deep_code = $deep_code; $this->vendor = $vendor; } public function run_one( string $run_uuid ): array { $run = $this->runs->get_by_uuid( $run_uuid ); if ( null === $run ) { throw new StorageException( 'run_not_found' ); } if ( 'quick' === $run->profile() ) { return $this->quick->run_one( $run_uuid ); } if ( 'full' === $run->profile() ) { return $this->full->run_one( $run_uuid ); } if ( 'deep_code' === $run->profile() && null !== $this->deep_code ) { return $this->deep_code->run_one( $run_uuid ); } if ( 'vendor' === $run->profile() && null !== $this->vendor ) { return $this->vendor->run_one( $run_uuid ); } throw new StorageException( 'run_profile_not_implemented' ); } }