calendarplus icon indicating copy to clipboard operation
calendarplus copied to clipboard

Should use automagic for params

Open LukasReschke opened this issue 10 years ago • 0 comments

    /**
     * @NoAdminRequired
     */
    public function editCalendar() {

        $calendarid = (int) $this -> params('id');
        $pName = (string) $this -> params('name');
        $pActive = (int) $this -> params('active');
        $pColor = (string) $this -> params('color');

vs.

    /**
     * @param int $id
     * @param string $name
     * @param int $active
     * @param string $color
     * @NoAdminRequired
     */
    public function editCalendar($id, $name, $active, $color) {


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

LukasReschke avatar Jul 17 '15 15:07 LukasReschke