Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Письменов Дмитрий Иванович
/
yourroomads
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 49bb42cc
authored
Jun 16, 2021
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix LimitedBy
1 parent
5e6ecd7c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
app/Service/Handlers/AdsHandler.php
app/Service/Handlers/DirectHandler.php
app/Service/Handlers/AdsHandler.php
View file @
49bb42c
...
@@ -14,9 +14,9 @@ class AdsHandler
...
@@ -14,9 +14,9 @@ class AdsHandler
$this
->
request
=
$request
;
$this
->
request
=
$request
;
}
}
public
static
function
getInstance
(
APIRequest
$request
=
null
)
static
function
getInstance
(
APIRequest
$request
=
null
)
{
{
switch
(
$request
->
getApi
()){
switch
(
$request
->
getApi
())
{
case
API
::
YANDEX
:
case
API
::
YANDEX
:
return
new
DirectHandler
(
$request
);
return
new
DirectHandler
(
$request
);
}
}
...
@@ -39,7 +39,7 @@ class AdsHandler
...
@@ -39,7 +39,7 @@ class AdsHandler
protected
function
limited
(
$response
)
protected
function
limited
(
$response
)
{
{
return
$response
[
'result'
][
'LimitedBy'
]
??
0
;
return
false
;
}
}
protected
function
parse
(
$response
)
protected
function
parse
(
$response
)
...
...
app/Service/Handlers/DirectHandler.php
View file @
49bb42c
<?php
<?php
namespace
App\Service\Handlers
;
namespace
App\Service\Handlers
;
class
DirectHandler
extends
AdsHandler
{
class
DirectHandler
extends
AdsHandler
public
function
limited
(
$response
){
{
return
$this
->
response
[
'LimitedBy'
]
??
false
;
public
function
limited
(
$response
)
{
return
$response
[
'result'
][
'LimitedBy'
]
??
false
;
}
}
protected
function
parse
(
$response
){
protected
function
parse
(
$response
)
{
$this
->
response
=
$response
->
json
();
$this
->
response
=
$response
->
json
();
}
}
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment