PluginProbe
Packeta / 2.3.2
Packeta v2.3.2
2.3.2 2.3.1 trunk 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3.0 1.3.1 1.3.2 1.4 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 All 56 releases
packeta / deps / nette / utils / src / StaticClass.php

StaticClass.php in Packeta 2.3.2, at deps/nette/utils/src/StaticClass.php

33 lines 706 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * This file is part of the Nette Framework (https://nette.org)
5 * Copyright (c) 2004 David Grudl (https://davidgrudl.com)
6 */
7 declare (strict_types=1);
8 namespace Packetery\Nette;
9
10 /**
11 * Static class.
12 */
13 trait StaticClass
14 {
15 /**
16 * @return never
17 * @throws \Error
18 */
19 public final function __construct()
20 {
21 throw new \Error('Class ' . static::class . ' is static and cannot be instantiated.');
22 }
23 /**
24 * Call to undefined static method.
25 * @return void
26 * @throws MemberAccessException
27 */
28 public static function __callStatic(string $name, array $args)
29 {
30 Utils\ObjectHelpers::strictStaticCall(static::class, $name);
31 }
32 }
33