@@ -83,7 +83,7 @@ public function __construct( int $icon_style, array $location_list, string $loca
8383 if ( function_exists ( 'collator_create ' ) ) {
8484 $ this ->collator = collator_create ( $ this ->locale );
8585 if ( ! is_object ( $ this ->collator ) ) {
86- error_log ( basename (__FILE__ ) . ' ( ' . __FUNCTION__ . '): Unable to create collator (" ' . intl_error_message () . '") ' );
86+ error_log ( basename (__FILE__ ) . ' ( ' . __FUNCTION__ . '): Unable to create collator (" ' . intl_get_error_message () . '") ' );
8787 $ this ->collator = false ;
8888 }
8989 } else {
@@ -168,7 +168,7 @@ public function no_items() {
168168 * @since 1.0.0
169169 * @return array $columns, array of columns in table
170170 */
171- public function get_columns () {
171+ public function get_columns () : array {
172172 $ table_columns = array (
173173 //'cb' => '<input type="checkbox" />',
174174 'id ' => __ ( 'ID ' , 'easymap ' ),
@@ -185,7 +185,7 @@ public function get_columns() {
185185 * @since 1.0.0
186186 * @return array $sortable, the columns that can be sorted by.
187187 */
188- protected function get_sortable_columns () {
188+ protected function get_sortable_columns () : array {
189189 $ sortable = array (
190190 'id ' => array ( 'id ' , true ),
191191 'al ' => array ( 'al ' , true ),
@@ -215,7 +215,7 @@ protected function column_cb( $item ){
215215 *
216216 * @since 1.0.0
217217 */
218- protected function retain_search_pagination () {
218+ protected function retain_search_pagination () : string {
219219 $ addon_str = '' ;
220220 if ( ! empty ( $ _REQUEST ['orderby ' ] ) ) {
221221 $ addon_str .= '&orderby= ' . sanitize_key ( trim ( $ _REQUEST ['orderby ' ] ) );
@@ -323,7 +323,7 @@ public function column_id( $item ) {
323323 *
324324 * @since 1.0.0
325325 */
326- public function get_bulk_actions () {
326+ public function get_bulk_actions () : array {
327327 $ actions = array ();
328328 // $actions['delete'] = __( 'Delete', 'easymap' );
329329 return ( $ actions );
@@ -404,9 +404,9 @@ public function handle_location_actions() {
404404 *
405405 * @since 1.0.0
406406 */
407- protected function get_locations ( string $ search_string ) {
407+ protected function get_locations ( string $ search_string ) : array {
408+ $ db_results = array ();
408409 if ( ! empty ( $ search_string ) ) {
409- $ db_results = array ();
410410 $ is_numeric = is_numeric ( $ search_string );
411411 foreach ( $ this ->easymap_location_list as $ k => $ v ) {
412412 if ( empty ( $ v ['na ' ] ) ) {
@@ -428,7 +428,6 @@ protected function get_locations( string $search_string ) {
428428 }
429429 }
430430 } else {
431- $ db_results = array ();
432431 foreach ( $ this ->easymap_location_list as $ k => $ v ) {
433432 if ( empty ( $ v ['na ' ] ) ) {
434433 continue ;
@@ -450,6 +449,7 @@ protected function get_locations( string $search_string ) {
450449 public function handle_sorting ( $ a , $ b ) {
451450 $ order_by = ( isset ( $ _REQUEST ['orderby ' ] ) ) ? sanitize_key ( $ _REQUEST ['orderby ' ] ) : 'id ' ;
452451 $ order_how = ( ! empty ( $ _REQUEST ['order ' ] ) ) ? sanitize_key ( $ _REQUEST ['order ' ] ) : 'asc ' ;
452+ $ result = 0 ;
453453
454454 switch ( $ order_by ) {
455455 case 'na ' :// Name
0 commit comments