Skip to content

Commit

Permalink
Merge pull request #5 from manuwhat/manuwhat-patch-1
Browse files Browse the repository at this point in the history
refactoring code
  • Loading branch information
manuwhat committed Apr 7, 2019
2 parents c327013 + a670fcd commit 7444706
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Shortcut.php
Expand Up @@ -31,9 +31,7 @@ public static function create($classname, $name=self::CAN_NEVER_EVER_CHOOSE_THIS
if (!function_exists($classname)&&!function_exists($name)) {
if (!$fileExists) {
$name=trim($name);
if (!file_exists($Dir)) {
mkdir($Dir);
}
self::createDir($Dir);
$reflectionMethod=$reflectionClass->getConstructor();
$notInstantiable=false;
if (is_null($reflectionMethod)||$notInstantiable=!$reflectionClass->isInstantiable()) {
Expand Down Expand Up @@ -171,6 +169,13 @@ private static function getTheRightDir(&$file, &$Dir, $fullQualifiedClassname)
}
}

private static function createDir($Dir)
{
if (!file_exists($Dir)) {
mkdir($Dir);
}
}



public static function setDir($dirname)
Expand Down

0 comments on commit 7444706

Please sign in to comment.