Skip to content

Commit

Permalink
added phpdoc support
Browse files Browse the repository at this point in the history
  • Loading branch information
Mte90 committed May 10, 2019
1 parent 542c1e8 commit 8b5a2e4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion plugin-name/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 5 additions & 0 deletions plugin-name/grumphp.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
parameters:
extensions:
- Wearejust\GrumPHPExtra\Extension\Loader
git_dir: .
bin_dir: composer/bin
ignore_unstaged_changes: false
Expand All @@ -11,6 +13,9 @@ parameters:
ignore_patterns: ['/vendor/']
grunt: ~
phpmd: ~
phpdoc:
triggered_by: ['php']
ignore: ['/vendor/']
phpstan:
configuration: ~
triggered_by: ['php']
Expand Down
12 changes: 6 additions & 6 deletions plugin-name/integrations/class-cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,29 @@ 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',
);

$cronplus = new CronPlus( $args );
// 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 );
}

Expand Down

0 comments on commit 8b5a2e4

Please sign in to comment.