Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Filesystem] Make Filesystem methods static #60388

Open
@shyim

Description

@shyim

Description

It would be nice if the methods inside the Filesystem class were all static, so you can call them without having to create an instance of that class.

Having to construct the class has no real benefit, it has no state inside the class

Example

// Instead of this
$fs = new Filesystem();
$fs->mkdir('foo');

// Or
(new Filesystem)->mkdir('foo');

// do directly this
Filesystem::mkdir('foo');

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions