jamiehollern /
eventbrite
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | error_reporting(E_ALL); |
||
| 4 | ini_set('display_errors', TRUE); |
||
| 5 | ini_set('display_startup_errors', TRUE); |
||
| 6 | ini_set('opcache.enable', 0); |
||
| 7 | |||
| 8 | |||
| 9 | include_once('vendor/autoload.php'); |
||
| 10 | |||
| 11 | $eventbrite = new \jamiehollern\eventbrite\Eventbrite('DTLIWIDFR5B2ZXIBXV5J'); |
||
| 12 | krumo($eventbrite); |
||
| 13 | |||
| 14 | /*$can_connect = $eventbrite->canConnect(); |
||
|
0 ignored issues
–
show
|
|||
| 15 | |||
| 16 | krumo($can_connect);*/ |
||
| 17 | |||
| 18 | // Old format. |
||
|
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
54% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. Loading history...
|
|||
| 19 | //$events = $eventbrite->get('users/me/orders/', ['query' => ['expand' => 'event.venue']]); |
||
| 20 | |||
| 21 | $events = $eventbrite->get('users/me/orders/', ['expand' => 'event.venue']); |
||
|
0 ignored issues
–
show
The method
get does not exist on object<jamiehollern\eventbrite\Eventbrite>? Since you implemented __call, maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
Loading history...
|
|||
| 22 | |||
| 23 | krumo($events); |
||
| 24 | |||
| 25 | $eventbrite->test(); |
||
|
0 ignored issues
–
show
The method
test does not exist on object<jamiehollern\eventbrite\Eventbrite>? Since you implemented __call, maybe consider adding a @method annotation.
If you implement This is often the case, when class ParentClass {
private $data = array();
public function __call($method, array $args) {
if (0 === strpos($method, 'get')) {
return $this->data[strtolower(substr($method, 3))];
}
throw new \LogicException(sprintf('Unsupported method: %s', $method));
}
}
/**
* If this class knows which fields exist, you can specify the methods here:
*
* @method string getName()
*/
class SomeClass extends ParentClass { }
Loading history...
|
|||
| 26 |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.