diff --git a/plugin-name/composer.json b/plugin-name/composer.json index e344b2a9..48255ff5 100644 --- a/plugin-name/composer.json +++ b/plugin-name/composer.json @@ -56,7 +56,8 @@ "phpro/grumphp": "^0.15", "codeception/codeception": "2.5.*", "codeception/codeception-progress-reporter": "dev-master", - "phpunit/phpunit": "6.*" + "phpunit/phpunit": "6.*", + "wearejust/grumphp-extra-tasks": "^2.2" }, "minimum-stability": "dev", "prefer-stable": true, diff --git a/plugin-name/grumphp.yml b/plugin-name/grumphp.yml index 0271a9a2..5769f371 100644 --- a/plugin-name/grumphp.yml +++ b/plugin-name/grumphp.yml @@ -1,4 +1,6 @@ parameters: + extensions: + - Wearejust\GrumPHPExtra\Extension\Loader git_dir: . bin_dir: composer/bin ignore_unstaged_changes: false @@ -11,6 +13,9 @@ parameters: ignore_patterns: ['/vendor/'] grunt: ~ phpmd: ~ + phpdoc: + triggered_by: ['php'] + ignore: ['/vendor/'] phpstan: configuration: ~ triggered_by: ['php'] diff --git a/plugin-name/integrations/class-cron.php b/plugin-name/integrations/class-cron.php index e60e3841..900da2c7 100644 --- a/plugin-name/integrations/class-cron.php +++ b/plugin-name/integrations/class-cron.php @@ -26,8 +26,8 @@ public function initialize() { $args = array( 'recurrence' => 'hourly', 'schedule' => 'schedule', - 'name' => 'cronplusexample', - 'cb' => array( $this, 'cronplus_example' ), + 'name' => 'hourly_cron', + 'cb' => array( $this, 'hourly_cron' ), 'plugin_root_file' => 'plugin-name.php', ); @@ -35,20 +35,20 @@ public function initialize() { // Schedule the event $cronplus->schedule_event(); // Remove the event by the schedule - $cronplus->clear_schedule_by_hook(); + //$cronplus->clear_schedule_by_hook(); // Jump the scheduled event - $cronplus->unschedule_specific_event(); + //$cronplus->unschedule_specific_event(); //{{/unless}} } /** - * Cron example + * Cron Hourly example * * @param integer $id The ID. * * @return void */ - public function cronplus_example( $id ) { + public function hourly_cron( $id ) { echo esc_html( $id ); }