@@ -133,7 +133,7 @@ |
||
133 | 133 | |
134 | 134 | protected function isAllowType($type) |
135 | 135 | { |
136 | - $constName = __CLASS__ . '::' . strtoupper($type) . '_TYPE'; |
|
136 | + $constName = __CLASS__.'::'.strtoupper($type).'_TYPE'; |
|
137 | 137 | |
138 | 138 | return defined($constName); |
139 | 139 | } |
@@ -60,7 +60,7 @@ |
||
60 | 60 | * Add grant information |
61 | 61 | * |
62 | 62 | * @param string $action action type |
63 | - * @param string|array $type value type |
|
63 | + * @param string $type value type |
|
64 | 64 | * @param mixed $value values |
65 | 65 | * @return $this |
66 | 66 | */ |
@@ -550,7 +550,7 @@ |
||
550 | 550 | $componentsFetched = []; |
551 | 551 | array_walk( |
552 | 552 | $componentList, |
553 | - function ($info, $key) use (&$componentsFetched, $type) { |
|
553 | + function($info, $key) use (&$componentsFetched, $type) { |
|
554 | 554 | $componentType = $this->getComponentType($key); |
555 | 555 | if ($componentType === $type) { |
556 | 556 | $componentsFetched[$key] = $info; |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | */ |
264 | 264 | public function has($group, $id) |
265 | 265 | { |
266 | - return $this->configHandler->get($group, $id) === null? false : true; |
|
266 | + return $this->configHandler->get($group, $id) === null ? false : true; |
|
267 | 267 | } |
268 | 268 | |
269 | 269 | /** |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | |
320 | 320 | $rules = []; |
321 | 321 | foreach ($type->getRules() as $columnName => $rule) { |
322 | - $key = camel_case($config->get('id') . '_' . $columnName); |
|
322 | + $key = camel_case($config->get('id').'_'.$columnName); |
|
323 | 323 | $rules[$key] = $rule; |
324 | 324 | } |
325 | 325 |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | public function add(Blueprint $table, $prefix = '') |
128 | 128 | { |
129 | 129 | // make all names to camel case |
130 | - $this->{'name'} = camel_case($prefix . $this->{'name'}); |
|
130 | + $this->{'name'} = camel_case($prefix.$this->{'name'}); |
|
131 | 131 | |
132 | 132 | if (method_exists($table, $this->{'dataType'}) === false) { |
133 | 133 | throw new Exceptions\InvalidColumnEntityException; |
@@ -158,6 +158,6 @@ discard block |
||
158 | 158 | */ |
159 | 159 | public function drop(Blueprint $table, $prefix = '') |
160 | 160 | { |
161 | - $table->dropColumn(camel_case($prefix . $this->{'name'})); |
|
161 | + $table->dropColumn(camel_case($prefix.$this->{'name'})); |
|
162 | 162 | } |
163 | 163 | } |
@@ -121,7 +121,7 @@ |
||
121 | 121 | |
122 | 122 | $this->group = $this->options['table']; |
123 | 123 | if (isset($this->options['id'])) { |
124 | - $this->group = $this->options['table'] . '_' . $this->options['id']; |
|
124 | + $this->group = $this->options['table'].'_'.$this->options['id']; |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | if (isset($this->options['group'])) { |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | { |
129 | 129 | foreach ($this->register->get(self::FIELD_TYPE) as $id => $type) { |
130 | 130 | /** @var \Xpressengine\DynamicField\AbstractSkin $skin */ |
131 | - foreach ($this->register->get($id . PluginRegister::KEY_DELIMITER . self::FIELD_SKIN) as $skin) { |
|
131 | + foreach ($this->register->get($id.PluginRegister::KEY_DELIMITER.self::FIELD_SKIN) as $skin) { |
|
132 | 132 | yield $this->getType($handler, $skin::getId()); |
133 | 133 | } |
134 | 134 | } |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | public function getSkinsByType(Handler $handler, $id) |
146 | 146 | { |
147 | 147 | /** @var \Xpressengine\DynamicField\AbstractSkin $skin */ |
148 | - foreach ($this->register->get($id . PluginRegister::KEY_DELIMITER . self::FIELD_SKIN) as $skin) { |
|
148 | + foreach ($this->register->get($id.PluginRegister::KEY_DELIMITER.self::FIELD_SKIN) as $skin) { |
|
149 | 149 | yield $this->getSkin($handler, $skin::getId()); |
150 | 150 | } |
151 | 151 | } |
@@ -258,14 +258,14 @@ discard block |
||
258 | 258 | $self = $this; |
259 | 259 | $this->handler->connection()->getSchemaBuilder()->create( |
260 | 260 | $this->handler->getConfigHandler()->getTableName($this->config), |
261 | - function (Blueprint $table) use ($column, $self) { |
|
261 | + function(Blueprint $table) use ($column, $self) { |
|
262 | 262 | $column->add($table, 'dynamic_field_target_'); |
263 | 263 | |
264 | 264 | /** |
265 | 265 | * @var ColumnEntity $addColumn |
266 | 266 | */ |
267 | 267 | foreach ($self->columns() as $addColumn) { |
268 | - $addColumn->add($table, $self->config->get('id') . '_'); |
|
268 | + $addColumn->add($table, $self->config->get('id').'_'); |
|
269 | 269 | } |
270 | 270 | $table->primary(array($column->name), 'primaryKey'); |
271 | 271 | } |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | |
287 | 287 | $this->handler->connection()->getSchemaBuilder()->create( |
288 | 288 | $this->handler->getConfigHandler()->getRevisionTableName($this->config), |
289 | - function (Blueprint $table) use ($column, $self) { |
|
289 | + function(Blueprint $table) use ($column, $self) { |
|
290 | 290 | $table->string('revisionId', 255); |
291 | 291 | $table->integer('revisionNo')->default(0); |
292 | 292 | |
@@ -331,12 +331,12 @@ discard block |
||
331 | 331 | } |
332 | 332 | $this->handler->connection()->getSchemaBuilder()->table( |
333 | 333 | $tableName, |
334 | - function (Blueprint $table) use ($self) { |
|
334 | + function(Blueprint $table) use ($self) { |
|
335 | 335 | /** |
336 | 336 | * @var ColumnEntity $column |
337 | 337 | */ |
338 | 338 | foreach ($self->columns() as $column) { |
339 | - $column->add($table, $self->config->get('id') . '_'); |
|
339 | + $column->add($table, $self->config->get('id').'_'); |
|
340 | 340 | } |
341 | 341 | } |
342 | 342 | ); |
@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | } |
369 | 369 | $this->handler->connection()->getSchemaBuilder()->table( |
370 | 370 | $tableName, |
371 | - function (Blueprint $table) use ($self) { |
|
371 | + function(Blueprint $table) use ($self) { |
|
372 | 372 | /** |
373 | 373 | * @var ColumnEntity $column |
374 | 374 | */ |
@@ -445,12 +445,12 @@ discard block |
||
445 | 445 | } |
446 | 446 | $this->handler->connection()->getSchemaBuilder()->table( |
447 | 447 | $tableName, |
448 | - function (Blueprint $table) use ($self) { |
|
448 | + function(Blueprint $table) use ($self) { |
|
449 | 449 | /** |
450 | 450 | * @var ColumnEntity $column |
451 | 451 | */ |
452 | 452 | foreach ($self->columns() as $column) { |
453 | - $column->drop($table, $self->config->get('id') . '_'); |
|
453 | + $column->drop($table, $self->config->get('id').'_'); |
|
454 | 454 | } |
455 | 455 | } |
456 | 456 | ); |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | } |
469 | 469 | $this->handler->connection()->getSchemaBuilder()->table( |
470 | 470 | $tableName, |
471 | - function (Blueprint $table) use ($self) { |
|
471 | + function(Blueprint $table) use ($self) { |
|
472 | 472 | /** |
473 | 473 | * @var ColumnEntity $column |
474 | 474 | */ |
@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | $insertParam = []; |
498 | 498 | $insertParam['dynamicFieldTargetId'] = $args[$config->get('joinColumnName')]; |
499 | 499 | foreach ($this->columns() as $column) { |
500 | - $key = camel_case($config->get('id') . '_' . $column->name); |
|
500 | + $key = camel_case($config->get('id').'_'.$column->name); |
|
501 | 501 | |
502 | 502 | if ($config->get('required') && (isset($args[$key]) === false || $args[$key] === '')) { |
503 | 503 | throw new Exceptions\RequiredParameterException(['name' => $key]); |
@@ -560,7 +560,7 @@ discard block |
||
560 | 560 | $updateParam = []; |
561 | 561 | |
562 | 562 | foreach ($this->columns() as $column) { |
563 | - $key = camel_case($config->get('id') . '_' . $column->name); |
|
563 | + $key = camel_case($config->get('id').'_'.$column->name); |
|
564 | 564 | if ($config->get('required') && (isset($args[$key]) === true && $args[$key] === '')) { |
565 | 565 | throw new Exceptions\RequiredParameterException(['name' => $key]); |
566 | 566 | } |
@@ -654,7 +654,7 @@ discard block |
||
654 | 654 | return $query; |
655 | 655 | } |
656 | 656 | |
657 | - $query->leftJoin($createTableName, function (JoinClause $join) use ($createTableName, $config, $baseTable) { |
|
657 | + $query->leftJoin($createTableName, function(JoinClause $join) use ($createTableName, $config, $baseTable) { |
|
658 | 658 | $join->on( |
659 | 659 | sprintf('%s.%s', $baseTable, $config->get('joinColumnName')), |
660 | 660 | '=', |
@@ -677,7 +677,7 @@ discard block |
||
677 | 677 | { |
678 | 678 | $config = $this->config; |
679 | 679 | foreach ($this->columns() as $column) { |
680 | - $key = camel_case($config->get('id') . '_' . $column->name); |
|
680 | + $key = camel_case($config->get('id').'_'.$column->name); |
|
681 | 681 | |
682 | 682 | if (isset($params[$key]) && $params[$key] != '') { |
683 | 683 | $query = $query->where($key, '=', $params[$key]); |
@@ -698,7 +698,7 @@ discard block |
||
698 | 698 | { |
699 | 699 | $config = $this->config; |
700 | 700 | foreach ($this->columns() as $column) { |
701 | - $key = camel_case($config->get('id') . '_' . $column->name); |
|
701 | + $key = camel_case($config->get('id').'_'.$column->name); |
|
702 | 702 | |
703 | 703 | if (isset($params[$key])) { |
704 | 704 | $query = $query->orderBy($key, '=', $params[$key]); |
@@ -725,7 +725,7 @@ discard block |
||
725 | 725 | $insertParam['revisionId'] = $args['revisionId']; |
726 | 726 | $insertParam['revisionNo'] = $args['revisionNo']; |
727 | 727 | foreach ($this->columns() as $column) { |
728 | - $key = camel_case($this->config->get('id') . '_' . $column->name); |
|
728 | + $key = camel_case($this->config->get('id').'_'.$column->name); |
|
729 | 729 | |
730 | 730 | if ($this->config->get('required') && (isset($args[$key]) === false || $args[$key] === '')) { |
731 | 731 | throw new Exceptions\RequiredDynamicFieldException(['key' => $key]); |
@@ -756,7 +756,7 @@ discard block |
||
756 | 756 | return $query; |
757 | 757 | } |
758 | 758 | |
759 | - $query->leftJoin($table, function (JoinClause $join) use ($tableName, $table, $config) { |
|
759 | + $query->leftJoin($table, function(JoinClause $join) use ($tableName, $table, $config) { |
|
760 | 760 | $join->on( |
761 | 761 | sprintf('%s.%s', $tableName, $config->get('joinColumnName')), |
762 | 762 | '=', |
@@ -101,7 +101,7 @@ |
||
101 | 101 | $config = $this->getConfig($file->disk); |
102 | 102 | |
103 | 103 | if (isset($config['url']) === true) { |
104 | - return rtrim($config['url'], '/') . '/' . ltrim($file->getPathname(), '/'); |
|
104 | + return rtrim($config['url'], '/').'/'.ltrim($file->getPathname(), '/'); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | return null; |
@@ -48,7 +48,7 @@ |
||
48 | 48 | $module = $instanceRoute->module; |
49 | 49 | } |
50 | 50 | |
51 | - $name = $module . '.' . $name; |
|
51 | + $name = $module.'.'.$name; |
|
52 | 52 | |
53 | 53 | array_unshift($parameters, $url); |
54 | 54 |