for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @author Boris Guéry <[email protected]>
*/
namespace Bgy\OAuth2;
use Bgy\OAuth2\Utils\Ensure;
class ResourceOwner
{
private $resourceOwnerId, $resourceOwnerType;
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.
public function __construct($resourceOwnerId, $resourceOwnerType)
Ensure::string($resourceOwnerId, $resourceOwnerType);
$this->resourceOwnerId = $resourceOwnerId;
$this->resourceOwnerType = $resourceOwnerType;
}
public function getResourceOwnerId()
return $this->resourceOwnerId;
public function getResourceOwnerType()
return $this->resourceOwnerType;
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.