Skip to content

Commit 6b2792b

Browse files
authored
Merge pull request #65 from rappasoft/analysis-64gnYM
Apply fixes from StyleCI
2 parents d903864 + 63e6977 commit 6b2792b

File tree

9 files changed

+19
-28
lines changed

9 files changed

+19
-28
lines changed

src/LaravelLivewireTablesServiceProvider.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
use Illuminate\Support\ServiceProvider;
66

77
/**
8-
* Class LaravelLivewireTablesServiceProvider
9-
*
10-
* @package Rappasoft\LaravelLivewireTables
8+
* Class LaravelLivewireTablesServiceProvider.
119
*/
1210
class LaravelLivewireTablesServiceProvider extends ServiceProvider
1311
{

src/TableComponent.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
*/
2020
abstract class TableComponent extends Component
2121
{
22-
2322
use Loading,
2423
Pagination,
2524
Search,
@@ -29,7 +28,7 @@ abstract class TableComponent extends Component
2928
Yajra;
3029

3130
/**
32-
* The default pagination theme
31+
* The default pagination theme.
3332
*
3433
* @var string
3534
*/

src/Traits/CanBeHidden.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ public function isVisible(): bool
4747
*/
4848
public function isHidden(): bool
4949
{
50-
return !$this->isVisible();
50+
return ! $this->isVisible();
5151
}
5252
}

src/Traits/HtmlComponents.php

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,14 @@
22

33
namespace Rappasoft\LaravelLivewireTables\Traits;
44

5-
use Illuminate\Support\HtmlString;
65
use Illuminate\Contracts\Routing\UrlGenerator;
6+
use Illuminate\Support\HtmlString;
77

88
/**
9-
* Trait HtmlBuilder
10-
*
11-
* @package Rappasoft\LaravelLivewireTables\Helpers
9+
* Trait HtmlBuilder.
1210
*/
1311
trait HtmlComponents
1412
{
15-
1613
/**
1714
* Convert an HTML string to entities.
1815
*
@@ -39,7 +36,7 @@ public function image($url, $alt = null, $attributes = [], $secure = null): Html
3936
{
4037
$attributes['alt'] = $alt;
4138

42-
return $this->html('<img src="' . resolve(UrlGenerator::class)->asset($url, $secure) . '"' . $this->attributes($attributes) . '>');
39+
return $this->html('<img src="'.resolve(UrlGenerator::class)->asset($url, $secure).'"'.$this->attributes($attributes).'>');
4340
}
4441

4542
/**
@@ -65,7 +62,7 @@ public function link($url, $title = null, $attributes = [], $secure = null, $esc
6562
$title = $this->entities($title);
6663
}
6764

68-
return $this->html('<a href="' . $this->entities($url) . '"' . $this->attributes($attributes) . '>' . $title . '</a>');
65+
return $this->html('<a href="'.$this->entities($url).'"'.$this->attributes($attributes).'>'.$title.'</a>');
6966
}
7067

7168
/**
@@ -170,9 +167,9 @@ public function mailto($email, $title = null, $attributes = [], $escape = true):
170167
$title = $this->entities($title);
171168
}
172169

173-
$email = $this->obfuscate('mailto:') . $email;
170+
$email = $this->obfuscate('mailto:').$email;
174171

175-
return $this->html('<a href="' . $email . '"' . $this->attributes($attributes) . '>' . $title . '</a>');
172+
return $this->html('<a href="'.$email.'"'.$this->attributes($attributes).'>'.$title.'</a>');
176173
}
177174

178175
/**
@@ -206,7 +203,7 @@ public function attributes($attributes): string
206203
}
207204
}
208205

209-
return count($html) > 0 ? ' ' . implode(' ', $html) : '';
206+
return count($html) > 0 ? ' '.implode(' ', $html) : '';
210207
}
211208

212209
/**
@@ -234,11 +231,11 @@ protected function attributeElement($key, $value): string
234231
}
235232

236233
if (is_array($value) && $key === 'class') {
237-
return 'class="' . implode(' ', $value) . '"';
234+
return 'class="'.implode(' ', $value).'"';
238235
}
239236

240237
if (! is_null($value)) {
241-
return $key . '="' . e($value, false) . '"';
238+
return $key.'="'.e($value, false).'"';
242239
}
243240
}
244241

@@ -263,11 +260,11 @@ public function obfuscate($value): string
263260
// the randomly obfuscated letters out of the string on the responses.
264261
switch (rand(1, 3)) {
265262
case 1:
266-
$safe .= '&#' . ord($letter) . ';';
263+
$safe .= '&#'.ord($letter).';';
267264
break;
268265

269266
case 2:
270-
$safe .= '&#x' . dechex(ord($letter)) . ';';
267+
$safe .= '&#x'.dechex(ord($letter)).';';
271268
break;
272269

273270
case 3:
@@ -279,7 +276,7 @@ public function obfuscate($value): string
279276
}
280277

281278
/**
282-
* Transform the string to an Html serializable object
279+
* Transform the string to an Html serializable object.
283280
*
284281
* @param $html
285282
*

src/Traits/Loading.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88
trait Loading
99
{
10-
1110
/**
1211
* Whether or not to show a loading indicator when searching.
1312
*
@@ -24,7 +23,7 @@ trait Loading
2423

2524
/**
2625
* When the table is loading, hide all data but the loading row
27-
* Otherwise the loading row gets shown above the data (makes the page less jumpy)
26+
* Otherwise the loading row gets shown above the data (makes the page less jumpy).
2827
*
2928
* @var bool
3029
*/

src/Traits/Table.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88
trait Table
99
{
10-
1110
/**
1211
* Whether or not to display the table header.
1312
*

src/Traits/Yajra.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public function attribute(Builder $query, $relationships, $attribute): string
8585
/**
8686
* @param $attribute
8787
*
88-
* @return mixed|boolean
88+
* @return mixed|bool
8989
*/
9090
protected function getColumnByAttribute($attribute)
9191
{

src/Views/Column.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
*/
1111
class Column
1212
{
13-
1413
use CanBeHidden;
1514

1615
/**
@@ -145,7 +144,8 @@ public function isRaw(): bool
145144
*
146145
* @return $this
147146
*/
148-
public function format(callable $callable): Column {
147+
public function format(callable $callable): Column
148+
{
149149
$this->formatCallback = $callable;
150150

151151
return $this;

tests/ExampleTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
class ExampleTest extends TestCase
99
{
10-
1110
protected function getPackageProviders($app)
1211
{
1312
return [LaravelLivewireTablesServiceProvider::class];

0 commit comments

Comments
 (0)