Make phpstan happier
This commit is contained in:
parent
d9382954bc
commit
99007d8208
3 changed files with 12 additions and 4 deletions
7
src/Exceptions/DbRuntimeException.php
Normal file
7
src/Exceptions/DbRuntimeException.php
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
|
||||
namespace Benzine\Exceptions;
|
||||
|
||||
class DbRuntimeException extends BenzineException
|
||||
{
|
||||
}
|
||||
|
|
@ -11,10 +11,10 @@ class InflectionExtension extends AbstractExtension
|
|||
public function getFilters()
|
||||
{
|
||||
$filters = [];
|
||||
$filters['pluralize'] = new TwigFilter('pluralize', function ($word): string {
|
||||
$filters['pluralize'] = new TwigFilter('pluralize', function (string $word): string {
|
||||
return Inflect::pluralize($word);
|
||||
});
|
||||
$filters['singularize'] = new TwigFilter('singularize', function ($word): string {
|
||||
$filters['singularize'] = new TwigFilter('singularize', function (string $word): string {
|
||||
return Inflect::singularize($word);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ namespace Benzine\Tests;
|
|||
|
||||
use Facebook\WebDriver\Remote\RemoteWebDriver;
|
||||
use Facebook\WebDriver\Remote\WebDriverCapabilityType;
|
||||
use Symfony\Component\Filesystem\Filesystem;
|
||||
|
||||
abstract class AbstractSeleniumTestCase extends AbstractBaseTestCase
|
||||
{
|
||||
|
|
@ -29,8 +30,8 @@ abstract class AbstractSeleniumTestCase extends AbstractBaseTestCase
|
|||
self::$webDriver->manage()->timeouts()->implicitlyWait(3);
|
||||
|
||||
self::$screenshotsDir = APP_ROOT.'/build/Screenshots/'.date('Y-m-d H-i-s').'/';
|
||||
if (!file_exists(self::$screenshotsDir)) {
|
||||
mkdir(self::$screenshotsDir, 0777, true);
|
||||
if (!(new Filesystem())->exists(self::$screenshotsDir)) {
|
||||
(new Filesystem())->mkdir(self::$screenshotsDir, 0777);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue