Skip to content

Commit 76b276d

Browse files
CS fixes
1 parent 2d6f5cb commit 76b276d

File tree

9 files changed

+24
-28
lines changed

9 files changed

+24
-28
lines changed

src/Illuminate/Database/Eloquent/Model.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2318,7 +2318,7 @@ public function __call($method, $parameters)
23182318
return $this->$method(...$parameters);
23192319
}
23202320

2321-
if ($resolver = ($this->relationResolver(static::class, $method))) {
2321+
if ($resolver = $this->relationResolver(static::class, $method)) {
23222322
return $resolver($this);
23232323
}
23242324

src/Illuminate/Foundation/Console/DocsCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ protected function fetchDocs()
472472
*/
473473
protected function version()
474474
{
475-
return Str::before(($this->version ?? $this->laravel->version()), '.').'.x';
475+
return Str::before($this->version ?? $this->laravel->version(), '.').'.x';
476476
}
477477

478478
/**

src/Illuminate/Foundation/Console/EnvironmentEncryptCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function handle()
111111

112112
$this->components->info('Environment successfully encrypted.');
113113

114-
$this->components->twoColumnDetail('Key', ($keyPassed ? $key : 'base64:'.base64_encode($key)));
114+
$this->components->twoColumnDetail('Key', $keyPassed ? $key : 'base64:'.base64_encode($key));
115115
$this->components->twoColumnDetail('Cipher', $cipher);
116116
$this->components->twoColumnDetail('Encrypted file', $encryptedFile);
117117

src/Illuminate/Support/Facades/Cache.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
* @method static \Illuminate\Contracts\Cache\Lock restoreLock(string $name, string $owner)
5252
*
5353
* @see \Illuminate\Cache\CacheManager
54+
*
5455
* @mixin \Illuminate\Cache\Repository
5556
*/
5657
class Cache extends Facade

src/Illuminate/Support/Str.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ public static function random($length = 16)
735735
while (($len = strlen($string)) < $length) {
736736
$size = $length - $len;
737737

738-
$bytesSize = (int) ceil(($size) / 3) * 3;
738+
$bytesSize = (int) ceil($size / 3) * 3;
739739

740740
$bytes = random_bytes($bytesSize);
741741

src/Illuminate/Validation/Concerns/FormatsMessages.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ protected function getMessage($attribute, $rule)
3838
$customKey = "validation.custom.{$attribute}.{$lowerRule}";
3939

4040
$customMessage = $this->getCustomMessageFromTranslator(
41-
in_array($rule, $this->sizeRules)
42-
? [$customKey.".{$this->getAttributeType($attribute)}", $customKey]
43-
: $customKey
41+
in_array($rule, $this->sizeRules)
42+
? [$customKey.".{$this->getAttributeType($attribute)}", $customKey]
43+
: $customKey
4444
);
4545

4646
// First we check for a custom defined validation message for the attribute

src/Illuminate/Validation/InvokableValidationRule.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,7 @@ protected function __construct(InvokableRule $invokable)
6666
public static function make($invokable)
6767
{
6868
if ($invokable->implicit ?? false) {
69-
return new class($invokable) extends InvokableValidationRule implements ImplicitRule
70-
{
71-
//
72-
};
69+
return new class($invokable) extends InvokableValidationRule implements ImplicitRule {};
7370
}
7471

7572
return new InvokableValidationRule($invokable);

src/Illuminate/View/Compilers/ComponentTagCompiler.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -666,15 +666,15 @@ protected function parseAttributeBag(string $attributeString)
666666
protected function parseComponentTagClassStatements(string $attributeString)
667667
{
668668
return preg_replace_callback(
669-
'/@(class)(\( ( (?>[^()]+) | (?2) )* \))/x', function ($match) {
670-
if ($match[1] === 'class') {
671-
$match[2] = str_replace('"', "'", $match[2]);
669+
'/@(class)(\( ( (?>[^()]+) | (?2) )* \))/x', function ($match) {
670+
if ($match[1] === 'class') {
671+
$match[2] = str_replace('"', "'", $match[2]);
672672

673-
return ":class=\"\Illuminate\Support\Arr::toCssClasses{$match[2]}\"";
674-
}
673+
return ":class=\"\Illuminate\Support\Arr::toCssClasses{$match[2]}\"";
674+
}
675675

676-
return $match[0];
677-
}, $attributeString
676+
return $match[0];
677+
}, $attributeString
678678
);
679679
}
680680

@@ -687,15 +687,15 @@ protected function parseComponentTagClassStatements(string $attributeString)
687687
protected function parseComponentTagStyleStatements(string $attributeString)
688688
{
689689
return preg_replace_callback(
690-
'/@(style)(\( ( (?>[^()]+) | (?2) )* \))/x', function ($match) {
691-
if ($match[1] === 'style') {
692-
$match[2] = str_replace('"', "'", $match[2]);
690+
'/@(style)(\( ( (?>[^()]+) | (?2) )* \))/x', function ($match) {
691+
if ($match[1] === 'style') {
692+
$match[2] = str_replace('"', "'", $match[2]);
693693

694-
return ":style=\"\Illuminate\Support\Arr::toCssStyles{$match[2]}\"";
695-
}
694+
return ":style=\"\Illuminate\Support\Arr::toCssStyles{$match[2]}\"";
695+
}
696696

697-
return $match[0];
698-
}, $attributeString
697+
return $match[0];
698+
}, $attributeString
699699
);
700700
}
701701

tests/View/Blade/BladeComponentTagCompilerTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -665,9 +665,7 @@ public function __toString()
665665
}
666666
};
667667

668-
$model = new class extends Model
669-
{
670-
};
668+
$model = new class extends Model {};
671669

672670
$this->assertEquals(e('<hi>'), BladeCompiler::sanitizeComponentAttribute('<hi>'));
673671
$this->assertEquals(e('1'), BladeCompiler::sanitizeComponentAttribute('1'));

0 commit comments

Comments
 (0)