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.

BlockSiteConfigExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A updateCMSFields() 0 4 1
1
<?php
2
3
namespace SheaDawson\Blocks\Extensions;
4
5
use SheaDawson\Blocks\Model\Block;
6
use SilverStripe\ORM\DataExtension;
7
use SilverStripe\Forms\FieldList;
8
9
/**
10
 * Legacy extension to aid with migrating from Blocks 0.x to 1.x.
11
 *
12
 * @author Shea Dawson <[email protected]>
13
 */
14
class BlockSiteConfigExtension extends DataExtension
15
{
16
	private static $many_many = [
0 ignored issues
show
Unused Code introduced by
The property $many_many 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...
17
		"Blocks" => Block::class,
18
	];
19
20
	/**
21
	 *
22
	 **/
23
	public function updateCMSFields(FieldList $fields)
24
	{
25
		$fields->removeByName('Blocks');
26
	}
27
}
28