I'm integrating PHP doc with my product since I plan to allow users to change various things inside the plugin.
So far so good, I have phpdoc .phar in my directory and I can parse the html files. But I have two issues:
Here's my code:
/**
* Creates a custom cron schedule.
* @param array $schedules list of schedules
* @example class-wcdpue-admin.php add_filter( 'wcdpue_custom_cron_schedule', 300 ); Creates a custom cron
* @since 2.0.0
*/
public function wcdpue_custom_cron_schedule( $schedules ){
$schedules['wcdpue_cron'] = array(
'interval' => apply_filters( 'wcdpue_custom_cron_schedule', 900 ),
'display' => __( 'Every 15 Minutes' )
);
return $schedules;
}
When I check phpdoc it shows like this:
I'm not certain why it says the file is not found but I can't find an example online for using this tag, I was expecting it to show a little code box with my example of usage.
The class file path is oop/admin/class-wcdpue-admin.php
and I have tried changing the doc block to:
/**
* Creates a custom cron schedule.
* @param array $schedules list of schedules
* @example /admin/class-wcdpue-admin.php add_filter( 'wcdpue_custom_cron_schedule', 300 ); Creates a custom cron
* @since 2.0.0
*/
public function wcdpue_custom_cron_schedule( $schedules ){
$schedules['wcdpue_cron'] = array(
'interval' => apply_filters( 'wcdpue_custom_cron_schedule', 900 ),
'display' => __( 'Every 15 Minutes' )
);
return $schedules;
}
The phpdoc command I am running is: php phpDocumentor.phar -d oop/ -t docs/api --sourcecode
if it's of any help I also can't see source code from the rendered phpdoc for any of my defined blocks for some reason:
Any help is appreciated