d8330d828a
- Add headers in all files - Minor field name changes
22 lines
392 B
PHP
22 lines
392 B
PHP
<?php
|
|
/**
|
|
* @author Daniel J. Summers <daniel@bitbadger.solutions>
|
|
* @license MIT
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace BitBadger\PDODocument\Mapper;
|
|
|
|
/**
|
|
* A mapper that returns the integer value of the first item in the results
|
|
*/
|
|
class CountMapper implements Mapper
|
|
{
|
|
/** @inheritDoc */
|
|
public function map(array $result): int
|
|
{
|
|
return (int) $result[0];
|
|
}
|
|
}
|