diff --git a/src/classes/class-tainacan-bulk-edit.php b/src/classes/class-tainacan-bulk-edit.php index b6c0a074e..4cf646312 100644 --- a/src/classes/class-tainacan-bulk-edit.php +++ b/src/classes/class-tainacan-bulk-edit.php @@ -75,14 +75,14 @@ class Bulk_Edit { add_filter('posts_pre_query', '__return_empty_array'); // this adds the meta key and meta value to the SELECT query so it can be used directly in the INSERT below - add_filter('posts_fields_request', [&$this, 'add_fields_to_query'], 10, 2); + add_filter('posts_fields_request', [$this, 'add_fields_to_query'], 10, 2); $itemsRepo = Repositories\Items::get_instance(); $params['query']['fields'] = 'ids'; $items_query = $itemsRepo->fetch($params['query'], $params['collection_id']); remove_filter('posts_pre_query', '__return_empty_array'); - remove_filter('posts_fields_request', [&$this, 'add_fields_to_query']); + remove_filter('posts_fields_request', [$this, 'add_fields_to_query']); $wpdb->query( "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) {$items_query->request}" ); diff --git a/src/classes/class-tainacan-elastic-press.php b/src/classes/class-tainacan-elastic-press.php index 880148473..4f8c16f14 100644 --- a/src/classes/class-tainacan-elastic-press.php +++ b/src/classes/class-tainacan-elastic-press.php @@ -13,7 +13,7 @@ namespace Tainacan; class Elastic_Press { function __construct($ajax_query=false) { - add_action('init', [&$this, 'init']); + add_action('init', [$this, 'init']); } @@ -21,7 +21,7 @@ class Elastic_Press { if (!class_exists('EP_API')) { return; // ElasticPress not active } - add_filter('tainacan_fetch_args', [&$this, 'filter_args'], 10, 2); + add_filter('tainacan_fetch_args', [$this, 'filter_args'], 10, 2); } function filter_args($args, $type) { diff --git a/src/importer/class-tainacan-importer.php b/src/importer/class-tainacan-importer.php index 9756c9d0c..b0af6efdd 100644 --- a/src/importer/class-tainacan-importer.php +++ b/src/importer/class-tainacan-importer.php @@ -600,7 +600,7 @@ abstract class Importer { * the current progress of the process. * */ - protected function set_current_step_total(int $value) { + protected function set_current_step_total($value) { $this->set_step_total($this->get_current_step(), $value); } @@ -613,7 +613,7 @@ abstract class Importer { * the current progress of the process. * */ - protected function set_step_total(int $step, int $value) { + protected function set_step_total($step, $value) { $steps = $this->get_steps(); if (isset($steps[$step]) && is_array($steps[$step])) { $steps[$step]['total'] = $value; diff --git a/verify_compat.sh b/verify_compat.sh index a99123e2c..d88d4f248 100755 --- a/verify_compat.sh +++ b/verify_compat.sh @@ -5,4 +5,6 @@ echo 'W is Warning' echo 'E is Error' ./src/vendor/bin/phpcs -p . --standard=PHPCompatibility --extensions=php --ignore=*/node_modules/*,*/src/vendor/* --report-file=./report.txt --runtime-set testVersion 5.6 +echo 'Done' +echo 'Results are in ./report.txt'