Commit Graph

24 Commits

Author SHA1 Message Date
Ben Ramsey 0d7b8c2b7a Update coding style to include PSR-12, among other options
This also includes heavy use of slevomat/coding-standard to apply
various checks to the code, based on maintainer (me) preference.
2020-01-18 12:13:55 -06:00
Massimiliano Arione 5459113b81 add typehints and return types 2020-01-18 12:13:10 -06:00
André Filipe bdfbf64a10 Removed some else/elseif and added some early returns to make the code a little easier to read, nothing changes on the big picture 2020-01-18 12:13:09 -06:00
Julian Ecknig 4de1348099 Add GmpConverter and GmpTimeConverter 2020-01-18 12:13:09 -06:00
Bradyn Poulsen 3cf759ad05 Migrate isValid() to Validator and ValidatorInterface
* Maintain backwards compatibility with the former Uuid::isValid() and
  Uuid::VALID_PATTERN
* Remove the assert statements in favor of str_replace and preg_match
* Make the validator a featureset of the factory
* Remove old suggestion about locations of constants
* Remove argument count assertions
* Remove VALID_PATTERN from Uuid
2020-01-18 12:13:08 -06:00
SignpostMarv 0030399564 Increase PHPStan levels and update code to resolve issues found 2020-01-18 12:13:08 -06:00
Martin Hujer ca2629767d Require phpstan and correct issues found up to level 2
* issues found by phpstan L0
* issues found by phpstan L1
* issues found by phpstan L2 in src/
* issues found by phpstan L2 in tests/
2020-01-18 12:13:08 -06:00
André Filipe 84fe6cf755 Removed some else/elseif and added some early returns to make the code a little easier to read, nothing changes on the big picture 2019-11-30 15:10:48 -08:00
Emir Beganovic fb1cd7a944 Cleanup: Update and add missing docblocks, remove unused imports
Just a bit of house keeping for the sake of code cleanliness.
2015-10-05 10:18:21 +02:00
Ben Ramsey e6f97dc8ab Add docblocks for classes and interfaces in top-level Ramsey\Uuid namespace 2015-09-27 18:58:50 -05:00
Scrutinizer Auto-Fixer f59b447603 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-08-13 15:32:44 +00:00
Aztech bbce46dabe Add option to enable PeclUuidTimeGenerator via FeatureSet 2015-07-28 22:20:04 +02:00
Aztech 0cd74639cf Enable use of custom TimeGenerator implementations
- Removes now unnecessary `timeConverter` and `timeProvider`
  properties, setters, and getters in both FeatureSet and
  UuidFactory as those are now exclusively used by the default
  TimeGenerator
- Adds a `setTimeGenerator` method on UuidFactory to override the
  default time generator
2015-07-28 22:16:29 +02:00
Aztech e2047199cd Remove redundant method call 2015-07-27 11:14:20 -05:00
Aztech 8974c76bf6 Refactor TimeGeneratorInterface
- Remove UuidFactory from signature
- Remove setters on UuidFactory to prevent inconsistencies (a new feature set and factory should be used instead)
- Update tests to reflect those changes
2015-07-27 11:14:20 -05:00
Ben Ramsey dfbf8b8098 Abstract time generation into family of TimeGeneratorInterface classes 2015-07-27 11:14:20 -05:00
Ben Ramsey b3ef99a2e9 Move RandomGeneratorInterface and RandomGeneratorFactory to Generator NS 2015-07-16 09:54:04 -05:00
Ben Ramsey e006f669ad Adding common docblock file header 2015-07-15 13:59:52 -05:00
Ben Ramsey d67c3490a8 Change namespace to "Ramsey"; closes #48 2015-04-25 12:11:37 -05:00
Ben Ramsey 958643e7b6 Introduce Provider namespace and move Node and Time classes into it 2014-11-08 16:16:44 -05:00
Ben Ramsey 90fd1531d0 Fixing PSR2 standards violations reported by PHP_CodeSniffer 2014-11-08 15:50:04 -05:00
Ben Ramsey cd2d09c356 Introduce Converter namespace and move Number and Time classes into it 2014-11-08 14:43:09 -05:00
Thibaud Fabre c07988fe31 Refactor codecs to remove duplication 2014-11-08 15:00:58 +01:00
Thibaud Fabre 84123b2060 Remove all env related logic from factory
Defers all environment related decisions to factory initialization
All behavior is customizable through DI, but all deps are initialized to proper default instances
Removes static factory configuration
2014-11-08 12:41:40 +01:00