Passed
Push — 2.0.5 ( ...8a3d9f )
by steve
24:45
created
neon/core/console/PublishController.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,9 @@
 block discarded – undo
102 102
 		$versions = [];
103 103
 		foreach($gitVersions as $v) {
104 104
 			$v = substr($v, strrpos($v, "/")+1);
105
-			if ($v == '') continue;
105
+			if ($v == '') {
106
+				continue;
107
+			}
106 108
 			$versions[] = $v ;
107 109
 		}
108 110
 		if (in_array($version, $versions)) {
Please login to merge, or discard this patch.
neon/cms/form/fields/Slug.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -66,7 +66,9 @@  discard block
 block discarded – undo
66 66
 		]);
67 67
 
68 68
 		// assuming operation using DDS where form $name maps to dds classType
69
-		if (!$this->hasForm()) return;
69
+		if (!$this->hasForm()) {
70
+			return;
71
+		}
70 72
 		$classType = $this->getForm()->getName();
71 73
 		Event::on(DdsObjectManager::class, "dds.afterAdd.$classType", [$this, 'addCmsUrl']);
72 74
 		Event::on(DdsObjectManager::class, "dds.afterEdit.$classType", [$this, 'editCmsUrl']);
@@ -91,12 +93,16 @@  discard block
 block discarded – undo
91 93
 	 */
92 94
 	public function editCmsUrl(ObjectEditEvent $event)
93 95
 	{
94
-		if (!isset($event->object[$this->name])) return;
96
+		if (!isset($event->object[$this->name])) {
97
+			return;
98
+		}
95 99
 		$originalSlug = $event->originalValues[$this->name];
96 100
 		$newSlug = $event->object[$this->name];
97 101
 		// edit the slug in the cms_url table
98 102
 		$url = CmsUrl::findOne(['url' => $originalSlug]);
99
-		if ($url === null) $url = new CmsUrl();
103
+		if ($url === null) {
104
+			$url = new CmsUrl();
105
+		}
100 106
 		$url->url = $newSlug;
101 107
 		$url->nice_id = $this->pageId;
102 108
 		$url->save();
@@ -108,7 +114,9 @@  discard block
 block discarded – undo
108 114
 	 */
109 115
 	public function addCmsUrl(ObjectAddEvent $event)
110 116
 	{
111
-		if (!isset($event->object[$this->name])) return;
117
+		if (!isset($event->object[$this->name])) {
118
+			return;
119
+		}
112 120
 		$slug = $event->object[$this->name];
113 121
 		// add a new slug to cms url table
114 122
 		$cmsUrl = new CmsUrl();
Please login to merge, or discard this patch.