| Total Complexity | 3 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class FormWallPostDelete extends Model |
||
| 13 | { |
||
| 14 | public $id; |
||
| 15 | |||
| 16 | /** @var WallPost */ |
||
| 17 | private $_post; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * FormWallPostDelete constructor. Pass wall post active record object inside model |
||
| 21 | * @param WallPost $post |
||
| 22 | */ |
||
| 23 | public function __construct(WallPost $post) |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Set post id based on post active record |
||
| 31 | */ |
||
| 32 | public function before() |
||
| 33 | { |
||
| 34 | $this->id = $this->_post->id; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Delete wall post object from db |
||
| 39 | */ |
||
| 40 | public function make() |
||
| 44 | } |
||
| 45 | } |
||
| 46 |