Test Failed
Push — main ( d75e4f...57e80b )
by Dimitri
03:34 queued 01:38
created
phpstan-baseline.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -2,40 +2,40 @@
 block discarded – undo
2 2
 
3 3
 $ignoreErrors = [];
4 4
 $ignoreErrors[] = [
5
-	'message' => '#^Parameter \\#1 \\$name of function service expects class\\-string\\<cronExpression\\>, string given\\.$#',
6
-	'identifier' => 'argument.type',
7
-	'count' => 1,
8
-	'path' => __DIR__ . '/src/Commands/Lister.php',
5
+    'message' => '#^Parameter \\#1 \\$name of function service expects class\\-string\\<cronExpression\\>, string given\\.$#',
6
+    'identifier' => 'argument.type',
7
+    'count' => 1,
8
+    'path' => __DIR__ . '/src/Commands/Lister.php',
9 9
 ];
10 10
 $ignoreErrors[] = [
11
-	'message' => '#^Parameter \\#1 \\$name of function service expects class\\-string\\<scheduler\\>, string given\\.$#',
12
-	'identifier' => 'argument.type',
13
-	'count' => 1,
14
-	'path' => __DIR__ . '/src/Commands/Lister.php',
11
+    'message' => '#^Parameter \\#1 \\$name of function service expects class\\-string\\<scheduler\\>, string given\\.$#',
12
+    'identifier' => 'argument.type',
13
+    'count' => 1,
14
+    'path' => __DIR__ . '/src/Commands/Lister.php',
15 15
 ];
16 16
 $ignoreErrors[] = [
17
-	'message' => '#^Parameter \\#1 \\$name of function service expects class\\-string\\<scheduler\\>, string given\\.$#',
18
-	'identifier' => 'argument.type',
19
-	'count' => 1,
20
-	'path' => __DIR__ . '/src/Commands/Run.php',
17
+    'message' => '#^Parameter \\#1 \\$name of function service expects class\\-string\\<scheduler\\>, string given\\.$#',
18
+    'identifier' => 'argument.type',
19
+    'count' => 1,
20
+    'path' => __DIR__ . '/src/Commands/Run.php',
21 21
 ];
22 22
 $ignoreErrors[] = [
23
-	'message' => '#^Parameter \\#1 \\$name of function service expects class\\-string\\<cronExpression\\>, string given\\.$#',
24
-	'identifier' => 'argument.type',
25
-	'count' => 1,
26
-	'path' => __DIR__ . '/src/Task.php',
23
+    'message' => '#^Parameter \\#1 \\$name of function service expects class\\-string\\<cronExpression\\>, string given\\.$#',
24
+    'identifier' => 'argument.type',
25
+    'count' => 1,
26
+    'path' => __DIR__ . '/src/Task.php',
27 27
 ];
28 28
 $ignoreErrors[] = [
29
-	'message' => '#^Parameter \\#1 \\$name of function service expects class\\-string\\<httpclient\\>, string given\\.$#',
30
-	'identifier' => 'argument.type',
31
-	'count' => 1,
32
-	'path' => __DIR__ . '/src/Task.php',
29
+    'message' => '#^Parameter \\#1 \\$name of function service expects class\\-string\\<httpclient\\>, string given\\.$#',
30
+    'identifier' => 'argument.type',
31
+    'count' => 1,
32
+    'path' => __DIR__ . '/src/Task.php',
33 33
 ];
34 34
 $ignoreErrors[] = [
35
-	'message' => '#^Parameter \\#1 \\$name of function service expects class\\-string\\<scheduler\\>, string given\\.$#',
36
-	'identifier' => 'argument.type',
37
-	'count' => 1,
38
-	'path' => __DIR__ . '/src/TaskRunner.php',
35
+    'message' => '#^Parameter \\#1 \\$name of function service expects class\\-string\\<scheduler\\>, string given\\.$#',
36
+    'identifier' => 'argument.type',
37
+    'count' => 1,
38
+    'path' => __DIR__ . '/src/TaskRunner.php',
39 39
 ];
40 40
 
41 41
 return ['parameters' => ['ignoreErrors' => $ignoreErrors]];
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 $ignoreErrors = [];
4 4
 $ignoreErrors[] = [
Please login to merge, or discard this patch.
kahlan-config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,4 +42,4 @@
 block discarded – undo
42 42
     $reporters->add('coverage', $coverage);
43 43
 });
