GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

ContentBlock   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 38
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A singular_name() 0 4 1
A plural_name() 0 4 1
A fieldLabels() 0 9 1
1
<?php
2
3
namespace SheaDawson\Blocks\Model;
4
5
class ContentBlock extends Block
6
{
7
	private static $table_name = "ContentBlock";
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
Unused Code introduced by
The property $table_name is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
8
9
    /**
10
     * If the singular name is set in a private static $singular_name, it cannot be changed using the translation files
11
     * for some reason. Fix it by defining a method that handles the translation.
12
     * @return string
13
     */
14
    public function singular_name()
15
    {
16
        return _t('ContentBlock.SINGULARNAME', 'Content Block');
17
    }
18
19
    /**
20
     * If the plural name is set in a private static $plural_name, it cannot be changed using the translation files
21
     * for some reason. Fix it by defining a method that handles the translation.
22
     * @return string
23
     */
24
    public function plural_name()
25
    {
26
        return _t('ContentBlock.PLURALNAME', 'Content Blocks');
27
    }
28
29
    private static $db = [
0 ignored issues
show
Comprehensibility introduced by
Consider using a different property name as you override a private property of the parent class.
Loading history...
Unused Code introduced by
The property $db is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
30
        'Content' => 'HTMLText',
31
    ];
32
33
	public function fieldLabels($includeRelations = true)
34
	{
35
		return array_merge(
36
			parent::fieldLabels($includeRelations),
37
			[
38
				'Content' => _t('Block.Content', 'Content'),
39
			]
40
		);
41
	}
42
}
43