File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ class Analyze extends CommandBase
1616 *
1717 * Root project directory.
1818 *
19- * @var truthy- string|false
19+ * @var string
2020 */
2121 public $ directory = '. ' ;
2222
@@ -51,12 +51,15 @@ public function run(SimpleCli $cli): bool
5151
5252 protected function calculatePackagesTree (Split $ cli ): bool
5353 {
54- $ this ->directory = realpath ($ this ->directory );
54+ /** @psalm-var truthy-string|false $directory */
55+ $ directory = realpath ($ this ->directory );
5556
56- if (!$ this -> directory ) {
57+ if (!$ directory ) {
5758 return $ cli ->error ('Input directory not found. ' );
5859 }
5960
61+ $ this ->directory = $ directory ;
62+
6063 $ cli ->chdir ($ this ->directory );
6164
6265 if (!file_exists ($ this ->composerFile )) {
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ protected function gitEscape(string $value): string
5353 *
5454 * @return string
5555 *
56- * @psalm-suppress UndefinedThisPropertyFetch
56+ * @psalm-suppress UndefinedThisPropertyFetch RiskyTruthyFalsyComparison
5757 */
5858 protected function getGitCommand (string $ command , array $ options = [], string $ redirect = null ): string
5959 {
You can’t perform that action at this time.
0 commit comments