Passed
Push — master ( 0be41b...766fcd )
by Leo
02:55
created
code/Extensions/CustomBlockPermissions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,11 +2,11 @@  discard block
 block discarded – undo
2 2
 
3 3
 class CustomBlockPermission extends DataExtension implements PermissionProvider {
4 4
 	public function canConfigPageAndType($member = false) {
5
-		return Permission::check(get_class($this->owner) . '_config_page_and_type');
5
+		return Permission::check(get_class($this->owner).'_config_page_and_type');
6 6
 	}
7 7
 	
8 8
 	public function canConfigMemberVisibility($member = false) {
9
-		return Permission::check(get_class($this->owner) . '_config_member_visibility');
9
+		return Permission::check(get_class($this->owner).'_config_member_visibility');
10 10
 	}
11 11
 	
12 12
 	public function providePermissions() {
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 				'config_page_and_type',
17 17
 				'config_member_visibility'
18 18
 			) as $name) {
19
-				$permissions[$class . '_' . $name] = $class . '_' . $name;
19
+				$permissions[$class.'_'.$name] = $class.'_'.$name;
20 20
 			}
21 21
 		}
22 22
 		return $permissions;
Please login to merge, or discard this patch.
code/MultiClassSelector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 	public function getHTMLFragments($grid) {
21 21
 		$classes = $this->getClasses($grid);
22 22
 
23
-		if(!count($classes)) {
23
+		if (!count($classes)) {
24 24
 			return array();
25 25
 		}
26 26
 
Please login to merge, or discard this patch.
code/Admin/VersionedForm.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-use SaltedHerring\Debugger as Debugger;
4
-
5 3
 class VersionedForm extends GridFieldDetailForm {
6 4
 	
7 5
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 		if ($form instanceof Form) {
21 21
 			$actions = $form->Actions();
22 22
 			$record = $this->record;
23
-			$actions->insertBefore('action_doDelete', $btnPublish = FormAction::create('doPublish','Save &amp; Publish'));
23
+			$actions->insertBefore('action_doDelete', $btnPublish = FormAction::create('doPublish', 'Save &amp; Publish'));
24 24
 			$btnPublish->addExtraClass('ss-ui-action-constructive');
25 25
 			if (!empty($record->ID)) {
26 26
 				if ($record->isPublished()) {
Please login to merge, or discard this patch.
code/BlocksAdmin.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php use SaltedHerring\Debugger as Debugger;
1
+<?php 
2 2
 /**
3 3
  * @file BlocksAdmin.php
4 4
  *
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@
 block discarded – undo
45 45
 		$subBlocks = ClassInfo::subclassesFor('Block');
46 46
 		if (is_null($subBlocks)) {
47 47
 			$subBlocks = array('Block');
48
-		}else{
49
-			$disabledTypes = Config::inst()->get('Block','DisabledBlocks');
48
+		} else {
49
+			$disabledTypes = Config::inst()->get('Block', 'DisabledBlocks');
50 50
 			if (!empty($disabledTypes)) {
51 51
 				foreach ($disabledTypes as $disabledType) {
52 52
 					unset($subBlocks[$disabledType]);
Please login to merge, or discard this patch.
code/OrderableBlocks.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@
 block discarded – undo
5 5
 		$pool = array_values($values);
6 6
 		sort($pool);
7 7
 
8
-		foreach(array_values($order) as $pos => $id) {
9
-			if($values[$id] != $pool[$pos]) {
8
+		foreach (array_values($order) as $pos => $id) {
9
+			if ($values[$id] != $pool[$pos]) {
10 10
 				DB::query(sprintf(
11 11
 					'UPDATE "%s" SET "%s" = %d WHERE %s',
12 12
 					$this->getSortTable($list),
Please login to merge, or discard this patch.
code/Extensions/BlockinPage.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 class BlockinPage extends Extension {
4
-	private static $belongs_many_many = array (
4
+	private static $belongs_many_many = array(
5 5
 		'Blocks'			=>	'Block'
6 6
 	);
7 7
 	
8
-	public function updateCMSFields( FieldList $fields ) {
8
+	public function updateCMSFields(FieldList $fields) {
9 9
 		$ancestry = ClassInfo::ancestry($this->owner->ClassName);
10 10
 		if (!in_array('RedirectorPage', $ancestry) && !in_array('VirtualPage', $ancestry)) {
11 11
 			$blocks = $this->owner->Blocks();
12
-			$blocks_grid = $this->gridBuilder('Blocks', $blocks, '', true,'GridFieldConfig_RelationEditor');
12
+			$blocks_grid = $this->gridBuilder('Blocks', $blocks, '', true, 'GridFieldConfig_RelationEditor');
13 13
 			$docked_grid = $this->gridBuilder('DockedBlocks', $this->dockedBlocks(), '');
14 14
 			
15 15
 			$fields->addFieldToTab('Root.MyBlocks', $blocks_grid);
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 		$grid = new GridField($name, $label, $source);
29 29
 		$config = $gridHeaderType::create();
30 30
 		$config->removeComponentsByType('GridFieldAddNewButton');
31
-		if ( $canAdd ) {
31
+		if ($canAdd) {
32 32
 			$config
33 33
 			->removeComponentsByType('GridFieldPaginator')
34 34
 			->removeComponentsByType('GridFieldDetailForm')
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 				$IDs[] = $BlockID;
57 57
 			}
58 58
 		}
59
-		$blocks = Block::get()->filter('ID', $IDs)->sort('SortOrder','ASC');
59
+		$blocks = Block::get()->filter('ID', $IDs)->sort('SortOrder', 'ASC');
60 60
 		return $blocks;
61 61
 	}
62 62
 }
63 63
\ No newline at end of file
Please login to merge, or discard this patch.
code/ExtendedBlocks/DualColumnBlock.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 class DualColumnBlock extends Block {
4 4
 	private static $singular_name = 'Dual-column Block';
5
-	private static $db = array (
5
+	private static $db = array(
6 6
 		'LeftColumn'		=>	'HTMLText',
7 7
 		'RightColumn'	=>	'HTMLText'
8 8
 	);
Please login to merge, or discard this patch.
code/ExtendedBlocks/SingleColumnBlock.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 class SingleColumnBlock extends Block {
4 4
 	private static $singular_name = 'Single-column Block';
5
-	private static $db = array (
5
+	private static $db = array(
6 6
 		'Content'	=>	'HTMLText'
7 7
 	);
8 8
 }
9 9
\ No newline at end of file
Please login to merge, or discard this patch.
code/ExtendedBlocks/TriColumnBlock.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 class TriColumnBlock extends Block {
4 4
 	private static $singular_name = 'Triple-column Block';
5
-	private static $db = array (
5
+	private static $db = array(
6 6
 		'LeftColumn'		=>	'HTMLText',
7 7
 		'MiddleColumn'	=>	'HTMLText',
8 8
 		'RightColumn'	=>	'HTMLText'
Please login to merge, or discard this patch.