PluginProbe
Image Optimizer – Compress Images and Convert to WebP or AVIF / trunk
Image Optimizer – Compress Images and Convert to WebP or AVIF vtrunk
1.7.7 1.7.6 1.7.5 1.7.4 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.2.0 1.2.1 1.3.0 1.4.0 1.4.1 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 All 33 releases
← All changes | vendor/woocommerce/action-scheduler/classes/WP_CLI/ProgressBar.php +28 -8 1.3.0 → trunk View file →
@@ -16,21 +16,41 @@
16 16 * @codeCoverageIgnore
17 17 */
18 18 class ProgressBar {
19 19
20 - /** @var integer */
20 + /**
21 + * Current number of ticks.
22 + *
23 + * @var integer
24 + */
21 25 protected $total_ticks;
22 26
23 - /** @var integer */
27 + /**
28 + * Total number of ticks.
29 + *
30 + * @var integer
31 + */
24 32 protected $count;
25 33
26 - /** @var integer */
34 + /**
35 + * Progress bar update interval.
36 + *
37 + * @var integer
38 + */
27 39 protected $interval;
28 40
29 - /** @var string */
41 + /**
42 + * Progress bar message.
43 + *
44 + * @var string
45 + */
30 46 protected $message;
31 47
32 - /** @var \cli\progress\Bar */
48 + /**
49 + * Instance.
50 + *
51 + * @var \cli\progress\Bar
52 + */
33 53 protected $progress_bar;
34 54
35 55 /**
36 56 * ProgressBar constructor.
@@ -37,10 +57,10 @@
37 57 *
38 58 * @param string $message Text to display before the progress bar.
39 59 * @param integer $count Total number of ticks to be performed.
40 60 * @param integer $interval Optional. The interval in milliseconds between updates. Default 100.
41 - *
42 - * @throws Exception When this is not run within WP CLI
61 + *
62 + * @throws \Exception When this is not run within WP CLI.
43 63 */
44 64 public function __construct( $message, $count, $interval = 100 ) {
45 65 if ( ! ( defined( 'WP_CLI' ) && WP_CLI ) ) {
46 66 /* translators: %s php class name */
@@ -63,9 +83,9 @@
63 83
64 84 $this->progress_bar->tick();
65 85 $this->total_ticks++;
66 86
67 - do_action( 'action_scheduler/progress_tick', $this->total_ticks );
87 + do_action( 'action_scheduler/progress_tick', $this->total_ticks ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
68 88 }
69 89
70 90 /**
71 91 * Get the progress bar tick count.