wiki.techinc.nl/includes/Emptiable.php
yash9265 351a003e4f Creating an interface to check for emptiness of an object
Basically, MobileFrontEnd PHP codebase has a use case where
it would be more efficient to check for emptiness of a collection
rather than counting its elements and comparing it to 0.

bug: T151797
Change-Id: I309a549c82c0bdd80640f509557f2a48278e13ce
2021-02-19 21:56:21 +00:00

15 lines
210 B
PHP

<?php
namespace MediaWiki;
/**
* An interface to check for emptiness of an object
*/
interface Emptiable {
/**
* Check if object is empty
* @return bool Is it empty
*/
public function isEmpty();
}