Skip to content

Commit a2467b0

Browse files
samuelweipizkaz
andauthored
Add PHP strict type (#3032)
* Set php strict_types * Fix type bug in test room int access code * Fix broken attestation * Fix time type in factories ´ * Fix saml attribute type * Fix time casting on db:upgrade * Fix progress on db:import * Fix bbb_logo and bbb_logo_dark attribute handling * Enforce name length checks before valid name regex * Fix room_auth_token_type type casting * Fix time casting in provisioning * Add type to scopeWithRole * Require name parameter for user search * Add types to GL2 and GL3 import models and tests * Fix Greenlight import test helpers * Add type hints to arrays --------- Co-authored-by: Sebastian Neuser <pzkz@infra.run>
1 parent 393bb5c commit a2467b0

636 files changed

Lines changed: 1414 additions & 95 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/Auth/ExternalUser.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace App\Auth;
46

57
use App\Models\Role;
@@ -51,9 +53,9 @@ public function createOrFindEloquentModel(string $authenticator): User
5153
* Add a value to an attribute.
5254
*
5355
* @param string $name The name of the attribute.
54-
* @param mixed $value The value to add to the attribute.
56+
* @param string|null $value The value to add to the attribute.
5557
*/
56-
public function addAttributeValue($name, $value)
58+
public function addAttributeValue(string $name, ?string $value)
5759
{
5860
if (! isset($this->attributes[$name])) {
5961
$this->attributes[$name] = [];

app/Auth/LDAP/LDAPController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace App\Auth\LDAP;
46

57
use App\Auth\MissingAttributeException;

app/Auth/LDAP/LDAPProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace App\Auth\LDAP;
46

57
use Illuminate\Auth\EloquentUserProvider;

app/Auth/LDAP/LDAPServiceProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace App\Auth\LDAP;
46

57
use Illuminate\Log\LogManager;

app/Auth/LDAP/LDAPUser.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace App\Auth\LDAP;
46

57
use App\Auth\ExternalUser;

app/Auth/LDAP/LDAPUserObject.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace App\Auth\LDAP;
46

57
use LdapRecord\Models\Model;

app/Auth/Local/LocalProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace App\Auth\Local;
46

57
use Illuminate\Auth\EloquentUserProvider;

app/Auth/MissingAttributeException.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace App\Auth;
46

57
class MissingAttributeException extends \Exception

app/Auth/OIDC/AccessTokenHashChecker.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace App\Auth\OIDC;
46

57
use Jose\Component\Checker\ClaimChecker;

app/Auth/OIDC/EventsChecker.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace App\Auth\OIDC;
46

57
use Jose\Component\Checker\ClaimChecker;

0 commit comments

Comments
 (0)