protected function returnData($type)
    {
        $data = ['result' => $type];
        if ( $this->hasPhoto ){
            $data['photos'] = $this->repo->files;
        }
        if ( $this->hasFile ) {
            $data['files'] = $this->repo->files;
        }
        return $data;
    }
protected function returnData($type)
    {
        $data = ['result' => $type];
        if ( $this->hasPhoto ){
            $data['photos'] = $this->repo->files;
        }
        if ( $this->hasFile ) {
            $data['files'] = $this->repo->files;
        }
        return $data;
    }
protected function returnData ( $ type ) { $ data = [ 'result' => $ type ] ; if ( $ this -> hasPhoto ) { $ data [ 'photos' ] = $ this -> repo -> files ; } if ( $ this -> hasFile ) { $ data [ 'files' ] = $ this -> repo -> files ; } return $ data ; }
return data for api

@param string $type
@return array
return data for api