Skip to content

Exercise 1 and 2 Code Files #2

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

Open
wants to merge 6 commits into
base: loyalty/buddy
Choose a base branch
from

Conversation

buddyshontogan
Copy link

Exercise 1 and Exercise 2 files

use UserAccountSchema;

/** string */
public const SUBSCRIPTION_TYPE_MONTHLY = 'monthly';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindly alpha sort constants.

*
* @return mixed[]
*/
protected function doToArray(): array
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kindly sort method names

*
* @return \App\External\Libraries\Auth
*/
public function setApiKey(?ApiKey $apiKey = null): self
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return type is AuthInterface

/**
* @covers \App\Database\Entities\UserAccount
*/
final class UserAccountTest extends DoctrineAnnotationsTestCase
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alpha sort method names and constants

- Exercise 1 and 2 code
@@ -4,6 +4,7 @@
namespace App\Database\Entities;

use App\Database\Schema\UserSchema;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindly remove this line :)


/** string */
public const SUBSCRIPTION_TYPE_LIFETIME = 'lifetime';
public const SUBSCRIPTION_TYPE_MONTHLY = 'monthly';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindly annotate as string

{

/** string */
public const SUBSCRIPTION_TYPE_LIFETIME = 'lifetime';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this constants here you may reuse from UserAccount

*/
protected function getIdProperty(): string
{
return 'userAcctId';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindly rename userAcctId to accountId, user and account doesn't have any relationship yet. a user may have multiple accounts or vice versa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants