Completed
Push — master ( f84666...e52fc0 )
by Evan
01:46
created

src/Support/Collection.php (1 issue)

Check for classes that have been defined more than once in the same file.

Best Practice Comprehensibility Minor

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
2
3
namespace Silk\Support;
4
5
/**
6
 * The Tightenco namespaced Collection class has only been available since 5.5.33
7
 * with aliases for the previous Illuminate\Support class for backwards compat.
8
 *
9
 * For PHP 5.6, v5.4 of the library will be installed, thus the namespaced version
10
 * won't be available.
11
 */
12
13
// @codeCoverageIgnoreStart
14
if (class_exists('Tightenco\Collect\Support\Collection')) {
15
    class Collection extends \Tightenco\Collect\Support\Collection
16
    {
17
    }
18
} else {
19
    class Collection extends \Illuminate\Support\Collection
1 ignored issue
show
Comprehensibility Best Practice introduced by
The type Silk\Support\Collection has been defined more than once; this definition is ignored, only the first definition in this file (L15-17) is considered.

This check looks for classes that have been defined more than once in the same file.

If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface.

This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP.

Loading history...
20
    {
21
    }
22
}
23
// @codeCoverageIgnoreEnd
24