Skip to content

Np 001#1

Open
NilsParedes wants to merge 4 commits intomasterfrom
NP-001
Open

Np 001#1
NilsParedes wants to merge 4 commits intomasterfrom
NP-001

Conversation

@NilsParedes
Copy link

No description provided.


public function getPathOfPrivateKey()
{
$path = $this->getLocalStorage()->directories("{$this->getPath([])}/roots")[0] . '/root.key';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no uses indices, puede ser un array vacio y eso lo rompera,
el nombre lo debe sacar de la configuracion del key, yo puedo tener 100 tipos de keys, y necesito sacar por tipo de key el ultimo


public function getPathOfPublicKey()
{
$path = $this->getLocalStorage()->directories("{$this->getPath([])}/roots")[0] . '/root.pub';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no uses indices, puede ser un array vacio y eso lo rompera,
el nombre lo debe sacar de la configuracion del key, yo puedo tener 100 tipos de keys, y necesito sacar por tipo de key el ultimo

return $this->getLocalStorage()->exists($path) ? $path : false;
}

public function getPrivateKey()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getPrivateKey(array $config)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tal vez deberia ser estatico?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getLastPRivateKey(array $config(


public function getPrivateKey()
{
$path = $this->getLocalStorage()->directories("{$this->getPath([])}/roots")[0] . '/root.key';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aqui puede usar el metodo anterior que creaste


return false;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agregale el docblock

{
return $this->getLocalStorage()->get($path);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agregale el dockblock


public function getPublicKey()
{
$path = $this->getLocalStorage()->directories("{$this->getPath([])}/roots")[0] . '/root.pub';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

igual que antes

Comment on lines +313 to +316
<<<<<<< HEAD

=======
>>>>>>> 10f1b453a30f3efed9ead6c16f7719972f7b2e32
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

esto es un error, resuelve bien el merge pes
@NilsParedes

return static::getLocalStorage()->exists($lastPath) ? $lastPath : false;
}

public static function getPrivateKey(array $config)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getLastPrivateKey

>>>>>>> 10f1b453a30f3efed9ead6c16f7719972f7b2e32
}

public static function getPublicKey(array $config)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getLastPublicKey


$lastPath = rtrim($lastPath, '/') . '/' . Arr::get($config, 'filename') . '.pub';

return static::getLocalStorage()->exists($lastPath) ? $lastPath : false;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

abajo tienes un metodo file exists,
creo que querias usarlo para eso

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants