Skip to content

Commit

Permalink
Fixing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanedev-maroc committed Sep 8, 2017
1 parent d398759 commit d523fe9
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 48 deletions.
31 changes: 18 additions & 13 deletions src/Utilities/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,23 @@
*/
class Request implements RequestInterface
{
/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Properties
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

/**
* URL to request.
*
* @var string
*/
protected $url;

/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Getters & Setters
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

/**
* Set URL.
*
Expand All @@ -42,10 +44,11 @@ protected function setUrl($url)
return $this;
}

/* ------------------------------------------------------------------------------------------------
| Main functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
*/

/**
* Create an api request using curl.
*
Expand Down Expand Up @@ -96,10 +99,11 @@ public function send($url, $curled = true)
return $this->interpretResponse($result);
}

/* ------------------------------------------------------------------------------------------------
| Check Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Check Methods
| -----------------------------------------------------------------
*/

/**
* Check URL.
*
Expand Down Expand Up @@ -148,10 +152,11 @@ private function checkResult($result)
return is_string($result) && ! empty($result);
}

/* ------------------------------------------------------------------------------------------------
| Other Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Other Methods
| -----------------------------------------------------------------
*/

/**
* Convert the json response to array.
*
Expand Down
14 changes: 8 additions & 6 deletions tests/Laravel/FacadeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
*/
class FacadeTest extends LaravelTestCase
{
/* ------------------------------------------------------------------------------------------------
| Test Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Tests
| -----------------------------------------------------------------
*/

/** @test */
public function it_can_render_script_tag()
{
Expand All @@ -27,10 +28,11 @@ public function it_can_render_script_tag()
$this->assertEmpty(NoCaptcha::script()->toHtml());
}

/* ------------------------------------------------------------------------------------------------
| Other Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Other Methods
| -----------------------------------------------------------------
*/

/**
* Get script tag for testing.
*
Expand Down
7 changes: 4 additions & 3 deletions tests/LaravelTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
*/
abstract class LaravelTestCase extends BaseTestCase
{
/* ------------------------------------------------------------------------------------------------
| Main Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
*/

/**
* Register Service Providers.
*
Expand Down
19 changes: 11 additions & 8 deletions tests/NoCaptchaServiceProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@
*/
class NoCaptchaServiceProviderTest extends LaravelTestCase
{
/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Properties
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

/** @var \Arcanedev\NoCaptcha\NoCaptchaServiceProvider */
private $provider;

/* ------------------------------------------------------------------------------------------------
| Main Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
*/

public function setUp()
{
parent::setUp();
Expand All @@ -35,10 +37,11 @@ public function tearDown()
parent::tearDown();
}

/* ------------------------------------------------------------------------------------------------
| Test Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Tests
| -----------------------------------------------------------------
*/

/** @test */
public function it_can_be_instantiated()
{
Expand Down
19 changes: 11 additions & 8 deletions tests/Utilities/AttributesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,22 @@
*/
class AttributesTest extends TestCase
{
/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Properties
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

/** @var Attributes */
private $attributes;

/** @var string */
private $siteKey = 'my-site-key';

/* ------------------------------------------------------------------------------------------------
| Main Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
*/

public function setUp()
{
parent::setUp();
Expand All @@ -39,10 +41,11 @@ public function tearDown()
parent::tearDown();
}

/* ------------------------------------------------------------------------------------------------
| Test Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Tests
| -----------------------------------------------------------------
*/

/** @test */
public function it_can_be_instantiated()
{
Expand Down
24 changes: 14 additions & 10 deletions tests/Utilities/RequestTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,26 @@
*/
class RequestTest extends TestCase
{
/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Constants
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

const URL_TO_CURL_OR_WHATEVER = 'http://httpbin.org/get';

/* ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Properties
| ------------------------------------------------------------------------------------------------
| -----------------------------------------------------------------
*/

/** @var Request */
private $request;

/* ------------------------------------------------------------------------------------------------
| Main Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
*/

public function setUp()
{
parent::setUp();
Expand All @@ -42,10 +45,11 @@ public function tearDown()
parent::tearDown();
}

/* ------------------------------------------------------------------------------------------------
| Test Functions
| ------------------------------------------------------------------------------------------------
/* -----------------------------------------------------------------
| Tests
| -----------------------------------------------------------------
*/

/** @test */
public function it_can_be_instantiated()
{
Expand Down

0 comments on commit d523fe9

Please sign in to comment.