OFFLINE-GmbH / oc-gdpr-plugin

October CMS plugin to make websites GDPR and ePrivacy compliant
https://octobercms.com/plugin/offline-gdpr
MIT License
36 stars 20 forks source link

Upgrade the php files to php7 strict standard #24

Closed ghost closed 6 years ago

ghost commented 6 years ago

Minor request feature, but this is something I do with all my plugins and think it should be added to yours.

declare(strict_types=1);

Add the following to the top of all the php files.

So for example Plugin.php file would be:

<?php 

declare(strict_types=1);

namespace OFFLINE\GDPR;

use Backend\Facades\Backend;
use Illuminate\Support\Facades\Cookie;
use Illuminate\Support\Facades\Session;
use OFFLINE\GDPR\Classes\Cookies\ConsentCookie;
use OFFLINE\GDPR\Components\ConsentManager;
use OFFLINE\GDPR\Components\CookieBanner;
use OFFLINE\GDPR\Components\CookieManager;
use OFFLINE\GDPR\Console\CleanUp;
use OFFLINE\GDPR\Models\CookieConsentSettings;
use OFFLINE\GDPR\Models\DataRetentionSettings;
use System\Classes\PluginBase;

class Plugin extends PluginBase
{
..

I can go through all the files and add that for you if you like.

tobias-kuendig commented 6 years ago

I don't see a real benefit if we don't also add scalar type hints to all method declarations?