diff --git a/README.md b/README.md index fc39a8f..159255d 100644 --- a/README.md +++ b/README.md @@ -543,7 +543,7 @@ namespace VDM\Joomla\Componentbuilder\Power #Olive { class Grep << (F,LightGreen) >> #Green { - + string $path + + ?string $path + ?array $paths # Contents $contents # CMSApplication $app diff --git a/src/6784dd52-0909-451a-a872-9a942a023c68/README.md b/src/6784dd52-0909-451a-a872-9a942a023c68/README.md index 82cc448..9dabdc4 100644 --- a/src/6784dd52-0909-451a-a872-9a942a023c68/README.md +++ b/src/6784dd52-0909-451a-a872-9a942a023c68/README.md @@ -11,7 +11,7 @@ ```uml @startuml class Grep << (F,LightGreen) >> #Green { - + string $path + + ?string $path + ?array $paths # Contents $contents # CMSApplication $app diff --git a/src/6784dd52-0909-451a-a872-9a942a023c68/code.php b/src/6784dd52-0909-451a-a872-9a942a023c68/code.php index ef04f4a..3db88b5 100644 --- a/src/6784dd52-0909-451a-a872-9a942a023c68/code.php +++ b/src/6784dd52-0909-451a-a872-9a942a023c68/code.php @@ -39,7 +39,7 @@ final class Grep * @var string * @since 3.2.0 **/ - public string $path; + public ?string $path; /** * All approved paths @@ -241,11 +241,6 @@ final class Grep */ private function init() { - if (!Folder::exists($this->path)) - { - $this->path = null; - } - if (is_array($this->paths) && $this->paths !== []) { foreach ($this->paths as $n => &$path) @@ -273,15 +268,7 @@ final class Grep unset($this->paths[$n]); } } - - // if we still have paths - if ($this->paths !== []) - { - return; - } } - - $this->paths = null; } /** diff --git a/src/6784dd52-0909-451a-a872-9a942a023c68/code.power b/src/6784dd52-0909-451a-a872-9a942a023c68/code.power index 32e15c3..d5e52a2 100644 --- a/src/6784dd52-0909-451a-a872-9a942a023c68/code.power +++ b/src/6784dd52-0909-451a-a872-9a942a023c68/code.power @@ -4,7 +4,7 @@ * @var string * @since 3.2.0 **/ - public string $path; + public ?string $path; /** * All approved paths @@ -206,11 +206,6 @@ */ private function init() { - if (!Folder::exists($this->path)) - { - $this->path = null; - } - if (is_array($this->paths) && $this->paths !== []) { foreach ($this->paths as $n => &$path) @@ -238,15 +233,7 @@ unset($this->paths[$n]); } } - - // if we still have paths - if ($this->paths !== []) - { - return; - } } - - $this->paths = null; } /**