From 7015e5d3ba70fda98b4f2a1d3d03a524aab22cd2 Mon Sep 17 00:00:00 2001 From: fadrian06 Date: Fri, 26 Jan 2024 20:39:24 -0400 Subject: [PATCH] Moved copyright and license to a public place :D --- flight/core/Dispatcher.php | 10 +++------- flight/core/Loader.php | 10 +++------- flight/database/PdoWrapper.php | 2 ++ flight/net/Request.php | 10 +++------- flight/net/Response.php | 30 ++++++++++++---------------- flight/net/Route.php | 10 +++------- flight/net/Router.php | 10 +++------- flight/template/View.php | 10 +++------- flight/util/Collection.php | 10 +++------- flight/util/ReturnTypeWillChange.php | 2 ++ phpcs.xml | 1 + 11 files changed, 39 insertions(+), 66 deletions(-) diff --git a/flight/core/Dispatcher.php b/flight/core/Dispatcher.php index 8bd51fa..1f55269 100644 --- a/flight/core/Dispatcher.php +++ b/flight/core/Dispatcher.php @@ -1,12 +1,5 @@ - * @license MIT, http://flightphp.com/license - */ - declare(strict_types=1); namespace flight\core; @@ -19,6 +12,9 @@ use InvalidArgumentException; * are simply aliases for class methods or functions. The Dispatcher * allows you to hook other functions to an event that can modify the * input parameters and/or the output. + * + * @license MIT, http://flightphp.com/license + * @copyright Copyright (c) 2011, Mike Cao */ class Dispatcher { diff --git a/flight/core/Loader.php b/flight/core/Loader.php index e9ac837..046f8d8 100644 --- a/flight/core/Loader.php +++ b/flight/core/Loader.php @@ -1,12 +1,5 @@ - * @license MIT, http://flightphp.com/license - */ - declare(strict_types=1); namespace flight\core; @@ -19,6 +12,9 @@ use Exception; * a list of reusable class instances and can generate a new class * instances with custom initialization parameters. It also performs * class autoloading. + * + * @license MIT, http://flightphp.com/license + * @copyright Copyright (c) 2011, Mike Cao */ class Loader { diff --git a/flight/database/PdoWrapper.php b/flight/database/PdoWrapper.php index ffa4c0c..87c930e 100644 --- a/flight/database/PdoWrapper.php +++ b/flight/database/PdoWrapper.php @@ -1,5 +1,7 @@ - * @license MIT, http://flightphp.com/license - */ - declare(strict_types=1); namespace flight\net; @@ -18,6 +11,9 @@ use flight\util\Collection; * all the super globals $_GET, $_POST, $_COOKIE, and $_FILES * are stored and accessible via the Request object. * + * @license MIT, http://flightphp.com/license + * @copyright Copyright (c) 2011, Mike Cao + * * The default request properties are: * * - **url** - The URL being requested diff --git a/flight/net/Response.php b/flight/net/Response.php index 247c6b5..7bef496 100644 --- a/flight/net/Response.php +++ b/flight/net/Response.php @@ -1,12 +1,5 @@ - * @license MIT, http://flightphp.com/license - */ - declare(strict_types=1); namespace flight\net; @@ -17,11 +10,14 @@ use Exception; * The Response class represents an HTTP response. The object * contains the response headers, HTTP status code, and response * body. + * + * @license MIT, http://flightphp.com/license + * @copyright Copyright (c) 2011, Mike Cao */ class Response { /** - * header Content-Length. + * Content-Length header. */ public bool $content_length = true; @@ -312,15 +308,15 @@ class Response \strlen($this->body); } - /** - * Gets the response body - * - * @return string - */ - public function getBody(): string - { - return $this->body; - } + /** + * Gets the response body + * + * @return string + */ + public function getBody(): string + { + return $this->body; + } /** * Gets whether response body was sent. diff --git a/flight/net/Route.php b/flight/net/Route.php index f65910a..bdf5827 100644 --- a/flight/net/Route.php +++ b/flight/net/Route.php @@ -1,12 +1,5 @@ - * @license MIT, http://flightphp.com/license - */ - declare(strict_types=1); namespace flight\net; @@ -15,6 +8,9 @@ namespace flight\net; * The Route class is responsible for routing an HTTP request to * an assigned callback function. The Router tries to match the * requested URL against a series of URL patterns. + * + * @license MIT, http://flightphp.com/license + * @copyright Copyright (c) 2011, Mike Cao */ class Route { diff --git a/flight/net/Router.php b/flight/net/Router.php index 607942e..6f6300a 100644 --- a/flight/net/Router.php +++ b/flight/net/Router.php @@ -1,12 +1,5 @@ - * @license MIT, http://flightphp.com/license - */ - declare(strict_types=1); namespace flight\net; @@ -18,6 +11,9 @@ use flight\net\Route; * The Router class is responsible for routing an HTTP request to * an assigned callback function. The Router tries to match the * requested URL against a series of URL patterns. + * + * @license MIT, http://flightphp.com/license + * @copyright Copyright (c) 2011, Mike Cao */ class Router { diff --git a/flight/template/View.php b/flight/template/View.php index d0c5f3b..dfd29ee 100644 --- a/flight/template/View.php +++ b/flight/template/View.php @@ -1,12 +1,5 @@ - * @license MIT, http://flightphp.com/license - */ - declare(strict_types=1); namespace flight\template; @@ -15,6 +8,9 @@ namespace flight\template; * The View class represents output to be displayed. It provides * methods for managing view data and inserts the data into * view templates upon rendering. + * + * @license MIT, http://flightphp.com/license + * @copyright Copyright (c) 2011, Mike Cao */ class View { diff --git a/flight/util/Collection.php b/flight/util/Collection.php index 3c1317c..0ede58a 100644 --- a/flight/util/Collection.php +++ b/flight/util/Collection.php @@ -1,12 +1,5 @@ - * @license MIT, http://flightphp.com/license - */ - declare(strict_types=1); namespace flight\util; @@ -19,6 +12,9 @@ use JsonSerializable; /** * The Collection class allows you to access a set of data * using both array and object notation. + * + * @license MIT, http://flightphp.com/license + * @copyright Copyright (c) 2011, Mike Cao * @implements ArrayAccess * @implements Iterator */ diff --git a/flight/util/ReturnTypeWillChange.php b/flight/util/ReturnTypeWillChange.php index 982800c..81fb685 100644 --- a/flight/util/ReturnTypeWillChange.php +++ b/flight/util/ReturnTypeWillChange.php @@ -1,5 +1,7 @@ + flight/ tests/