GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 32efc1...abe1a9 )
by Cees-Jan
11:39 queued 09:11
created

src/Resource/Sync/User.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php declare(strict_types=1);
2
3
namespace ApiClients\Client\Travis\Resource\Sync;
4
5
use ApiClients\Client\Travis\Resource\User as BaseUser;
6
use ApiClients\Client\Travis\Resource\UserInterface;
7
use ApiClients\Foundation\Hydrator\CommandBus\Command\BuildAsyncFromSyncCommand;
8
9 View Code Duplication
class User extends BaseUser
0 ignored issues
show
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
10
{
11
    /**
12
     * @return User
13
     */
14
    public function sync(): User
15
    {
16
        return $this->wait(
17
            $this->handleCommand(
18
                new BuildAsyncFromSyncCommand(self::HYDRATE_CLASS, $this)
19
            )->then(function (UserInterface $user) {
20
                return $user->sync();
21
            })
22
        );
23
    }
24
25
    /**
26
     * @return User
27
     */
28
    public function refresh(): User
29
    {
30
        return $this->wait(
31
            $this->handleCommand(
32
                new BuildAsyncFromSyncCommand(self::HYDRATE_CLASS, $this)
33
            )->then(function (UserInterface $user) {
34
                return $user->refresh();
35
            })
36
        );
37
    }
38
}
39