mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-28 08:10:51 +02:00
Prevent a HiddenFiles class from being instantiated without using fromConfig()
This commit is contained in:
@@ -2,10 +2,23 @@
|
||||
|
||||
namespace App;
|
||||
|
||||
use BadMethodCallException;
|
||||
use Tightenco\Collect\Support\Collection;
|
||||
|
||||
class HiddenFiles extends Collection
|
||||
{
|
||||
/** {@inheritdoc} */
|
||||
protected function __construct(...$args)
|
||||
{
|
||||
parent::__construct(...$args);
|
||||
}
|
||||
|
||||
/** {@inheritdoc} */
|
||||
public static function make($items = [])
|
||||
{
|
||||
throw new BadMethodCallException('Method not implemented');
|
||||
}
|
||||
|
||||
/** Create a new HiddenFiles collection object. */
|
||||
public static function fromConfig(Config $config): self
|
||||
{
|
||||
|
Reference in New Issue
Block a user