Skip to content

Commit

Permalink
Update Kladr.php
Browse files Browse the repository at this point in the history
  • Loading branch information
viktor-melnikov committed Jun 28, 2018
1 parent 6ae4b45 commit f49b2c9
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/Kladr.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,6 @@ public function search( $q = null, $type = null, $parent_id = null, $parent_type
//'WithParent' => true
] )->get();

$data = [];

foreach ( $search[ 'result' ] as $item )
{
$data[] = [
'text' => isset( $item[ 'type' ] ) ? $item[ 'name' ] . ' ' . $item[ 'type' ] : $item[ 'name' ],
'id' => $item[ 'id' ] . ';' . $item[ 'name' ] . ';' . $item[ 'type' ],
];
}

return $data;
return $search[ 'result' ];
}
}

0 comments on commit f49b2c9

Please sign in to comment.