|  Download Stern      
 Stern lets you built type-safe PHP projects, even if your project's users aren't writing type-safe code.  Requires PHP 7+ UsageUsing Stern is simply: 
Make your class use the `SternTrait`.
Rename your methods from `whateverName` to `strictWhateverName`.
Enjoy strict-typing whether your users like it or not.
 Example  <?php
  declare(strict_types=1);
  namespace YourVendor\YourNamespace;
  class YourClassThatUsesStrictTypes
  {
+      use \ParagonIE\Stern\SternTrait;
  
      /.../
  
-     public function foo(string $param = ''): bool
+     public function strictFoo(string $param = ''): bool
      {
      }
  }
 Docblock UsabilityFor better usability (especially with type-aware IDEs like PHPStorm), make sure
you use @methoddocblocks.   <?php
  declare(strict_types=1);
  namespace YourVendor\YourNamespace;
+   /
+    * @method bool foo(string $param = '')
+    */
  class YourClassThatUsesStrictTypes
  {
+      use \ParagonIE\Stern\SternTrait;
  
      /.../
  
-     public function foo(string $param = ''): bool
+     public function strictFoo(string $param = ''): bool
      {
      }
  }
 |