Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
50 | public function handle() |
||
51 | { |
||
52 | $url = $this->argument('url') ?? $this->ask('Please enter the URL to shorten'); |
||
53 | |||
54 | if (!$url) { |
||
55 | return $this->error('Aborted: No URL was given.'); |
||
|
|||
56 | } |
||
57 | |||
58 | $driver = $this->shortener->driver($this->option('driver')); |
||
59 | |||
60 | $shortUrl = $driver->shorten($url); |
||
61 | |||
62 | $this->info('URL shortened successfully.'); |
||
63 | $this->info("Your short URL is: $shortUrl"); |
||
64 | } |
||
66 |
This check looks for function or method calls that always return null and whose return value is used.
The method
getObject()
can return nothing but null, so it makes no sense to use the return value.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.