@@ -2,10 +2,10 @@  | 
                                                    ||
| 2 | 2 | |
| 3 | 3 | namespace drupol\Yaroc\Plugin\RandomLib\Source;  | 
                                                        
| 4 | 4 | |
| 5 | +use SecurityLib\Strength;  | 
                                                        |
| 5 | 6 | use drupol\Yaroc\Plugin\Method\GenerateIntegers;  | 
                                                        
| 6 | 7 | use drupol\Yaroc\RandomOrgAPI;  | 
                                                        
| 7 | 8 | use drupol\Yaroc\RandomOrgAPIInterface;  | 
                                                        
| 8 | -use SecurityLib\Strength;  | 
                                                        |
| 9 | 9 | |
| 10 | 10 | /**  | 
                                                        
| 11 | 11 | * The Random.Org Source.  | 
                                                        
@@ -2,10 +2,10 @@  | 
                                                    ||
| 2 | 2 | |
| 3 | 3 | namespace drupol\Yaroc\Plugin\RychRandom\Generator;  | 
                                                        
| 4 | 4 | |
| 5 | +use Rych\Random\Generator\GeneratorInterface;  | 
                                                        |
| 5 | 6 | use drupol\Yaroc\Plugin\Method\GenerateIntegers;  | 
                                                        
| 6 | 7 | use drupol\Yaroc\RandomOrgAPI;  | 
                                                        
| 7 | 8 | use drupol\Yaroc\RandomOrgAPIInterface;  | 
                                                        
| 8 | -use Rych\Random\Generator\GeneratorInterface;  | 
                                                        |
| 9 | 9 | |
| 10 | 10 | /**  | 
                                                        
| 11 | 11 | * The Random.Org Generator.  | 
                                                        
@@ -29,9 +29,9 @@  | 
                                                    ||
| 29 | 29 | $result = $this->getRandomOrgAPI()->getData($generateIntegers);  | 
                                                        
| 30 | 30 | |
| 31 | 31 | $this->coordinates = [  | 
                                                        
| 32 | - 'x' => rad2deg($result[0] * 2 * pi() - pi()),  | 
                                                        |
| 33 | - 'y' => rad2deg(pi()/2 - acos($result[1] * 2 - 1)),  | 
                                                        |
| 34 | - 'z' => $result[2] * 1000,  | 
                                                        |
| 32 | + 'x' => rad2deg($result[0]*2*pi() - pi()),  | 
                                                        |
| 33 | + 'y' => rad2deg(pi()/2 - acos($result[1]*2 - 1)),  | 
                                                        |
| 34 | + 'z' => $result[2]*1000,  | 
                                                        |
| 35 | 35 | ];  | 
                                                        
| 36 | 36 | |
| 37 | 37 | return $this;  | 
                                                        
@@ -22,7 +22,7 @@ discard block  | 
                                                    ||
| 22 | 22 | */  | 
                                                        
| 23 | 23 | public function run($n = 1000)  | 
                                                        
| 24 | 24 |      { | 
                                                        
| 25 | - $parameters = ['n' => $n * 2, 'decimalPlaces' => 6];  | 
                                                        |
| 25 | + $parameters = ['n' => $n*2, 'decimalPlaces' => 6];  | 
                                                        |
| 26 | 26 | |
| 27 | 27 | $GenerateDecimalFractions = (new GenerateDecimalFractions($this->getHttpClient()))  | 
                                                        
| 28 | 28 | ->withParameters($parameters);  | 
                                                        
@@ -32,14 +32,14 @@ discard block  | 
                                                    ||
| 32 | 32 | $inside = 0;  | 
                                                        
| 33 | 33 |          for ($i = 0; $i < $n; $i++) { | 
                                                        
| 34 | 34 | $x = $numbers[$i];  | 
                                                        
| 35 | - $y = $numbers[$i+1];  | 
                                                        |
| 35 | + $y = $numbers[$i + 1];  | 
                                                        |
| 36 | 36 | |
| 37 | 37 |              if (sqrt($x*$x + $y*$y) <= 1) { | 
                                                        
| 38 | 38 | $inside++;  | 
                                                        
| 39 | 39 | }  | 
                                                        
| 40 | 40 | }  | 
                                                        
| 41 | 41 | |
| 42 | - $this->estimation = 4 * $inside/$n;  | 
                                                        |
| 42 | + $this->estimation = 4*$inside/$n;  | 
                                                        |
| 43 | 43 | |
| 44 | 44 | return $this;  | 
                                                        
| 45 | 45 | }  | 
                                                        
@@ -2,8 +2,8 @@  | 
                                                    ||
| 2 | 2 | |
| 3 | 3 | namespace drupol\Yaroc\Examples;  | 
                                                        
| 4 | 4 | |
| 5 | -use drupol\Yaroc\RandomOrgAPI;  | 
                                                        |
| 6 | 5 | use Http\Adapter\Guzzle6\Client;  | 
                                                        
| 6 | +use drupol\Yaroc\RandomOrgAPI;  | 
                                                        |
| 7 | 7 | |
| 8 | 8 | abstract class BaseExample  | 
                                                        
| 9 | 9 |  { | 
                                                        
@@ -2,10 +2,10 @@  | 
                                                    ||
| 2 | 2 | |
| 3 | 3 | namespace drupol\Yaroc;  | 
                                                        
| 4 | 4 | |
| 5 | -use drupol\Yaroc\Plugin\MethodPluginInterface;  | 
                                                        |
| 6 | 5 | use Http\Client\HttpClient;  | 
                                                        
| 7 | 6 | use Http\Discovery\HttpClientDiscovery;  | 
                                                        
| 8 | 7 | use Psr\Http\Message\ResponseInterface;  | 
                                                        
| 8 | +use drupol\Yaroc\Plugin\MethodPluginInterface;  | 
                                                        |
| 9 | 9 | |
| 10 | 10 | /**  | 
                                                        
| 11 | 11 | * Class RandomOrgAPI.  |