Make methods static

This commit is contained in:
Oliver Davies 2018-08-26 20:48:33 +01:00
parent c10906e56e
commit cdefa25638
2 changed files with 3 additions and 3 deletions

View file

@ -16,7 +16,7 @@ class Partials
*/
public static function load($directoryName = 'filters')
{
$files = (new static())->getFilePattern($directoryName);
$files = static::getFilePattern($directoryName);
return collect(glob($files))
->map(function ($filename) {
@ -36,7 +36,7 @@ class Partials
*
* @return string The full path.
*/
protected function getFilePattern($directoryName)
protected static function getFilePattern($directoryName)
{
return getcwd() . DIRECTORY_SEPARATOR . $directoryName . DIRECTORY_SEPARATOR . '*.php';
}

View file

@ -29,7 +29,7 @@ class FakePartials extends Partials
/**
* {@inheritdoc}
*/
protected function getFilePattern($directoryName)
protected static function getFilePattern($directoryName)
{
return __DIR__ . '/../../stubs/filters/*.php';
}