src/Blueprint.php
protected function one() {
        $query = $this->loadElements();
        $this->source->setQuery($query);
        $result = $this->source->one();
        $activeTransformations = $this->activeTransformations;
        $this->reset();
        if($result && !empty($activeTransformations)) {
            foreach ($activeTransformations as $transform) {
                if(isset($this->transforms[$transform])) {
                    $result = call_user_func($this->transforms[$transform], $result);
                }
                if(isset($this->arraytransforms[$transform])) {
                    $temp = call_user_func($this->arraytransforms[$transform], [$result]);
                    $result = $temp[0];
                }
            }
        }
        $this->reset();
        return $result;
    }
protected function one() {
        $query = $this->loadElements();
        $this->source->setQuery($query);
        $result = $this->source->one();
        $activeTransformations = $this->activeTransformations;
        $this->reset();
        if($result && !empty($activeTransformations)) {
            foreach ($activeTransformations as $transform) {
                if(isset($this->transforms[$transform])) {
                    $result = call_user_func($this->transforms[$transform], $result);
                }
                if(isset($this->arraytransforms[$transform])) {
                    $temp = call_user_func($this->arraytransforms[$transform], [$result]);
                    $result = $temp[0];
                }
            }
        }
        $this->reset();
        return $result;
    }
protected function one ( ) { $ query = $ this -> loadElements ( ) ; $ this -> source -> setQuery ( $ query ) ; $ result = $ this -> source -> one ( ) ; $ activeTransformations = $ this -> activeTransformations ; $ this -> reset ( ) ; if ( $ result && ! empty ( $ activeTransformations ) ) { foreach ( $ activeTransformations as $ transform ) { if ( isset ( $ this -> transforms [ $ transform ] ) ) { $ result = call_user_func ( $ this -> transforms [ $ transform ] , $ result ) ; } if ( isset ( $ this -> arraytransforms [ $ transform ] ) ) { $ temp = call_user_func ( $ this -> arraytransforms [ $ transform ] , [ $ result ] ) ; $ result = $ temp [ 0 ] ; } } } $ this -> reset ( ) ; return $ result ; }
call one of these last
call one of these last