Skip to content

Commit

Permalink
Add copyright notes and license.md
Browse files Browse the repository at this point in the history
  • Loading branch information
enumag committed Sep 24, 2015
1 parent 4d43db9 commit 87f7522
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 10 deletions.
22 changes: 22 additions & 0 deletions license.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Copyright (c) 2015 Jáchym Toušek (enumag@gmail.com)

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
13 changes: 11 additions & 2 deletions src/Connector/Nette.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
<?php

/**
* This file is part of the Arachne
*
* Copyright (c) Jáchym Toušek (enumag@gmail.com)
*
* For the full copyright and license information, please view the file license.md that was distributed with this source code.
*/

namespace Arachne\Codeception\Connector;

use Arachne\Codeception\Http\Request as HttpRequest;
use Arachne\Codeception\Http\Response as HttpResponse;
use Exception;
use Nette\Application\Application;
use Nette\DI\Container;
use Nette\Http\IRequest;
Expand Down Expand Up @@ -51,7 +60,7 @@ public function doRequest($request)
$httpRequest = $this->container->getByType(IRequest::class);
$httpResponse = $this->container->getByType(IResponse::class);
if (!$httpRequest instanceof HttpRequest || !$httpResponse instanceof HttpResponse) {
throw new \Exception('Arachne\Codeception\DI\CodeceptionExtension is not used or conflicts with another extension.');
throw new Exception('Arachne\Codeception\DI\CodeceptionExtension is not used or conflicts with another extension.');
}
$httpRequest->reset();
$httpResponse->reset();
Expand All @@ -61,7 +70,7 @@ public function doRequest($request)
$this->container->getByType(Application::class)->run();
$content = ob_get_clean();

} catch (\Exception $e) {
} catch (Exception $e) {
ob_end_clean();
throw $e;
}
Expand Down
8 changes: 8 additions & 0 deletions src/Console/RunTestInput.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<?php

/**
* This file is part of the Arachne
*
* Copyright (c) Jáchym Toušek (enumag@gmail.com)
*
* For the full copyright and license information, please view the file license.md that was distributed with this source code.
*/

namespace Arachne\Codeception\Console;

use Symfony\Component\Console\Input\InputDefinition;
Expand Down
8 changes: 8 additions & 0 deletions src/DI/CodeceptionExtension.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<?php

/**
* This file is part of the Arachne
*
* Copyright (c) Jáchym Toušek (enumag@gmail.com)
*
* For the full copyright and license information, please view the file license.md that was distributed with this source code.
*/

namespace Arachne\Codeception\DI;

use Nette\DI\CompilerExtension;
Expand Down
15 changes: 8 additions & 7 deletions src/Http/Response.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<?php

/**
* This file is part of the Arachne
*
* Copyright (c) Jáchym Toušek (enumag@gmail.com)
*
* For the full copyright and license information, please view the file license.md that was distributed with this source code.
*/

namespace Arachne\Codeception\Http;

use Nette\Http\IResponse;
Expand Down Expand Up @@ -144,13 +152,6 @@ public function getHeaders()
*/
public function setCookie($name, $value, $time, $path = null, $domain = null, $secure = null, $httpOnly = null)
{
/*$maxAge = $time ? \Nette\Utils\DateTime::from($time)->format('U') : 0;
$this->addHeader('Set-Cookie', rawurlencode($name) . '=' . rawurlencode($value)
. (empty($maxAge) ? '' : '; Expires=' . gmdate('D, d-M-Y H:i:s', $maxAge) . ' GMT; Max-Age=' . $maxAge)
. (empty($path) ? '' : '; Path=' . $path)
. (empty($domain) ? '' : '; Domain=' . $domain)
. (!$secure ? '' : '; Secure')
. (!$httpOnly ? '' : '; HttpOnly'));*/
return $this;
}

Expand Down
11 changes: 10 additions & 1 deletion src/Module/Doctrine.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
<?php

/**
* This file is part of the Arachne
*
* Copyright (c) Jáchym Toušek (enumag@gmail.com)
*
* For the full copyright and license information, please view the file license.md that was distributed with this source code.
*/

namespace Arachne\Codeception\Module;

use Arachne\Codeception\Module\Nette;
use Codeception\Exception\ModuleConfigException;
use Codeception\Module;
use Codeception\TestCase;
use Doctrine\ORM\EntityManagerInterface;
use PDOException;

class Doctrine extends Module
{
Expand All @@ -28,7 +37,7 @@ public function _before(TestCase $test)
$stmt->closeCursor();
}

} catch (\PDOException $e) {
} catch (PDOException $e) {
throw new ModuleConfigException(__CLASS__, $e->getMessage(), $e);
}
}
Expand Down
8 changes: 8 additions & 0 deletions src/Module/Nette.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<?php

/**
* This file is part of the Arachne
*
* Copyright (c) Jáchym Toušek (enumag@gmail.com)
*
* For the full copyright and license information, please view the file license.md that was distributed with this source code.
*/

namespace Arachne\Codeception\Module;

use Arachne\Codeception\Connector\Nette as NetteConnector;
Expand Down
8 changes: 8 additions & 0 deletions src/Tracy/Logger.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<?php

/**
* This file is part of the Arachne
*
* Copyright (c) Jáchym Toušek (enumag@gmail.com)
*
* For the full copyright and license information, please view the file license.md that was distributed with this source code.
*/

namespace Arachne\Codeception\Tracy;

use Codeception\Events;
Expand Down

0 comments on commit 87f7522

Please sign in to comment.