src/Sendy.php
public function subscribe(array $values)
    {
        $result = $this->buildAndSend('subscribe', $values);

        /**
         * Prepare the array to return
         */
        $notice = [
            'status' => true,
            'message' => '',
        ];

        /**
         * Handle results
         */
        switch (strval($result)) {
            case '1':
                $notice['message'] = 'Subscribed.';

                break;
            case 'Already subscribed.':
                $notice['message'] = $result;

                break;
            default:
                $notice = [
                    'status' => false,
                    'message' => $result
                ];

                break;
        }

        return $notice;
    }
public function subscribe(array $values)
    {
        $result = $this->buildAndSend('subscribe', $values);

        /**
         * Prepare the array to return
         */
        $notice = [
            'status' => true,
            'message' => '',
        ];

        /**
         * Handle results
         */
        switch (strval($result)) {
            case '1':
                $notice['message'] = 'Subscribed.';

                break;
            case 'Already subscribed.':
                $notice['message'] = $result;

                break;
            default:
                $notice = [
                    'status' => false,
                    'message' => $result
                ];

                break;
        }

        return $notice;
    }
public function subscribe ( array $ values ) { $ result = $ this -> buildAndSend ( 'subscribe' , $ values ) ; /**
         * Prepare the array to return
         */ $ notice = [ 'status' => true , 'message' => '' , ] ; /**
         * Handle results
         */ switch ( strval ( $ result ) ) { case '1' : $ notice [ 'message' ] = 'Subscribed.' ; break ; case 'Already subscribed.' : $ notice [ 'message' ] = $ result ; break ; default : $ notice = [ 'status' => false , 'message' => $ result ] ; break ; } return $ notice ; }
Method to add a new subscriber to a list

@param array $values

@return array
Method to add a new subscriber to a list