for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types = 1);
/*
* This file is part of the skeleton package.
*
* (c) Gennady Knyazkin <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Gennadyx\Skeleton\Action;
use Gennadyx\Skeleton\Action\Traits\FilesystemAwareTrait;
use Gennadyx\Skeleton\Action\Traits\VarAwareTrait;
use Gennadyx\Skeleton\VarAwareInterface;
/**
* Class CreateSourceDirectories
* @author Gennady Knyazkin <[email protected]>
final class CreateSourceDirectories implements ActionInterface, VarAwareInterface
{
use VarAwareTrait,
FilesystemAwareTrait;
* Execute action
* @return void
* @throws \RuntimeException
public function execute()
foreach (['src', 'tests'] as $name) {
$directory = $this->vars['root'].'/'.$name;
if (!is_dir($directory)) {
$this->fs->mkdir($directory);
$this->fs->touch(sprintf('%s/.gitkeep', $directory));
}
* {@inheritdoc}
public function getPriority(): int
return 5;