Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH Add generic types #128

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Authenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public function __construct()
return true;
}

/** @var LoggerInterface $logger */
$logger = Injector::inst()->get(LoggerInterface::class);

$certDir = Environment::getEnv('REALME_CERT_DIR');
Expand Down
1 change: 0 additions & 1 deletion src/Authenticator/LoginForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ protected function getFormFields()
*/
protected function getFormActions()
{
/** @var RealMeService $service */
$service = Injector::inst()->get(RealMeService::class);

$integrationType = $service->config()->integration_type;
Expand Down
3 changes: 2 additions & 1 deletion src/Extension/MemberExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
namespace SilverStripe\RealMe\Extension;

use SilverStripe\ORM\DataExtension;
use SilverStripe\Security\Member;

/**
* Class MemberExtension
* @extends DataExtension<Member>
*/
class MemberExtension extends DataExtension
{
Expand Down
6 changes: 5 additions & 1 deletion src/Extension/SiteTreeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@

namespace SilverStripe\RealMe\Extension;

use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\RealMe\RealMeService;
use SilverStripe\Security\InheritedPermissions;
use SilverStripe\Security\Member;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\DataExtension;

/**
* @extends DataExtension<SiteTree>
*/
class SiteTreeExtension extends DataExtension
{
private static $dependencies = array(
Expand Down Expand Up @@ -37,7 +41,7 @@ public function canView($member)
if ($member && $member->ID) {
return null;
}

$data = $this->service->getUserData();
if (empty($data)) {
// Defer if there's no logged in RealMe user
Expand Down