Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
ordago committed Jun 14, 2021
1 parent ed2cec2 commit 4d32ea8
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
24 changes: 17 additions & 7 deletions src/Sermepa/Tpv/Tpv.php
Expand Up @@ -416,7 +416,7 @@ public function setMerchantSignature($signature)
}

/**
* Set enviroment
* Set environment
*
* @param string $environment test or live
*
Expand Down Expand Up @@ -473,11 +473,21 @@ public function setLanguage($languageCode = '001')
}

/**
* Return enviroment
*
* @return string Url of enviroment
* Return environment
* @deprecated Use `getEnvironment`
* @return string Url of environment
*/
public function getEnviroment()
{
return $this->getEnvironment();
}

/**
* Return environment
*
* @return string Url of environment
*/
public function getEnvironment()
{
return $this->_setEnvironment;
}
Expand Down Expand Up @@ -563,7 +573,7 @@ public function setTradeName($tradename = '')
* Payment type
*
* @param string $method [T o C = Sólo Tarjeta (mostrará sólo el formulario para datos de tarjeta)
* R = Pago por Transferencia, D = Domiciliacion]
* R = Pago por Transferencia, D = Domiciliación]
*
* @return $this
* @throws Exception
Expand Down Expand Up @@ -628,13 +638,13 @@ public function setExpiryDate($expirydate='')
public function setParameters($parameters=[])
{
if(!is_array($parameters)) {
throw new TpvException('Paramaters is not an array');
throw new TpvException('Parameters is not an array');
}

$keys = array_keys($parameters);

if(array_keys($keys) === $keys ) {
throw new TpvException('Paramaters is not an array associative');
throw new TpvException('Parameters is not an array associative');
}

$parameters = array_change_key_case($parameters, CASE_UPPER);
Expand Down
10 changes: 5 additions & 5 deletions tests/TpvTest.php
Expand Up @@ -282,7 +282,7 @@ public function throw_environment_is_not_test_or_live()

}

public function SearchinFormProvider()
public function SearchingFormProvider()
{
return [
['Ds_MerchantParameters'],
Expand All @@ -295,7 +295,7 @@ public function SearchinFormProvider()

/**
* @test
* @dataProvider SearchinFormProvider
* @dataProvider SearchingFormProvider
*/
public function check_if_form_create_inputs_with_parameters($search)
{
Expand Down Expand Up @@ -508,8 +508,8 @@ public function invalidParameters()
* @test
* @dataProvider invalidParameters
* @expectedException \Sermepa\Tpv\TpvException
* @expectedExceptionMessage Paramaters is not an array
* @expectedExceptionMessage Paramaters is not an array associative
* @expectedExceptionMessage Parameters is not an array
* @expectedExceptionMessage Parameters is not an array associative
*/

public function throw_parameters_is_not_an_array($parameters)
Expand All @@ -535,4 +535,4 @@ public function set_new_parameters()

}

}
}

0 comments on commit 4d32ea8

Please sign in to comment.