Skip to content

Commit 786e1ab

Browse files
rizqyhiagissept
authored andcommitted
chore: refactor AddOverrideAttributeToOverriddenMethodsRector
1 parent d967790 commit 786e1ab

108 files changed

Lines changed: 381 additions & 190 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

rector.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@
1111
])
1212
->withRules([
1313
\Rector\Php83\Rector\ClassConst\AddTypeToConstRector::class,
14+
\Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector::class,
1415
]);

src/Illuminate/Auth/AuthManager.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ class AuthManager extends Manager {
1010
* @param string $driver
1111
* @return mixed
1212
*/
13-
protected function createDriver($driver)
13+
#[\Override]
14+
protected function createDriver($driver)
1415
{
1516
$guard = parent::createDriver($driver);
1617

@@ -30,7 +31,8 @@ protected function createDriver($driver)
3031
* @param string $driver
3132
* @return \Illuminate\Auth\Guard
3233
*/
33-
protected function callCustomCreator($driver)
34+
#[\Override]
35+
protected function callCustomCreator($driver)
3436
{
3537
$custom = parent::callCustomCreator($driver);
3638

src/Illuminate/Auth/AuthServiceProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ public function register()
3434
*
3535
* @return array
3636
*/
37-
public function provides()
37+
#[\Override]
38+
public function provides()
3839
{
3940
return array('auth');
4041
}

src/Illuminate/Auth/Console/RemindersControllerCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ private function getPath()
8383
*
8484
* @return array
8585
*/
86-
protected function getOptions()
86+
#[\Override]
87+
protected function getOptions()
8788
{
8889
return array(
8990
array('path', null, InputOption::VALUE_OPTIONAL, 'The directory where the controller should be placed.', null),

src/Illuminate/Auth/Reminders/ReminderServiceProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ protected function registerCommands()
114114
*
115115
* @return array
116116
*/
117-
public function provides()
117+
#[\Override]
118+
public function provides()
118119
{
119120
return array('auth.reminder', 'auth.reminder.repository', 'command.auth.reminders');
120121
}

src/Illuminate/Cache/CacheServiceProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ public function registerCommands()
6161
*
6262
* @return array
6363
*/
64-
public function provides()
64+
#[\Override]
65+
public function provides()
6566
{
6667
return [
6768
'cache', 'cache.store', 'memcached.connector', 'command.cache.clear', 'command.cache.table'

src/Illuminate/Cache/RedisStore.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ public function flush()
136136
* @param array|mixed $names
137137
* @return \Illuminate\Cache\RedisTaggedCache
138138
*/
139-
public function tags($names)
139+
#[\Override]
140+
public function tags($names)
140141
{
141142
return new RedisTaggedCache($this, new TagSet($this, is_array($names) ? $names : func_get_args()));
142143
}

src/Illuminate/Cache/RedisTaggedCache.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ class RedisTaggedCache extends TaggedCache {
99
* @param mixed $value
1010
* @return void
1111
*/
12-
public function forever($key, $value)
12+
#[\Override]
13+
public function forever($key, $value)
1314
{
1415
$this->pushForeverKeys($namespace = $this->tags->getNamespace(), $key);
1516

@@ -21,7 +22,8 @@ public function forever($key, $value)
2122
*
2223
* @return void
2324
*/
24-
public function flush()
25+
#[\Override]
26+
public function flush()
2527
{
2628
$this->deleteForeverKeys();
2729

src/Illuminate/Config/Repository.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,8 @@ protected function callAfterLoad($namespace, $group, $items)
183183
* @param string $key
184184
* @return array
185185
*/
186-
protected function parseNamespacedSegments($key)
186+
#[\Override]
187+
protected function parseNamespacedSegments($key)
187188
{
188189
list($namespace, $item) = explode('::', $key);
189190

src/Illuminate/Console/Application.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ public function call($command, array $parameters = array(), OutputInterface $out
107107
* @param \Symfony\Component\Console\Command\Command $command
108108
* @return \Symfony\Component\Console\Command\Command
109109
*/
110-
public function add(SymfonyCommand $command)
110+
#[\Override]
111+
public function add(SymfonyCommand $command)
111112
{
112113
if ($command instanceof Command)
113114
{
@@ -160,7 +161,8 @@ public function resolveCommands($commands)
160161
*
161162
* @return \Symfony\Component\Console\Input\InputDefinition
162163
*/
163-
protected function getDefaultInputDefinition(): \Symfony\Component\Console\Input\InputDefinition
164+
#[\Override]
165+
protected function getDefaultInputDefinition(): \Symfony\Component\Console\Input\InputDefinition
164166
{
165167
$definition = parent::getDefaultInputDefinition();
166168

@@ -233,7 +235,8 @@ public function setLaravel($laravel)
233235
* @param bool $boolean
234236
* @return $this
235237
*/
236-
public function setAutoExit($boolean)
238+
#[\Override]
239+
public function setAutoExit($boolean)
237240
{
238241
parent::setAutoExit($boolean);
239242

0 commit comments

Comments
 (0)