Passed
Push — develop ( 7bdbd7...e398eb )
by Neill
33:33 queued 15s
created
neon/core/db/Migrator.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 		}
100 100
 		foreach ($migrations as $migration) {
101 101
 			if (!$this->migrateUp($migration)) {
102
-				throw new \Exception('Migration failed : ' . $migration);
102
+				throw new \Exception('Migration failed : '.$migration);
103 103
 			}
104 104
 		}
105 105
 	}
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 	 * @param array $applied  the set of already applied migrations
135 135
 	 * @return array   the set of new migrations to be run
136 136
 	 */
137
-	private function getNewMigrationsInPath($pathAlias, $applied, $migrationAlias=null)
137
+	private function getNewMigrationsInPath($pathAlias, $applied, $migrationAlias = null)
138 138
 	{
139 139
 		if ($migrationAlias === null)
140 140
 			$migrationAlias = $pathAlias;
@@ -146,8 +146,8 @@  discard block
 block discarded – undo
146 146
 				if ($file === '.' || $file === '..') {
147 147
 					continue;
148 148
 				}
149
-				$path = $migrationPath . DIRECTORY_SEPARATOR . $file;
150
-				$migrationName = $migrationAlias . '/' . str_replace('.php', '', $file);
149
+				$path = $migrationPath.DIRECTORY_SEPARATOR.$file;
150
+				$migrationName = $migrationAlias.'/'.str_replace('.php', '', $file);
151 151
 				if (is_file($path) && !isset($applied[$migrationName])) {
152 152
 					$migrations[] = $migrationName;
153 153
 				}
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 		// try migrate up
273 273
 		$migrations = $this->getNewMigrations();
274 274
 		foreach ($migrations as $i => $migration) {
275
-			if (strpos($migration, $version . '_') === 0) {
275
+			if (strpos($migration, $version.'_') === 0) {
276 276
 				$this->actionUp($i + 1);
277 277
 
278 278
 				return self::EXIT_CODE_NORMAL;
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 		// try migrate down
283 283
 		$migrations = array_keys($this->getMigrationHistory(null));
284 284
 		foreach ($migrations as $i => $migration) {
285
-			if (strpos($migration, $version . '_') === 0) {
285
+			if (strpos($migration, $version.'_') === 0) {
286 286
 				if ($i === 0) {
287 287
 					$this->stdout("Already at '$originalVersion'. Nothing needs to be done.\n", Console::FG_YELLOW);
288 288
 				} else {
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 	/**
339 339
 	 * @inheritdoc
340 340
 	 */
341
-	public function stdout($message, $color='')
341
+	public function stdout($message, $color = '')
342 342
 	{
343 343
 		echo $message;
344 344
 	}
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 	 * @param  string  $type - can be one of 'info' | 'error' | 'danger' | 'warning' | 'success'
382 382
 	 * @return string / stream
383 383
 	 */
384
-	public function log($message, $type='info')
384
+	public function log($message, $type = 'info')
385 385
 	{
386 386
 		$colors = [
387 387
 			'info' => Console::FG_BLUE, 'warning' => Console::FG_YELLOW,
@@ -431,10 +431,10 @@  discard block
 block discarded – undo
431 431
 		foreach ($migrations as $migration) {
432 432
 			// remove any paths to get the migration itself
433 433
 			$migrationPart = $migration;
434
-			if (strpos($migration,'/')!==false)
435
-				$migrationPart = substr($migration, strrpos($migration,'/')+1);
434
+			if (strpos($migration, '/') !== false)
435
+				$migrationPart = substr($migration, strrpos($migration, '/') + 1);
436 436
 
437
-			$parts = explode('_', substr($migrationPart,1)); // remove initial m
437
+			$parts = explode('_', substr($migrationPart, 1)); // remove initial m
438 438
 
439 439
 			// check it was a migration and has enough parts
440 440
 			if (count($parts) == 1) {
@@ -452,10 +452,10 @@  discard block
 block discarded – undo
452 452
 			if (!is_numeric($time) || strlen($time) != 6)
453 453
 				$time = '000000';
454 454
 			// some datetimes are YYYYMMDD and others YYMMDD. Canonicalise these
455
-			if (strlen($date)==6)
455
+			if (strlen($date) == 6)
456 456
 				$date = "20$date";
457 457
 			// turn this into 'YYYY-MM-DD HH:MM:SS' and then into a timestamp
458
-			$dateTime = substr($date,0,4)."-".substr($date,4,2)."-".substr($date,6,2)." ".substr($time,0,2).":".substr($time,2,2).":".substr($time,4,2);
458
+			$dateTime = substr($date, 0, 4)."-".substr($date, 4, 2)."-".substr($date, 6, 2)." ".substr($time, 0, 2).":".substr($time, 2, 2).":".substr($time, 4, 2);
459 459
 			$timestamp = strtotime($dateTime);
460 460
 			if ($timestamp == false)
461 461
 				throw new \Exception("Invalid datetime in migration $migration. Date(yyyymmdd)=$date and time(hhmmss)=$time. Please fix.");
Please login to merge, or discard this patch.
neon/core/services/accountManager/AccountManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 	public function getTenantDb()
51 51
 	{
52 52
 		// if the application does not support multi tenancy then simply return the main database
53
-		if ( ! neon()->multiTenant || ! $this->isOnMasterDomain()) {
53
+		if (!neon()->multiTenant || !$this->isOnMasterDomain()) {
54 54
 			return neon()->get('db');
55 55
 		}
56 56
 
Please login to merge, or discard this patch.
neon/core/themes/blacktie/AppAsset.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 		'theme.css',
22 22
 		'https://fonts.googleapis.com/css?family=Nunito+Sans:200,200i,300,300i,400,400i,600,600i,700,700i'
23 23
 	];
24
-	public $sourcePath = __DIR__ . '/assets';
24
+	public $sourcePath = __DIR__.'/assets';
25 25
 	public $depends = [
26 26
 		'neon\core\assets\CoreAsset',
27 27
 		'\yii\bootstrap\BootstrapAsset',
@@ -30,6 +30,6 @@  discard block
 block discarded – undo
30 30
 	public function init()
31 31
 	{
32 32
 		$info = neon()->assetManager->publish($this->sourcePath, $this->publishOptions);
33
-		neon()->view->registerJs('var NEON_THEME_URL = "' . $info[1] . '";', View::POS_HEAD, 'neonThemeData');
33
+		neon()->view->registerJs('var NEON_THEME_URL = "'.$info[1].'";', View::POS_HEAD, 'neonThemeData');
34 34
 	}
35 35
 }
Please login to merge, or discard this patch.
neon/core/themes/neon/Assets.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 		'theme.css',
22 22
 		'https://fonts.googleapis.com/css?family=Nunito+Sans:200,200i,300,300i,400,400i,600,600i,700,700i,800,900',
23 23
 	];
24
-	public $sourcePath = __DIR__ . '/assets';
24
+	public $sourcePath = __DIR__.'/assets';
25 25
 	public $depends = [
26 26
 		'\neon\core\assets\CoreAsset',
27 27
 		'\yii\bootstrap\BootstrapAsset',
@@ -30,6 +30,6 @@  discard block
 block discarded – undo
30 30
 	public function init()
31 31
 	{
32 32
 		$info = neon()->assetManager->publish($this->sourcePath, $this->publishOptions);
33
-		neon()->view->registerJs('var NEON_THEME_URL = "' . $info[1] . '";', View::POS_HEAD, 'neonThemeData');
33
+		neon()->view->registerJs('var NEON_THEME_URL = "'.$info[1].'";', View::POS_HEAD, 'neonThemeData');
34 34
 	}
35 35
 }
Please login to merge, or discard this patch.
neon/core/form/fields/Time.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
 	{
56 56
 		$bits = explode(':', $timeString);
57 57
 		return [
58
-			'hh' => Arr::get($bits,0, '00'),
59
-			'mm' => Arr::get($bits,1, '00'),
60
-			'ss' => Arr::get($bits,2, '00')
58
+			'hh' => Arr::get($bits, 0, '00'),
59
+			'mm' => Arr::get($bits, 1, '00'),
60
+			'ss' => Arr::get($bits, 2, '00')
61 61
 		];
62 62
 	}
63 63
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 	/**
126 126
 	 * @inheritdoc
127 127
 	 */
128
-	public function processAsFilter(IQuery $query, $searchData=null)
128
+	public function processAsFilter(IQuery $query, $searchData = null)
129 129
 	{
130 130
 		$searchData = ($searchData === null) ? $this->getValue() : $searchData;
131 131
 		if (!empty($searchData)) {
Please login to merge, or discard this patch.
neon/core/form/fields/FileMultiple.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,6 +42,6 @@
 block discarded – undo
42 42
 		$display = [];
43 43
 		foreach ($this->value as $file)
44 44
 			$display[] = Html::a(neon()->firefly->getFileName($file), neon()->firefly->getUrl($file), ['target' => '_blank']);
45
-		return implode(', <br>',$display);
45
+		return implode(', <br>', $display);
46 46
 	}
47 47
 }
48 48
\ No newline at end of file
Please login to merge, or discard this patch.
neon/core/form/fields/DateRange.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	/**
91 91
 	 * @inheritdoc
92 92
 	 */
93
-	public function processAsFilter(IQuery $query, $searchData=null)
93
+	public function processAsFilter(IQuery $query, $searchData = null)
94 94
 	{
95 95
 		$searchData = ($searchData === null) ? $this->getData() : $searchData;
96 96
 		if ($searchData !== '') {
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	{
127 127
 		$value = parent::getValue();
128 128
 		// the result must be an array with 'from'=> and 'to'=>
129
-		if ( is_array($value) && isset($value['from'], $value['to']) ) {
129
+		if (is_array($value) && isset($value['from'], $value['to'])) {
130 130
 			return [
131 131
 				'from' => $this->_isDateValid($value['from']) ? $value['from'] : '',
132 132
 				'to' => $this->_isDateValid($value['to']) ? $value['to'] : ''
Please login to merge, or discard this patch.
neon/core/form/fields/SelectDynamic.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 * Any filters you want to apply to a data map selection.
64 64
 	 * @var array  field=>value
65 65
 	 */
66
-	public $dataMapFilters=[];
66
+	public $dataMapFilters = [];
67 67
 
68 68
 	/**
69 69
 	 * Any fields you want to return in a data map selection if not the default.
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 	 *   string (otherwise with a space) and prefix postfix arguments will be
75 75
 	 *   applied to it.
76 76
 	 */
77
-	public $dataMapFields=[];
77
+	public $dataMapFields = [];
78 78
 
79 79
 	/**
80 80
 	 * @inheritdoc
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 * @return array
134 134
 	 * @throws \Exception
135 135
 	 */
136
-	public function getMapObjects($query=null, $start=0, $length=100)
136
+	public function getMapObjects($query = null, $start = 0, $length = 100)
137 137
 	{
138 138
 		$provider = $this->getProviderService();
139 139
 		$format = ['prefix'=>'', 'concat'=>' ', 'postfix' => ''];
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 		$items = $this->getItems();
171 171
 		if (is_array($this->value)) {
172 172
 			$values = array_intersect_key($items, array_flip($this->value));
173
-			return implode(', ',$values);
173
+			return implode(', ', $values);
174 174
 		} else if (isset($items[$this->value])) {
175 175
 			return $items[$this->value];
176 176
 		}
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 	/**
206 206
 	 * @inheritdoc
207 207
 	 */
208
-	public function processAsFilter(IQuery $query, $searchData=null)
208
+	public function processAsFilter(IQuery $query, $searchData = null)
209 209
 	{
210 210
 		$searchData = ($searchData === null) ? $this->getValue() : $searchData;
211 211
 		if ($searchData !== '') {
Please login to merge, or discard this patch.
neon/core/form/fields/Password.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 	/**
50 50
 	 * @inheritdoc
51 51
 	 */
52
-	public function processAsFilter(IQuery $query, $searchData=null)
52
+	public function processAsFilter(IQuery $query, $searchData = null)
53 53
 	{
54 54
 		// cannot search as a filter
55 55
 	}
Please login to merge, or discard this patch.