From 7e392df9614816b12e970092746602cb45563f06 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Mon, 16 Sep 2019 23:59:25 +0200 Subject: [PATCH] CS: review of all include and require statements `include` and `require` are language constructs, not functions. With that in mind there are a number of best practices surrounding them: * There is no need to use parenthesis and not doing so will be, albeit marginally, faster. * Always pass an absolute path for maximum portability. Using `dirname(__FILE__)` instead of `__DIR__` to maintain compatibility with PHP 5.2. * Use `require_once` instead of `include` when the file is _required_ for the rest of the script to be able to function. --- examples/basic-auth.php | 2 +- examples/cookie.php | 2 +- examples/cookie_jar.php | 2 +- examples/get.php | 2 +- examples/multiple.php | 2 +- examples/post.php | 2 +- examples/proxy.php | 2 +- examples/session.php | 2 +- examples/timeout.php | 2 +- library/Requests.php | 2 +- tests/bootstrap.php | 4 ++-- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/basic-auth.php b/examples/basic-auth.php index a9584a8ab..6150dcb5d 100644 --- a/examples/basic-auth.php +++ b/examples/basic-auth.php @@ -1,7 +1,7 @@