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
15 lines
210 B
PHP
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();
|
|
|
|
}
|