Issues (60)

src/ApprovedRevsFacade.php (3 issues)

1
<?php
2
3
namespace SMW\ApprovedRevs;
4
5
use Title;
0 ignored issues
show
The type Title was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use ApprovedRevs;
0 ignored issues
show
The type ApprovedRevs was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
8
/**
9
 * The original `ApprovedRevs` consist of only static methods which are not mockable
10
 * or useful for any serious unit testing hence we use a facade to access an
11
 * instance.
12
 *
13
 * @license GNU GPL v2+
14
 * @since 1.0
15
 *
16
 * @author mwjames
17
 */
18
class ApprovedRevsFacade {
19
20
	/**
21
	 * @since 1.0
22
	 *
23
	 * @param Title $title
24
	 *
25
	 * @return integer|null
26
	 */
27 1
	public function getApprovedRevID( Title $title ) {
28 1
		return ApprovedRevs::getApprovedRevID( $title );
29
	}
30
31
	/**
32
	 * @since 1.0
33
	 *
34
	 * @param Title $title
35
	 *
36
	 * @return boolean
37
	 */
38 1
	public function hasApprovedRevision( Title $title ) {
39 1
		return ApprovedRevs::hasApprovedRevision( $title );
40
	}
41
42
	/**
43
	 * @since 1.0
44
	 *
45
	 * @param Title $title
46
	 *
47
	 * @return []
0 ignored issues
show
Documentation Bug introduced by
The doc comment [] at position 0 could not be parsed: Unknown type name '[' at position 0 in [].
Loading history...
48
	 */
49 2
	public function getApprovedFileInfo( Title $title ) {
50 2
		return ApprovedRevs::getApprovedFileInfo( $title );
51
	}
52
53
	/**
54
	 * @since 1.0
55
	 *
56
	 * @param Title $title
57
	 */
58 1
	public function clearApprovedFileInfo( Title $title ) {
59 1
		ApprovedRevs::clearApprovedFileInfo( $title );
60 1
	}
61
62
}
63