Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
TelegramBot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
TelegramBot
Commits
4ed4395c
Commit
4ed4395c
authored
May 18, 2016
by
Jack'lul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix mistakes
parent
193aa44c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
13 deletions
+13
-13
InputContactMessageContent.php
src/Entities/InputContactMessageContent.php
+3
-3
InputLocationMessageContent.php
src/Entities/InputLocationMessageContent.php
+2
-2
InputTextMessageContent.php
src/Entities/InputTextMessageContent.php
+3
-3
InputVenueMessageContent.php
src/Entities/InputVenueMessageContent.php
+5
-5
No files found.
src/Entities/InputContactMessageContent.php
View file @
4ed4395c
...
...
@@ -20,16 +20,16 @@ class InputContactMessageContent extends InputMessageContent
public
function
__construct
(
array
$data
)
{
$this
->
phone_number
isset
(
$data
[
'phone_number'
])
?
$data
[
'phone_number'
]
:
null
;
$this
->
phone_number
=
isset
(
$data
[
'phone_number'
])
?
$data
[
'phone_number'
]
:
null
;
if
(
empty
(
$this
->
phone_number
))
{
throw
new
TelegramException
(
'phone_number is empty!'
);
}
$this
->
first_name
isset
(
$data
[
'first_name'
])
?
$data
[
'first_name'
]
:
null
;
$this
->
first_name
=
isset
(
$data
[
'first_name'
])
?
$data
[
'first_name'
]
:
null
;
if
(
empty
(
$this
->
first_name
))
{
throw
new
TelegramException
(
'first_name is empty!'
);
}
$this
->
last_name
isset
(
$data
[
'last_name'
])
?
$data
[
'last_name'
]
:
null
;
$this
->
last_name
=
isset
(
$data
[
'last_name'
])
?
$data
[
'last_name'
]
:
null
;
}
}
src/Entities/InputLocationMessageContent.php
View file @
4ed4395c
...
...
@@ -19,12 +19,12 @@ class InputLocationMessageContent extends InputMessageContent
public
function
__construct
(
array
$data
)
{
$this
->
latitude
isset
(
$data
[
'latitude'
])
?
$data
[
'latitude'
]
:
null
;
$this
->
latitude
=
isset
(
$data
[
'latitude'
])
?
$data
[
'latitude'
]
:
null
;
if
(
empty
(
$this
->
latitude
))
{
throw
new
TelegramException
(
'latitude is empty!'
);
}
$this
->
longitude
isset
(
$data
[
'longitude'
])
?
$data
[
'longitude'
]
:
null
;
$this
->
longitude
=
isset
(
$data
[
'longitude'
])
?
$data
[
'longitude'
]
:
null
;
if
(
empty
(
$this
->
longitude
))
{
throw
new
TelegramException
(
'longitude is empty!'
);
}
...
...
src/Entities/InputTextMessageContent.php
View file @
4ed4395c
...
...
@@ -20,12 +20,12 @@ class InputTextMessageContent extends InputMessageContent
public
function
__construct
(
array
$data
)
{
$this
->
message_text
isset
(
$data
[
'message_text'
])
?
$data
[
'message_text'
]
:
null
;
$this
->
message_text
=
isset
(
$data
[
'message_text'
])
?
$data
[
'message_text'
]
:
null
;
if
(
empty
(
$this
->
message_text
))
{
throw
new
TelegramException
(
'message_text is empty!'
);
}
$this
->
parse_mode
isset
(
$data
[
'parse_mode'
])
?
$data
[
'parse_mode'
]
:
null
;
$this
->
disable_web_page_preview
isset
(
$data
[
'disable_web_page_preview'
])
?
$data
[
'disable_web_page_preview'
]
:
null
;
$this
->
parse_mode
=
isset
(
$data
[
'parse_mode'
])
?
$data
[
'parse_mode'
]
:
null
;
$this
->
disable_web_page_preview
=
isset
(
$data
[
'disable_web_page_preview'
])
?
$data
[
'disable_web_page_preview'
]
:
null
;
}
}
src/Entities/InputVenueMessageContent.php
View file @
4ed4395c
...
...
@@ -22,26 +22,26 @@ class InputVenueMessageContent extends InputMessageContent
public
function
__construct
(
array
$data
)
{
$this
->
latitude
isset
(
$data
[
'latitude'
])
?
$data
[
'latitude'
]
:
null
;
$this
->
latitude
=
isset
(
$data
[
'latitude'
])
?
$data
[
'latitude'
]
:
null
;
if
(
empty
(
$this
->
latitude
))
{
throw
new
TelegramException
(
'latitude is empty!'
);
}
$this
->
longitude
isset
(
$data
[
'longitude'
])
?
$data
[
'longitude'
]
:
null
;
$this
->
longitude
=
isset
(
$data
[
'longitude'
])
?
$data
[
'longitude'
]
:
null
;
if
(
empty
(
$this
->
longitude
))
{
throw
new
TelegramException
(
'longitude is empty!'
);
}
$this
->
title
isset
(
$data
[
'title'
])
?
$data
[
'title'
]
:
null
;
$this
->
title
=
isset
(
$data
[
'title'
])
?
$data
[
'title'
]
:
null
;
if
(
empty
(
$this
->
title
))
{
throw
new
TelegramException
(
'title is empty!'
);
}
$this
->
address
isset
(
$data
[
'address'
])
?
$data
[
'address'
]
:
null
;
$this
->
address
=
isset
(
$data
[
'address'
])
?
$data
[
'address'
]
:
null
;
if
(
empty
(
$this
->
address
))
{
throw
new
TelegramException
(
'address is empty!'
);
}
$this
->
foursquare_id
isset
(
$data
[
'foursquare_id'
])
?
$data
[
'foursquare_id'
]
:
null
;
$this
->
foursquare_id
=
isset
(
$data
[
'foursquare_id'
])
?
$data
[
'foursquare_id'
]
:
null
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment