Passed
Push — master ( 17a49b...bad84e )
by Nicolaas
04:19
created
src/Traits/CMSNicetiesTraitForRightTitles.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
         if (is_array($rightFieldDescriptions) && count($rightFieldDescriptions)) {
13 13
             foreach ($rightFieldDescriptions as $field => $desc) {
14 14
                 $formField = $fields->DataFieldByName($field);
15
-                if (! $formField) {
15
+                if (!$formField) {
16 16
                     $formField = $fields->DataFieldByName($field . 'ID');
17 17
                 }
18 18
 
Please login to merge, or discard this patch.
src/Traits/CMSNicetiesTraitForCanMethods.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 {
11 11
     public function canCreate($member = null, $context = [])
12 12
     {
13
-        if (! $member) {
13
+        if (!$member) {
14 14
             $member = Security::getCurrentUser();
15 15
         }
16 16
 
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
             if ($obj instanceof ArrayList) {
20 20
                 $outcome = true;
21 21
                 foreach ($obj as $item) {
22
-                    if (! $item->canCreate($member, $context)) {
22
+                    if (!$item->canCreate($member, $context)) {
23 23
                         $outcome = false;
24 24
 
25 25
                         break;
Please login to merge, or discard this patch.
src/Traits/CMSNicetiesTraitForTabs.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,11 +37,11 @@  discard block
 block discarded – undo
37 37
 
38 38
             // fixd existing existing tab
39 39
             $tab = $fields->fieldByName('Root.' . $tabName);
40
-            if (! $tab) {
40
+            if (!$tab) {
41 41
                 $tab = $fields->fieldByName('Root.' . $tabNamePlus);
42 42
             }
43 43
 
44
-            if (! $tab) {
44
+            if (!$tab) {
45 45
                 $tab = new Tab($tabNamePlus, $tabName);
46 46
             }
47 47
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     public function addTab(FieldList $fields, string $name, ?string $after = 'Main', ?string $title = '')
69 69
     {
70 70
         // add spaces between capitals
71
-        if (! $title) {
71
+        if (!$title) {
72 72
             $items = preg_split('#(?=[A-Z])#', $name);
73 73
             $title = is_array($items) ? trim(implode(' ', $items)) : $name;
74 74
         }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                     'Root',
83 83
                     $name
84 84
                 );
85
-                if (! $tab) {
85
+                if (!$tab) {
86 86
                     $tab = Tab::create($name, $title);
87 87
                 }
88 88
 
Please login to merge, or discard this patch.
src/Forms/CMSNicetiesEasyRelationshipField.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
                     $this->getGridFieldConfig->removeComponentsByType(GridFieldAddNewButton::class);
387 387
                 }
388 388
 
389
-                if (! $this->hasAddExisting) {
389
+                if (!$this->hasAddExisting) {
390 390
                     $this->getGridFieldConfig->removeComponentsByType(GridFieldAddExistingAutocompleter::class);
391 391
                 }
392 392
 
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
 
494 494
     protected function listIsEmpty(): bool
495 495
     {
496
-        return ! $this->children || ($this->children instanceof FieldList && ! $this->children->exists());
496
+        return !$this->children || ($this->children instanceof FieldList && !$this->children->exists());
497 497
     }
498 498
 
499 499
     protected function checkIfFieldsHaveBeenBuilt()
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
 
576 576
         // do we need it because we do not have a checkboxset?
577 577
         //we can go without!
578
-        return ! $this->hasCheckboxSet();
578
+        return !$this->hasCheckboxSet();
579 579
     }
580 580
 
581 581
     private function getSortField(): string
Please login to merge, or discard this patch.
_config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,6 +2,6 @@
 block discarded – undo
2 2
 
3 3
 use SilverStripe\Control\Director;
4 4
 
5
-if (! Director::isDev()) {
5
+if (!Director::isDev()) {
6 6
     Director::forceSSL();
7 7
 }
Please login to merge, or discard this patch.
src/Api/BasicFixes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 {
10 10
     public static function flush()
11 11
     {
12
-        if (Security::database_is_ready() && self::table_exists('Member') && (DB::get_schema()->hasTable('Member') && ! Environment::getEnv('SS_EK_SPREEK_AFRIKAANS'))) {
12
+        if (Security::database_is_ready() && self::table_exists('Member') && (DB::get_schema()->hasTable('Member') && !Environment::getEnv('SS_EK_SPREEK_AFRIKAANS'))) {
13 13
             DB::query('UPDATE Member SET Member.Locale = \'en_US\' WHERE Member.Locale = \'af_ZA\'');
14 14
         }
15 15
     }
Please login to merge, or discard this patch.
src/Extensions/LeftAndMainExtension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,11 +30,11 @@
 block discarded – undo
30 30
     public function updateClientConfig($clientConfig)
31 31
     {
32 32
         $brandColourProviders = ClassInfo::implementorsOf(BrandColourProvider::class);
33
-        if($brandColourProviders) {
34
-            foreach($brandColourProviders as $provider) {
33
+        if ($brandColourProviders) {
34
+            foreach ($brandColourProviders as $provider) {
35 35
                 $providerInstance = new $provider();
36 36
                 $brandColours = $providerInstance->getBrandColours();
37
-                if($brandColours) {
37
+                if ($brandColours) {
38 38
                     $clientConfig['brand_colours'] = $brandColours;
39 39
                     break;
40 40
                 }
Please login to merge, or discard this patch.
src/Extensions/ModelAdminExtension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
     {
30 30
         $owner = $this->getOwner();
31 31
         $excludedModelAdmins = Config::inst()->get(ModelAdmin::class, 'excluded_modeladmins_from_ssu_extension');
32
-        if (! in_array(get_class($owner), $excludedModelAdmins, true)) {
32
+        if (!in_array(get_class($owner), $excludedModelAdmins, true)) {
33 33
             $excludedModels = Config::inst()->get(ModelAdmin::class, 'excluded_models_from_ssu_extension');
34
-            if (! in_array($owner->modelClass, $excludedModels, true)) {
34
+            if (!in_array($owner->modelClass, $excludedModels, true)) {
35 35
                 // This check is simply to ensure you are on the managed model you want adjust accordingly
36 36
                 $obj = Injector::inst()->get($owner->modelClass);
37 37
                 if ($obj) {
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
                         foreach ($sortFields as $sortField) {
44 44
                             if (isset($dbFields[$sortField])) {
45 45
                                 // This is just a precaution to ensure we got a GridField from dataFieldByName() which you should have
46
-                                if (! $config->getComponentByType(GridFieldSortableRows::class)) {
46
+                                if (!$config->getComponentByType(GridFieldSortableRows::class)) {
47 47
                                     $obj = $owner->modelClass::singleton();
48 48
                                     if ($obj->hasExtension(Versioned::class)) {
49 49
                                         $sorter = (new GridFieldSortableRows($sortField))
Please login to merge, or discard this patch.