for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace MarkSitko\LaravelUnsplash\Endpoints;
trait Stats
{
/**
* Totals
* Get a list of counts for all of Unsplash.
* @link https://unsplash.com/documentation#totals
*
* @return MarkSitko\LaravelUnsplash\Endpoints\Stats
*/
public function totalStats()
$this->apiCall = [
apiCall
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;
'endpoint' => 'stats/total',
];
return $this;
}
* Month
* Get the overall Unsplash stats for the past 30 days.
* @link https://unsplash.com/documentation#month
public function monthlyStats()
'endpoint' => 'stats/month',
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: