-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e45162
commit 971d813
Showing
22 changed files
with
461 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace App\Gamify\Badges; | ||
|
||
use QCod\Gamify\BadgeType; | ||
|
||
class FirstContribution extends BadgeType | ||
{ | ||
/** | ||
* Description for badge | ||
* | ||
* @var string | ||
*/ | ||
protected $description = ''; | ||
|
||
/** | ||
* Check is user qualifies for badge | ||
* | ||
* @param $user | ||
* @return bool | ||
*/ | ||
public function qualifier($user) | ||
{ | ||
return $user->getPoints() >= 80; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace App\Gamify\Points; | ||
|
||
use QCod\Gamify\PointType; | ||
|
||
class BlogCreated extends PointType | ||
{ | ||
/** | ||
* Number of points | ||
* | ||
* @var int | ||
*/ | ||
public $points = 20; | ||
|
||
/** | ||
* Point constructor | ||
* | ||
* @param $subject | ||
*/ | ||
public function __construct($subject) | ||
{ | ||
$this->subject = $subject; | ||
} | ||
|
||
/** | ||
* User who will be receive points | ||
* | ||
* @return mixed | ||
*/ | ||
public function payee() | ||
{ | ||
return $this->getSubject()->user; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace App\Gamify\Points; | ||
|
||
use QCod\Gamify\PointType; | ||
|
||
class BookmarkCreated extends PointType | ||
{ | ||
/** | ||
* Number of points | ||
* | ||
* @var int | ||
*/ | ||
public $points = 20; | ||
|
||
/** | ||
* Point constructor | ||
* | ||
* @param $subject | ||
*/ | ||
public function __construct($subject) | ||
{ | ||
$this->subject = $subject; | ||
} | ||
|
||
/** | ||
* User who will be receive points | ||
* | ||
* @return mixed | ||
*/ | ||
public function payee() | ||
{ | ||
return $this->getSubject()->user; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace App\Gamify\Points; | ||
|
||
use QCod\Gamify\PointType; | ||
|
||
class CommentCreated extends PointType | ||
{ | ||
/** | ||
* Number of points | ||
* | ||
* @var int | ||
*/ | ||
public $points = 20; | ||
|
||
/** | ||
* Point constructor | ||
* | ||
* @param $subject | ||
*/ | ||
public function __construct($subject) | ||
{ | ||
$this->subject = $subject; | ||
} | ||
|
||
/** | ||
* User who will be receive points | ||
* | ||
* @return mixed | ||
*/ | ||
public function payee() | ||
{ | ||
return $this->getSubject()->user; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace App\Gamify\Points; | ||
|
||
use QCod\Gamify\PointType; | ||
|
||
class LikeCreated extends PointType | ||
{ | ||
/** | ||
* Number of points | ||
* | ||
* @var int | ||
*/ | ||
public $points = 20; | ||
|
||
/** | ||
* Point constructor | ||
* | ||
* @param $subject | ||
*/ | ||
public function __construct($subject) | ||
{ | ||
$this->subject = $subject; | ||
} | ||
|
||
/** | ||
* User who will be receive points | ||
* | ||
* @return mixed | ||
*/ | ||
public function payee() | ||
{ | ||
return $this->getSubject()->user; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace App\Gamify\Points; | ||
|
||
use QCod\Gamify\PointType; | ||
|
||
class ReplyCreated extends PointType | ||
{ | ||
/** | ||
* Number of points | ||
* | ||
* @var int | ||
*/ | ||
public $points = 20; | ||
|
||
/** | ||
* Point constructor | ||
* | ||
* @param $subject | ||
*/ | ||
public function __construct($subject) | ||
{ | ||
$this->subject = $subject; | ||
} | ||
|
||
/** | ||
* User who will be receive points | ||
* | ||
* @return mixed | ||
*/ | ||
public function payee() | ||
{ | ||
return $this->getSubject()->user; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.