Use strict typing
This commit is contained in:
parent
c248a6047c
commit
9653d7872e
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
/**
|
/**
|
||||||
* Useful PHP Traits
|
* Useful PHP Traits
|
||||||
* Copyright (C) 2023 Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
|
* Copyright (C) 2023 Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
|
||||||
|
@ -69,7 +69,8 @@ trait Getter
|
||||||
$value = $this->__get($property);
|
$value = $this->__get($property);
|
||||||
} catch (\InvalidArgumentException) {
|
} catch (\InvalidArgumentException) {
|
||||||
$value = null;
|
$value = null;
|
||||||
}
|
} finally {
|
||||||
return !empty($value);
|
return !empty($value);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
/**
|
/**
|
||||||
* Useful PHP Traits
|
* Useful PHP Traits
|
||||||
* Copyright (C) 2023 Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
|
* Copyright (C) 2023 Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
/**
|
/**
|
||||||
* Useful PHP Traits
|
* Useful PHP Traits
|
||||||
* Copyright (C) 2023 Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
|
* Copyright (C) 2023 Sebastian Meyer <sebastian.meyer@opencultureconsulting.com>
|
||||||
|
@ -69,8 +69,10 @@ trait Singleton
|
||||||
* This is a singleton class, thus cloning is prohibited.
|
* This is a singleton class, thus cloning is prohibited.
|
||||||
*
|
*
|
||||||
* @access private
|
* @access private
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
final private function __clone()
|
final private function __clone(): void
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue