Completed
Push — 3.3 ( 5fced4...d53524 )
by Jerome
22:15 queued 11s
created

engine/classes/Elgg/Cli/FlushCommand.php (1 issue)

1
<?php
2
3
namespace Elgg\Cli;
4
5
/**
6
 * elgg-cli flush
7
 */
8
class FlushCommand extends Command {
9
10
	/**
11
	 * {@inheritdoc}
12
	 */
13
	protected function configure() {
14
		$this->setName('flush')
15
			->setDescription('Flush all caches (deprecated: use "elgg-cli cache:clear")');
16
	}
17
18
	/**
19
	 * {@inheritdoc}
20
	 */
21
	protected function command() {
22
		elgg_deprecated_notice('"elgg-cli flush" has been deprecated, use "elgg-cli cache:clear"', '3.3');
23
		
24
		elgg_flush_caches();
1 ignored issue
show
Deprecated Code introduced by
The function elgg_flush_caches() has been deprecated: 3.3 use elgg_clear_caches() ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

24
		/** @scrutinizer ignore-deprecated */ elgg_flush_caches();

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
25
26
		if (!$this->option('quiet')) {
27
			$this->write('System caches have been flushed');
28
		}
29
30
		return 0;
31
	}
32
}
33