for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace vfalies\tmdb\Items;
use vfalies\tmdb\Abstracts\Item;
use vfalies\tmdb\Interfaces\Items\CompanyInterface;
use vfalies\tmdb\Tmdb;
class Company extends Item implements CompanyInterface
{
/**
* Constructor
* @param \vfalies\tmdb\Tmdb $tmdb
* @param int $company_id
* @param array $options
*/
public function __construct(Tmdb $tmdb, $company_id, array $options = array())
parent::__construct($tmdb, $company_id, $options, 'company');
}
public function getDescription()
if (isset($this->data->description)) {
return $this->data->description;
data
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
class MyClass { } $x = new MyClass(); $x->foo = true;
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion:
class MyClass { public $foo; } $x = new MyClass(); $x->foo = true;
return '';
public function getHeadQuarters()
if (isset($this->data->headquarters)) {
return $this->data->headquarters;
public function getHomePage()
if (isset($this->data->homepage)) {
return $this->data->homepage;
public function getId()
if (isset($this->data->id)) {
return $this->data->id;
return 0;
public function getLogoPath()
if (isset($this->data->logo_path)) {
return $this->data->logo_path;
public function getName()
if (isset($this->data->name)) {
return $this->data->name;
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: