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.
Completed
Push — master ( a4eef9...fb22a5 )
by Shea
11s
created

ContentBlock::fieldLabels()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 1
1
<?php
2
3
class ContentBlock extends Block
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
4
{
5
    /**
6
     * If the singular name is set in a private static $singular_name, it cannot be changed using the translation files
7
     * for some reason. Fix it by defining a method that handles the translation.
8
     * @return string
9
     */
10
    public function singular_name()
11
    {
12
        return _t('ContentBlock.SINGULARNAME', 'Content Block');
13
    }
14
15
    /**
16
     * If the plural name is set in a private static $plural_name, it cannot be changed using the translation files
17
     * for some reason. Fix it by defining a method that handles the translation.
18
     * @return string
19
     */
20
    public function plural_name()
21
    {
22
        return _t('ContentBlock.PLURALNAME', 'Content Blocks');
23
    }
24
25
    private static $db = array(
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...
26
        'Content' => 'HTMLText',
27
    );
28
29
	public function fieldLabels($includeRelations = true)
30
	{
31
		return array_merge(
32
			parent::fieldLabels($includeRelations),
33
			array(
34
				'Content' => _t('Block.Content', 'Content'),
35
			)
36
		);
37
	}
38
}
39