"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "public_html/lists/base/vendor/phpoption/phpoption/src/PhpOption/None.php" between
phplist-3.4.9.tgz and phplist-3.5.0.tgz

About: phpList is a one-way email announcement delivery system for newsletters, publicity lists, notifications, and many other uses (requires PHP and MySQL).

None.php  (phplist-3.4.9.tgz):None.php  (phplist-3.5.0.tgz)
skipping to change at line 23 skipping to change at line 23
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
namespace PhpOption; namespace PhpOption;
use EmptyIterator; use EmptyIterator;
/**
* @extends Option<mixed>
*/
final class None extends Option final class None extends Option
{ {
/** @var None|null */
private static $instance; private static $instance;
/**
* @return None
*/
public static function create() public static function create()
{ {
if (null === self::$instance) { if (null === self::$instance) {
self::$instance = new self(); self::$instance = new self();
} }
return self::$instance; return self::$instance;
} }
public function get() public function get()
skipping to change at line 71 skipping to change at line 78
public function isDefined() public function isDefined()
{ {
return false; return false;
} }
public function orElse(Option $else) public function orElse(Option $else)
{ {
return $else; return $else;
} }
/**
* @deprecated Use forAll() instead.
*/
public function ifDefined($callable) public function ifDefined($callable)
{ {
// Just do nothing in that case. // Just do nothing in that case.
} }
public function forAll($callable) public function forAll($callable)
{ {
return $this; return $this;
} }
 End of changes. 4 change blocks. 
3 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)