44 44
 
45
-require_once realpath(rtrim(getcwd(), '\\/ ')).DIRECTORY_SEPARATOR.'spec'.DIRECTORY_SEPARATOR.'bootstrap.php';
45
+require_once realpath(rtrim(getcwd(), '\\/ ')) . DIRECTORY_SEPARATOR . 'spec' . DIRECTORY_SEPARATOR . 'bootstrap.php';
Please login to merge, or discard this patch.
src/RunResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
                 }
100 100
 
101 101
                 // Si nous ne le faisons pas correspondre, recommencez les itérations
102
-                if (! $satisfied) {
102
+                if (!$satisfied) {
103 103
                     $next = $this->increment($next, $position);
104 104
 
105 105
                     continue 2;
Please login to merge, or discard this patch.
src/Test/MockTask.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     public function run()
34 34
     {
35 35
         $method = 'run' . ucfirst($this->type);
36
-        if (! method_exists($this, $method)) {
36
+        if (!method_exists($this, $method)) {
37 37
             throw TasksException::invalidTaskType($this->type);
38 38
         }
39 39
 
Please login to merge, or discard this patch.
src/Config/tasks.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      * Enregistrez toutes les tâches dans cette méthode pour l'application.
39 39
      * Appelé par TaskRunner.
40 40
      */
41
-    'init' => function (Scheduler $schedule) {
41
+    'init' => function(Scheduler $schedule) {
42 42
         $schedule->command('foo:bar')->daily();
43 43
 
44 44
         $schedule->shell('cp foo bar')->daily('11:00 pm');
Please login to merge, or discard this patch.
src/CronExpression.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
         if (str_contains($time, '/')) {
145 145
             $period = substr($time, strpos($time, '/') + 1) ?: '';
146 146
 
147
-            if ($period === '' || ! ctype_digit($period)) {
147
+            if ($period === '' || !ctype_digit($period)) {
148 148
                 throw TasksException::invalidCronExpression($this->currentExpression);
149 149
             }
150 150
 
Please login to merge, or discard this patch.
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      */
28 28
     protected string $timezone;
29 29
 
30
-	/**
30
+    /**
31 31
      * Le fuseau horaire global à utiliser.
32 32
      */
33 33
     private string $globalTimezone;
@@ -51,24 +51,24 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function __construct(?string $timezone = null)
53 53
     {
54
-		if (null === $globalTimezone = config('tasks.timezone')) {
55
-			$globalTimezone = config('app.timezone');
56
-		}
54
+        if (null === $globalTimezone = config('tasks.timezone')) {
55
+            $globalTimezone = config('app.timezone');
56
+        }
57 57
 
58
-		$this->globalTimezone = $globalTimezone;
58
+        $this->globalTimezone = $globalTimezone;
59 59
 
60 60
         $this->setTimezone($timezone);
61 61
     }
62 62
 
63
-	/**
64
-	 * Définit le fuseau horaire global pour toutes les tâches de construction.
65
-	*/
66
-	public function setTimezone(?string $timezone = null): self
67
-	{
68
-		$this->timezone = $timezone ?? $this->globalTimezone;
63
+    /**
64
+     * Définit le fuseau horaire global pour toutes les tâches de construction.
65
+     */
66
+    public function setTimezone(?string $timezone = null): self
67
+    {
68
+        $this->timezone = $timezone ?? $this->globalTimezone;
69 69
 
70
-		return $this;
71
-	}
70
+        return $this;
71
+    }
72 72
 
73 73
     /**
74 74
      * Vérifie si l'expression cron doit être exécutée. Permet d'utiliser un fuseau horaire personnalisé pour une tâche spécifique
Please login to merge, or discard this patch.
src/TaskRunner.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,11 +58,11 @@  discard block
 block discarded – undo
58 58
 
59 59
         foreach ($tasks as $task) {
60 60
             // Si des tâches spécifiques ont été choisies, sauter l'exécution des tâches restantes.
61
-            if (! empty($this->only) && ! in_array($task->name, $this->only, true)) {
61
+            if (!empty($this->only) && !in_array($task->name, $this->only, true)) {
62 62
                 continue;
63 63
             }
64 64
 
65
-            if (! $task->shouldRun($this->testTime) && empty($this->only)) {
65
+            if (!$task->shouldRun($this->testTime) && empty($this->only)) {
66 66
                 continue;
67 67
             }
68 68
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
             return;
131 131
         }
132 132
 
133
-        if (! is_cli()) {
133
+        if (!is_cli()) {
134 134
             return;
135 135
         }
136 136
 
Please login to merge, or discard this patch.
src/Task.php 2 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     protected array $environments = [];
58 58
 
59
-	/**
59
+    /**
60 60
      * Timezone dans lequel la tâche doit être traitée.
61 61
      */
62 62
     protected ?string $timezone = null;
@@ -68,11 +68,11 @@  discard block
 block discarded – undo
68 68
      */
69 69
     protected array $attributes = [];
70 70
 
71
-	protected ContainerInterface $container;
71
+    protected ContainerInterface $container;
72 72
 
73 73
     /**
74 74
      * @param string $type  Type de l'action en cours.
75
-	 * @param mixed $action Le contenu actuel qu'on souhaite executer.
75
+     * @param mixed $action Le contenu actuel qu'on souhaite executer.
76 76
      *
77 77
      * @throws TasksException
78 78
      */
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
             throw TasksException::invalidTaskType($type);
83 83
         }
84 84
 
85
-		$this->container = service('container');
85
+        $this->container = service('container');
86 86
     }
87 87
 
88 88
     /**
@@ -158,18 +158,18 @@  discard block
 block discarded – undo
158 158
         return $this;
159 159
     }
160 160
 
161
-	/**
162
-	 * Définit le fuseau horaire pour l'exécution de la tâche.
163
-	 *
164
-	 * @param string $timezone L'identifiant du fuseau horaire à utiliser pour la tâche.
165
-	 * 						   Il doit s'agir d'une chaîne de caractères PHP valide (par exemple, 'America/New_York', 'Europe/Paris').
166
-	*/
167
-	public function timezone(string $timezone): self
168
-	{
169
-		$this->timezone = $timezone;
170
-
171
-		return $this;
172
-	}
161
+    /**
162
+     * Définit le fuseau horaire pour l'exécution de la tâche.
163
+     *
164
+     * @param string $timezone L'identifiant du fuseau horaire à utiliser pour la tâche.
165
+     * 						   Il doit s'agir d'une chaîne de caractères PHP valide (par exemple, 'America/New_York', 'Europe/Paris').
166
+     */
167
+    public function timezone(string $timezone): self
168
+    {
169
+        $this->timezone = $timezone;
170
+
171
+        return $this;
172
+    }
173 173
 
174 174
     /**
175 175
      * Renvoie la date à laquelle cette tâche a été exécutée pour la dernière fois.
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function __construct(protected string $type, protected mixed $action, protected array $parameters = [])
80 80
     {
81
-        if (! in_array($type, $this->types, true)) {
81
+        if (!in_array($type, $this->types, true)) {
82 82
             throw TasksException::invalidTaskType($type);
83 83
         }
84 84
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     public function run()
122 122
     {
123 123
         $method = 'run' . ucfirst($this->type);
124
-        if (! method_exists($this, $method)) {
124
+        if (!method_exists($this, $method)) {
125 125
             throw TasksException::invalidTaskType($this->type);
126 126
         }
127 127
 
@@ -136,12 +136,12 @@  discard block
 block discarded – undo
136 136
         $cron = service('cronExpression')->setTimezone($this->timezone);
137 137
 
138 138
         // Autoriser le réglage des heures pendant les tests
139
-        if (! empty($testTime)) {
139
+        if (!empty($testTime)) {
140 140
             $cron->testTime($testTime);
141 141
         }
142 142
 
143 143
         // Sommes-nous limités aux environnements?
144
-        if (! empty($this->environments) && ! $this->runsInEnvironment(environment())) {
144
+        if (!empty($this->environments) && !$this->runsInEnvironment(environment())) {
145 145
             return false;
146 146
         }
147 147
 
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
      */
249 249
     protected function runEvent(): bool
250 250
     {
251
-        return ! (false === service('event')->emit($this->getAction()));
251
+        return !(false === service('event')->emit($this->getAction()));
252 252
     }
253 253
 
254 254
     /**
Please login to merge, or discard this patch.
src/Scheduler.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
  */
19 19
 class Scheduler
20 20
 {
21
-	const SUNDAY = 0;
21
+    const SUNDAY = 0;
22 22
 
23 23
     const MONDAY = 1;
24 24
 
Please login to merge, or discard this patch.