Commit c0d07382 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Merge branch '5956-use-strict-typing' into '1.4-dev'

Resolve "Use strict typing"

See merge request fusiondirectory/fd!532
parents 0447500e ce302cbd
......@@ -85,7 +85,7 @@ class SnapshotCreateDialog extends simplePlugin
}
}
function renderAttributes ($readOnly = FALSE)
function renderAttributes (bool $readOnly = FALSE)
{
global $ui;
$smarty = get_smarty();
......
......@@ -421,17 +421,17 @@ class managementListing
/*!
* \brief Get action
*/
function getAction ()
function getAction (): array
{
global $config;
$result = array('targets' => array(), 'action' => '', 'subaction' => NULL);
// Do not do anything if this is not our PID, or there's even no PID available...
if (!isset($_REQUEST['dn']) && (!isset($_REQUEST['PID']) || $_REQUEST['PID'] != $this->pid)) {
return;
return $result;
}
$result = array('targets' => array(), 'action' => '', 'subaction' => NULL);
// Filter GET with "act" attributes
if (isset($_GET['act'])) {
$key = validate($_GET['act']);
......
......@@ -125,7 +125,7 @@ class multiPlugin extends simplePlugin
return $message;
}
function set_acl_category ($cat)
function set_acl_category (string $cat)
{
parent::set_acl_category($cat);
foreach ($this->plugin as &$plug) {
......
<?php
/*
This code is part of FusionDirectory (http://www.fusiondirectory.org/)
Copyright (C) 2011-2017 FusionDirectory
Copyright (C) 2011-2019 FusionDirectory
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -106,7 +107,7 @@ class simpleService extends simplePlugin
$this->status = $value;
}
static function generatePlProvidedAcls ($attributesInfo): array
static function generatePlProvidedAcls (array $attributesInfo): array
{
$acls = parent::generatePlProvidedAcls($attributesInfo);
if (static::$showActions) {
......@@ -119,4 +120,3 @@ class simpleService extends simplePlugin
return $acls;
}
}
?>
<?php
/*
This code is part of FusionDirectory (http://www.fusiondirectory.org/)
Copyright (C) 2013-2016 FusionDirectory
Copyright (C) 2013-2019 FusionDirectory
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -79,6 +80,7 @@ class reference extends simplePlugin
function check (): array
{
return array();
}
function save (): array
......@@ -91,5 +93,3 @@ class reference extends simplePlugin
return array();
}
}
?>
  • SonarQube analysis indicates that quality gate is failed.

    • Security Rating on New Code is passed: Actual value 1
    • Reliability Rating on New Code is failed: Actual value 3 > 1
    • Maintainability Rating on New Code is passed: Actual value 1
    • Duplicated Lines on New Code (%) is passed: Actual value 3.116883116883117

    SonarQube analysis reported no issues.

Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment