Passed
Push — master ( 0dfcce...5ed5da )
by Paul
02:55
created

logger.php (1 issue)

Severity
1
<?php
2
/**
3
 * ╔═╗╔═╗╔╦╗╦╔╗╔╦  ╦  ╔═╗╔╗ ╔═╗
4
 * ║ ╦║╣ ║║║║║║║║  ║  ╠═╣╠╩╗╚═╗
5
 * ╚═╝╚═╝╩ ╩╩╝╚╝╩  ╩═╝╩ ╩╚═╝╚═╝
6
 *
7
 * Plugin Name: Logger
8
 * Description: Provides a logger for WordPress development
9
 * Version:     1.0.0
10
 * Author:      Paul Ryley
11
 * Author URI:  https://profiles.wordpress.org/pryley#content-plugins
12
 * License:     GPL3
13
 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
14
 * Text Domain: logger
15
 * Domain Path: languages
16
 */
17
18
defined( 'WPINC' ) || die;
19
20
if( !class_exists( 'GL_Activate' )) {
21
	require_once __DIR__.'/activate.php';
22
}
23
require_once __DIR__.'/autoload.php';
24
if( GL_Activate::shouldDeactivate( __FILE__ ))return;
25
GeminiLabs\Logger\Application::load()->init();
26
27
/**
28
 * Alternate to: `apply_filters( 'logger', $data, $optional_log_type );`
29
 * @param mixed $message
30
 * @return GeminiLabs\Logger\Log
31
 */
32
function gllog( $message = null ) {
1 ignored issue
show
The parameter $message is not used and could be removed. ( Ignorable by Annotation )

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

32
function gllog( /** @scrutinizer ignore-unused */ $message = null ) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
33
	$logger = GeminiLabs\Logger\Application::load()->log->logger();
34
	return func_num_args() > 0
35
		? $logger->debug( func_get_arg(0) )
36
		: $logger;
37
}
38