Passed
Push — 2.0.5 ( ...8a3d9f )
by steve
24:45
created
neon/core/console/PublishController.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
 	 * Useful git command:
47 47
 	 * Under some circumstances you may discover an error or a minor change after publishing.
48 48
 	 * In order to up issue the current version without changing the number you have to delete the tag:
49
-		 * `git push --delete origin v2.0.2 && git tag -d v2.0.2`
49
+	 * `git push --delete origin v2.0.2 && git tag -d v2.0.2`
50 50
 	 * Note that in most circumstances its easier and preferable just to increment the patch number.
51 51
 	 *
52 52
 	 * @return boolean successful publish
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
 		// Check the version number conforms to semver format - 2.0.1 or 3.0.0[-beta][+build]
62 62
 		if (!preg_match('/^[0-9]+\.[0-9]+\.[0-9]+([-+].*)?$/', $version, $match)) {
63
-			$this->stderr("!! The version number is not a valid version it must be in the format '#.#.#' or '#.#.#[-description][+build]'.\n",  Console::FG_RED);
63
+			$this->stderr("!! The version number is not a valid version it must be in the format '#.#.#' or '#.#.#[-description][+build]'.\n", Console::FG_RED);
64 64
 			return ExitCode::UNSPECIFIED_ERROR;
65 65
 		}
66 66
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
 		// Check to see if the javascript has been built since changing
77 77
 		if (!$this->confirm("=> Have you run the neon build process?\n")) {
78
-			$this->stdout("-> Please run the build process before continuing! =>./neo core/build/neon\n",  Console::FG_CYAN);
78
+			$this->stdout("-> Please run the build process before continuing! =>./neo core/build/neon\n", Console::FG_CYAN);
79 79
 			return ExitCode::UNSPECIFIED_ERROR;
80 80
 		}
81 81
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		// need to make sure that the version to update to is specified and checked in, in the composer.json file
84 84
 		// this ensures the tag will have the correct version listed
85 85
 		if (!$this->confirm("=> Are your tests passing?\n")) {
86
-			$this->stdout("-> Please run all of the tests! =>./codecept run\n",  Console::FG_CYAN);
86
+			$this->stdout("-> Please run all of the tests! =>./codecept run\n", Console::FG_CYAN);
87 87
 			return ExitCode::UNSPECIFIED_ERROR;
88 88
 		}
89 89
 
@@ -100,10 +100,10 @@  discard block
 block discarded – undo
100 100
 		$process->wait();
101 101
 		$gitVersions = explode("\n", $process->getOutput());
102 102
 		$versions = [];
103
-		foreach($gitVersions as $v) {
104
-			$v = substr($v, strrpos($v, "/")+1);
103
+		foreach ($gitVersions as $v) {
104
+			$v = substr($v, strrpos($v, "/") + 1);
105 105
 			if ($v == '') continue;
106
-			$versions[] = $v ;
106
+			$versions[] = $v;
107 107
 		}
108 108
 		if (in_array($version, $versions)) {
109 109
 			if (!$this->force) {
Please login to merge, or discard this 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/core/form/fields/Wysiwyg.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -71,18 +71,18 @@  discard block
 block discarded – undo
71 71
 				'toolbar' =>  [
72 72
 					[
73 73
 						'name' => 'paragraph',
74
-						'items' => [ 'Bold', 'Italic', 'Underline', 'Link', 'Unlink', 'EmojiPanel', 'Source' ]
74
+						'items' => ['Bold', 'Italic', 'Underline', 'Link', 'Unlink', 'EmojiPanel', 'Source']
75 75
 					]
76 76
 				]
77 77
 			],
78 78
 			'default' => [
79 79
 				'toolbar' =>  [
80
-					[ 'name' => 'paragraph', 'items' => [ 'Format', 'Bold', 'Italic', 'Underline', '-', 'Superscript', 'Subscript', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock','-', 'NumberedList', 'BulletedList', 'Outdent', 'Indent', 'Blockquote'] ],
81
-					[ 'name' => 'links', 'items' => [ 'Link', 'Unlink', 'Anchor', '-', 'EmojiPanel' ] ],
82
-					[ 'name' => 'insert', 'items' => [
83
-						'Image', ($this->useMediaBrowser ? 'Fireflyimage' : 'SimpleImageUpload'), '-', 'Table', 'SpecialChar' ] ],
84
-					[ 'name' => 'document', 'items' => ['Maximize' ] ],
85
-					[ 'name' => 'source', 'items' => [ 'RemoveFormat', '-', 'Source' ] ]
80
+					['name' => 'paragraph', 'items' => ['Format', 'Bold', 'Italic', 'Underline', '-', 'Superscript', 'Subscript', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'NumberedList', 'BulletedList', 'Outdent', 'Indent', 'Blockquote']],
81
+					['name' => 'links', 'items' => ['Link', 'Unlink', 'Anchor', '-', 'EmojiPanel']],
82
+					['name' => 'insert', 'items' => [
83
+						'Image', ($this->useMediaBrowser ? 'Fireflyimage' : 'SimpleImageUpload'), '-', 'Table', 'SpecialChar']],
84
+					['name' => 'document', 'items' => ['Maximize']],
85
+					['name' => 'source', 'items' => ['RemoveFormat', '-', 'Source']]
86 86
 				],
87 87
 				'extraPlugins' => [($this->useMediaBrowser ? 'fireflyimage' : 'simpleImageUpload')],
88 88
 				'extraAllowedContent'=>'img[srcset,sizes,loading]'
@@ -119,9 +119,9 @@  discard block
 block discarded – undo
119 119
 	 * Return the purified value but allow tags to be as normal
120 120
 	 * otherwise will lose ability to edit wysiwyg fields properly
121 121
 	 */
122
-	public function getValueDisplay($context='')
122
+	public function getValueDisplay($context = '')
123 123
 	{
124
-		if ($context==='grid') {
124
+		if ($context === 'grid') {
125 125
 			return strip_tags(Str::truncate($this->getValue(), 200, '...', null, true));
126 126
 		}
127 127
 		return $this->getValue();
@@ -132,6 +132,6 @@  discard block
 block discarded – undo
132 132
 	 */
133 133
 	public function getComponentDetails()
134 134
 	{
135
-		return ['group' => 'Rich Text',  'icon' => 'fa fa-font', 'order' => 15];
135
+		return ['group' => 'Rich Text', 'icon' => 'fa fa-font', 'order' => 15];
136 136
 	}
137 137
 }
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.