Skip to content

Commit 1047841

Browse files
authored
Update Doc Comments to Maintain Doppar Comment Convention (#164)
2 parents 61d99d5 + 7b8c72d commit 1047841

26 files changed

+262
-326
lines changed

src/Phaseolies/Session/Handlers/CookieSessionHandler.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ public function validate(): void
9090
/**
9191
* Called when a session is opened.
9292
*
93-
* @param string $savePath The path where session data is stored (not used in cookie handler).
94-
* @param string $sessionName The name of the session (not used in cookie handler).
95-
* @return bool Always returns true, indicating success.
93+
* @param string $savePath
94+
* @param string $sessionName
95+
* @return bool
9696
*/
9797
public function open($savePath, $sessionName): bool
9898
{
@@ -102,7 +102,7 @@ public function open($savePath, $sessionName): bool
102102
/**
103103
* Called when a session is closed.
104104
*
105-
* @return bool Always returns true, indicating success.
105+
* @return bool
106106
*/
107107
public function close(): bool
108108
{
@@ -112,8 +112,8 @@ public function close(): bool
112112
/**
113113
* Reads session data from the cookie, decrypting it.
114114
*
115-
* @param string $sessionId The ID of the session to read (not directly used as data is in cookie).
116-
* @return string The decrypted session data, or an empty string if not found or invalid.
115+
* @param string $sessionId
116+
* @return string
117117
*/
118118
public function read($sessionId): string
119119
{
@@ -137,9 +137,9 @@ public function read($sessionId): string
137137
/**
138138
* Writes session data to the cookie, encrypting it.
139139
*
140-
* @param string $sessionId The ID of the session to write (not directly used as data is in cookie).
141-
* @param string $sessionData The raw session data string to be written.
142-
* @return bool True on successful write, false otherwise (e.g., if `setcookie` fails).
140+
* @param string $sessionId
141+
* @param string $sessionData
142+
* @return bool
143143
*/
144144
public function write($sessionId, $sessionData): bool
145145
{
@@ -179,8 +179,8 @@ public function write($sessionId, $sessionData): bool
179179
/**
180180
* Destroys the session data by invalidating the session cookie.
181181
*
182-
* @param string $sessionId The ID of the session to destroy (not directly used).
183-
* @return bool True on successful destruction, false if headers have already been sent.
182+
* @param string $sessionId
183+
* @return bool
184184
*/
185185
public function destroy($sessionId): bool
186186
{
@@ -190,8 +190,8 @@ public function destroy($sessionId): bool
190190
/**
191191
* Performs garbage collection for session data.
192192
*
193-
* @param int $maxlifetime The maximum lifetime of a session (not used for cookie handler).
194-
* @return bool Always returns true.
193+
* @param int $maxlifetime
194+
* @return bool
195195
*/
196196
public function gc($maxlifetime): bool
197197
{
@@ -201,7 +201,7 @@ public function gc($maxlifetime): bool
201201
/**
202202
* Destroys the session cookie by setting its expiration to a past time.
203203
*
204-
* @return bool True on successful cookie destruction, false if headers have already been sent.
204+
* @return bool
205205
*/
206206
private function destroyCookie(): bool
207207
{
@@ -225,9 +225,9 @@ private function destroyCookie(): bool
225225
/**
226226
* Encrypts the given data using AES-256-CBC encryption.
227227
*
228-
* @param string $data The plain text data to encrypt.
229-
* @return string The base64-encoded string containing the IV and encrypted data.
230-
* @throws RuntimeException If the application key is not set or encryption fails.
228+
* @param string $data
229+
* @return string
230+
* @throws RuntimeException
231231
*/
232232
private function encrypt(string $data): string
233233
{
@@ -241,9 +241,9 @@ private function encrypt(string $data): string
241241
/**
242242
* Decrypts the given base64-encoded encrypted data using AES-256-CBC decryption.
243243
*
244-
* @param string $data The base64-encoded string containing the IV and encrypted data.
245-
* @return string The decrypted plain text data.
246-
* @throws RuntimeException If the application key is not set, data is malformed, or decryption fails.
244+
* @param string $data
245+
* @return string
246+
* @throws RuntimeException
247247
*/
248248
private function decrypt(string $data): string
249249
{

src/Phaseolies/Support/Collection.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ public function __construct(string $model, ?array $data = [])
3636
/**
3737
* Access collection data properties directly.
3838
*
39-
* @param string $name The property name to access
40-
* @return mixed|null The value if exists, null otherwise
39+
* @param string $name
40+
* @return mixed|null
4141
*/
4242
public function __get($name)
4343
{
@@ -93,8 +93,8 @@ public function __call($method, $parameters)
9393
/**
9494
* Check if a property exists in the collection data
9595
*
96-
* @param string $name The property name to check
97-
* @return bool True if property exists, false otherwise
96+
* @param string $name
97+
* @return bool
9898
*/
9999
public function __isset($name)
100100
{
@@ -265,7 +265,7 @@ public function push(mixed $item): self
265265
/**
266266
* Flatten a multi-dimensional collection into a single level.
267267
*
268-
* @param int $depth The maximum depth to flatten (default: infinite)
268+
* @param int $depth
269269
* @return static
270270
*/
271271
public function flatten(int $depth = PHP_INT_MAX): self
@@ -322,8 +322,8 @@ public function values(): self
322322
/**
323323
* Return a new collection with unique items.
324324
*
325-
* @param string|null $key Optional key to use for determining uniqueness
326-
* @param bool $strict Whether to use strict comparison (===)
325+
* @param string|null $key
326+
* @param bool $strict
327327
* @return static
328328
*/
329329
public function unique(?string $key = null, bool $strict = false): self
@@ -350,8 +350,8 @@ public function unique(?string $key = null, bool $strict = false): self
350350
/**
351351
* Pluck an array of values from a given key.
352352
*
353-
* @param string $value The key to pluck values from
354-
* @param string|null $key Optional key to use as array keys in the result
353+
* @param string $value
354+
* @param string|null $key
355355
* @return static
356356
*/
357357
public function pluck(string $value, ?string $key = null): self
@@ -400,7 +400,7 @@ public function isNotEmpty(): bool
400400
/**
401401
* Output or return memory usage stats related to the current collection.
402402
*
403-
* @param bool $asString If true, returns human-readable string. Otherwise, returns an array.
403+
* @param bool $asString
404404
* @return string|array
405405
*/
406406
public function withMemoryUsage(bool $asString = true): string|array
@@ -429,8 +429,8 @@ public function withMemoryUsage(bool $asString = true): string|array
429429
/**
430430
* Map the collection and group the results by the given key.
431431
*
432-
* @param callable|string $groupBy Key to group by or callback that returns the group key
433-
* @param callable|null $mapCallback Callback to transform each item (optional)
432+
* @param callable|string $groupBy
433+
* @param callable|null $mapCallback
434434
* @return array
435435
*/
436436
public function mapAsGroup($groupBy, ?callable $mapCallback = null): array
@@ -456,8 +456,8 @@ public function mapAsGroup($groupBy, ?callable $mapCallback = null): array
456456
/**
457457
* Map the collection and use the given key as array keys.
458458
*
459-
* @param callable|string $keyBy Key to use as array key or callback that returns the key
460-
* @param callable|null $mapCallback Callback to transform each item (optional)
459+
* @param callable|string $keyBy
460+
* @param callable|null $mapCallback
461461
* @return array
462462
*/
463463
public function mapAsKey($keyBy, ?callable $mapCallback = null): array
@@ -572,7 +572,7 @@ public function mapWithKeys(callable $callback): array
572572
/**
573573
* Convert the collection to JSON.
574574
*
575-
* @param int $options JSON encoding options
575+
* @param int $options
576576
* @return string
577577
*/
578578
public function toJson(int $options = 0): string

src/Phaseolies/Support/CookieJar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ protected function setCookie(Cookie $cookie): bool
175175
/**
176176
* Get all cookies that were sent with the current request
177177
*
178-
* @param bool $decodeValues Whether to URL-decode cookie values (default: true)
178+
* @param bool $decodeValues
179179
* @return array
180180
*/
181181
public function all(bool $decodeValues = true): array

src/Phaseolies/Support/File.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class File extends \SplFileInfo
2424
/**
2525
* Constructor that initializes the File object with the given file data.
2626
*
27-
* @param array $file The uploaded file's data from the $_FILES array.
27+
* @param array $file
2828
*/
2929
public function __construct(\SplFileInfo|string|array $file, bool $checkPath = true)
3030
{
@@ -131,7 +131,7 @@ public function generateUniqueName(): string
131131
/**
132132
* Checks if the uploaded file is of a specific MIME type.
133133
*
134-
* @param string|array $mimeType The MIME type(s) to check against.
134+
* @param string|array $mimeType
135135
* @return bool
136136
*/
137137
public function isMimeType(string|array $mimeType): bool
@@ -190,8 +190,8 @@ public function isDocument(): bool
190190
/**
191191
* Moves the uploaded file to a new location.
192192
*
193-
* @param string $destination The destination path to move the file to.
194-
* @param string|null $fileName Optional filename to use. If null, the original filename is used.
193+
* @param string $destination
194+
* @param string|null $fileName
195195
* @return bool
196196
*/
197197
public function move(string $destination, ?string $fileName = null): bool
@@ -267,10 +267,10 @@ public function store(string $path, string $disk = 'public'): bool
267267
/**
268268
* Store the file with filename
269269
*
270-
* @param string $path The directory path to store the file
271-
* @param string $fileName The filename to use
272-
* @param string $disk The storage disk to use (default: 'public')
273-
* @param callable|null $callback Optional validation callback
270+
* @param string $path
271+
* @param string $fileName
272+
* @param string $disk
273+
* @param callable|null $callback
274274
* @return string|false
275275
*/
276276
public function storeAs(string $path, string $fileName = '', string $disk = 'public', ?callable $callback = null): string|false

src/Phaseolies/Support/Lens.php

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@
88
/**
99
* Static proxy class for array manipulation operations.
1010
*
11-
* Provides a fluent, static interface to the RealLens implementation while handling
12-
* reference parameters properly. This class serves as a facade that:
13-
*
14-
* 1. Manages a singleton instance of RealLens
15-
* 2. Proxies method calls to the implementation
16-
* 3. Special-cases reference-based methods (put/zap)
17-
*
1811
* @method mixed grab(array $array, string|int|null $key, mixed $default = null) Get array value using dot notation
1912
* @method array put(array &$array, string $key, mixed $value) Set array value using dot notation (modifies by reference)
2013
* @method bool got(array $array, string|array $keys) Check if key(s) exist in array
@@ -62,12 +55,8 @@ private static function make(): Lensable
6255
/**
6356
* Handle static method calls
6457
*
65-
* Proxies calls to the implementation instance with special handling for:
66-
* - put(): Modifies array by reference
67-
* - zap(): Modifies array by reference
68-
*
69-
* @param string $method Method name
70-
* @param array $args Method arguments
58+
* @param string $method
59+
* @param array $args
7160
* @return mixed
7261
*/
7362
public static function __callStatic($method, $args)

src/Phaseolies/Support/LoggerService.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class LoggerService extends LogService
2222
/**
2323
* Sets the logging channel.
2424
*
25-
* @param string $channel The channel name (e.g., 'stack', 'daily', etc.).
26-
* @return self Returns the current instance for method chaining.
25+
* @param string $channel
26+
* @return self
2727
*/
2828
public function channel(string $channel): self
2929
{
@@ -43,8 +43,8 @@ public function channel(string $channel): self
4343
/**
4444
* Logs an informational message.
4545
*
46-
* @param mixed $message The message to log.
47-
* @param array $context Additional context data.
46+
* @param mixed $message
47+
* @param array $context
4848
* @return void
4949
*/
5050
public function info(mixed $message, array $context = []): void
@@ -57,8 +57,8 @@ public function info(mixed $message, array $context = []): void
5757
/**
5858
* Logs a notice message.
5959
*
60-
* @param mixed $message The message to log.
61-
* @param array $context Additional context data.
60+
* @param mixed $message
61+
* @param array $context
6262
* @return void
6363
*/
6464
public function notice(mixed $message, array $context = []): void
@@ -71,8 +71,8 @@ public function notice(mixed $message, array $context = []): void
7171
/**
7272
* Logs a warning message.
7373
*
74-
* @param mixed $message The message to log.
75-
* @param array $context Additional context data.
74+
* @param mixed $message
75+
* @param array $context
7676
* @return void
7777
*/
7878
public function warning(mixed $message, array $context = []): void
@@ -85,8 +85,8 @@ public function warning(mixed $message, array $context = []): void
8585
/**
8686
* Logs an error message.
8787
*
88-
* @param mixed $message The message to log.
89-
* @param array $context Additional context data.
88+
* @param mixed $message
89+
* @param array $context
9090
* @return void
9191
*/
9292
public function error(mixed $message, array $context = []): void
@@ -99,8 +99,8 @@ public function error(mixed $message, array $context = []): void
9999
/**
100100
* Logs a debug message.
101101
*
102-
* @param mixed $message The message to log.
103-
* @param array $context Additional context data.
102+
* @param mixed $message
103+
* @param array $context
104104
* @return void
105105
*/
106106
public function debug(mixed $message, array $context = []): void
@@ -113,8 +113,8 @@ public function debug(mixed $message, array $context = []): void
113113
/**
114114
* Logs a critical message.
115115
*
116-
* @param mixed $message The message to log.
117-
* @param array $context Additional context data.
116+
* @param mixed $message
117+
* @param array $context
118118
* @return void
119119
*/
120120
public function critical(mixed $message, array $context = []): void
@@ -127,8 +127,8 @@ public function critical(mixed $message, array $context = []): void
127127
/**
128128
* Logs an alert message.
129129
*
130-
* @param mixed $message The message to log.
131-
* @param array $context Additional context data.
130+
* @param mixed $message
131+
* @param array $context
132132
* @return void
133133
*/
134134
public function alert(mixed $message, array $context = []): void
@@ -141,8 +141,8 @@ public function alert(mixed $message, array $context = []): void
141141
/**
142142
* Logs an emergency message.
143143
*
144-
* @param mixed $message The message to log.
145-
* @param array $context Additional context data.
144+
* @param mixed $message
145+
* @param array $context
146146
* @return void
147147
*/
148148
public function emergency(mixed $message, array $context = []): void
@@ -155,7 +155,7 @@ public function emergency(mixed $message, array $context = []): void
155155
/**
156156
* Overrides reader to pass the dynamic channel.
157157
*
158-
* @return Logger The configured Monolog logger instance.
158+
* @return Logger
159159
*/
160160
protected function reader(): Logger
161161
{

src/Phaseolies/Support/Mail/Driver/MailMailDriver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ public function __construct(array $config)
2525
/**
2626
* Sends an email using PHP's mail() function.
2727
*
28-
* @param Mailable $message The Mailable object containing email details.
29-
* @return bool Returns true if the email is sent successfully, false otherwise.
30-
* @throws \Exception Throws an exception if the email could not be sent.
28+
* @param Mailable $message
29+
* @return bool
30+
* @throws \Exception
3131
*/
3232
public function send(Mailable $message)
3333
{

0 commit comments

Comments
 (0)